Skip to content

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 emits true
  • 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 becomes true
  • if no input has the last value logical true, the output becomes false

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:

  • null before the first significant change is processed
  • true when the last calculated result had the logical value true
  • false when 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, and true, then the output becomes true.
  • If one of the inputs previously had the value true, then changes to false, and no other input has the last value true, then the output becomes false.
  • If one of the inputs sends a number or text, and no other input has the last logical value true, then the output becomes false.
  • If filter_duplicated_values = true and subsequent input changes still lead to the result true, the block does not emit true again.
  • If filter_duplicated_values = false and subsequent input changes still lead to the result true, the block emits true again after each such change.