Appearance
XOR
Overview
The XOR node (exclusive OR) is a logical gate that returns true if an odd number of its inputs are true. It is commonly used to detect mutually exclusive conditions or state changes.
Use XOR when:
- Ensuring only one of multiple inputs is active at a time.
- Detecting a mismatch between two redundant sensors.
💡 Tip
For two inputs, XOR behaves as "one or the other, but not both." For more than two inputs, it acts as a parity check, returning true if the count of true inputs is odd.
Inputs
| Name | Type | Description |
|---|---|---|
| input_1..input_N | bool | Dynamic boolean input ports to be evaluated. |
⚠️ Warning
All configured input ports must be connected for the node to function correctly. If an input is missing, the node will not produce an output.
Outputs
| Name | Type | Description |
|---|---|---|
| output | bool | Returns true if an odd number of inputs are 'true'; otherwise returns false. |
Parameters
| Parameter | Default | Valid values | Tunable |
|---|---|---|---|
| Number of inputs | 2 | The whole number (integer) >= 2 | ❌ |
| Ignore Nothing values as inputs | false | bool | ❌ |
| Result when no inputs have values | false | bool | ❌ |
Number of inputs
Defines how many boolean input ports the node will provide for evaluation.
Ignore Nothing values as inputs
- true: Any
Nothingvalue type inputs are ignored. - false: If any input is a
Nothingvalue type, the node output isNothing.
Result when no inputs have values
- true: When all inputs are
Nothingvalue type, the output istrue. - false: When all inputs are
Nothingvalue type, the output isfalse.
Example
Mutually exclusive states
A control system monitors two manual override switches. An alarm should trigger if exactly one switch is active, but not if both are off or both are on.
Configuration:
- Number of inputs:
2 - Ignore Nothing values as inputs:
false - Result when no inputs have values:
false
Result: If switch A is true and switch B is false, the XOR output is true.
Related links
Reference:
- OR — returns
trueif at least one input is true - AND — returns
trueonly if all inputs are 'true' - Boolean Trigger — blocks or passes data based on an input value (trigger)