or
Description
The or block performs a logical OR operation on multiple boolean input signals. It returns true at the output if at least one connected input has the last known logical value true. In all other cases, it returns false.
The block has one output and allows multiple connections to its input. It does not require the use of inputs labeled with the tag block.
The block analyzes the currently received change and the last known values of the remaining connected inputs. As a result, the output matches the logical OR operation performed on the currently known states of all inputs.
Configuration parameters
| Parameter name | Value |
|---|---|
Block duplicated value (filter_duplicated_values) |
Required boolean value true or false. When set to true, the block does not emit the same result again if it is identical to the last emitted one. When set to false, each recalculated result is sent to the output even if it is unchanged compared with the previous one. |
Input handling
The block allows multiple connections to its only input.
Each new input change causes the result to be recalculated according to the following rules:
- if the just received value is logical
true, the block immediately emitstrue - if the just received value is not logical
true, the block checks the last known values of all remaining connected inputs - if at least one of those remaining inputs has the last value logical
true, the output becomestrue - if no input has the last value logical
true, the output becomesfalse
The block reacts only to logical true values as the condition for setting the result to true. Values false, null, and values of other types do not meet this condition and in practice are treated as the absence of the true state on a given input.
Ignored cases:
- recalculation of the same result when
filter_duplicated_values = true
Block outputs
The block has one output.
The output carries the logical value:
- true when at least one input has the last known logical value true
- false when no input has the last known logical value true
The description shown below the block reflects the last calculated result:
nullbefore the first significant change is processedtruewhen the last calculated result had the logical value truefalsewhen the last calculated result had the logical value false
Errors visible to the user
The block can display the following error messages:
| Error code | Error description |
|---|---|
Missing filter_duplicated_values configuration. |
The filter_duplicated_values parameter is missing in the configuration. |
Input disconnected. |
No other block is connected to the block input. |
Examples
- If three inputs are connected to the block and their last known values are
false,false, andtrue, then the output becomestrue. - If one of the inputs previously had the value
true, then changes tofalse, and no other input has the last valuetrue, then the output becomesfalse. - If one of the inputs sends a number or text, and no other input has the last logical value
true, then the output becomesfalse. - If
filter_duplicated_values = trueand subsequent input changes still lead to the resulttrue, the block does not emittrueagain. - If
filter_duplicated_values = falseand subsequent input changes still lead to the resulttrue, the block emitstrueagain after each such change.