NOR Gate (nor)
Outputs 1 only when every input read is at or below 0.5.
Group: Control · Kind: {"block":"nor","kind":"control"}
When to use it
Use it for an all-clear signal, such as allowing the gate drive only when no fault is active. Use OR Gate when the fault itself should be the true output.
Pins
| Pin | Domain | Meaning |
|---|---|---|
in1 |
signal | First input; true above 0.5 |
in2 |
signal | Second input; true above 0.5 |
in3 |
signal | Third input, read if n is 3 or 4 |
in4 |
signal | Fourth input, read if n is 4 |
out |
signal | Output, always 0 or 1 |
Common parameters
n: How many inputs the gate has (Default: 2)
Parameters
| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
n |
— | 2 | How many inputs the gate has |
Parameter descriptions are in English in both languages.
Model
The first n inputs are read (n = 2 by default, up to 4). An input is true when it is above 0.5. The output is the inverse of OR: 1 when all n inputs are false and 0 when at least one is true. The gate is combinational: it has direct feedthrough and follows its inputs at every solver step.
Common mistakes
- An input that is not wired reads 0, which this gate ignores, so a fault source you forgot to wire never trips the output. Wire every input up to n, and set n to the number you use, because the default is 2.
- With every input at 0 the output is 1 from time 0, so the all-clear signal is true before any fault logic has run. A loop made only of gates is refused; build a latch with SR Latch.
Problems rules: compile.error
Datasheet and sources
There is no datasheet. n is the number of fault or enable sources combined. The logic levels come from your protection logic.
Example
Open the example with the command file.openExample and the name demo:nor.
Generated by cargo xtask reference from the usage texts and parameter specs. Do not edit by hand.