Skip to main content

OR

Performs a Boolean OR operation between two values.

Ladder Representation

OR Ladder block representation

Block Structure

Variable TypeNameData TypeDescription
VAR_INPUTENBOOLBlock enable.
VAR_INPUTValue1BYTE USINT SINT WORD UINT INT DWORD UDINT DINTOperation variable.
VAR_INPUTValue2BYTE USINT SINT WORD UINT INT DWORD UDINT DINTOperation variable.
VAR_OUTPUTENOBOOLEnd of operation.
VAR_OUTPUTResultBYTE USINT SINT WORD UINT INT DWORD UDINT DINTVariable that stores the operation result.

Operation

When EN is TRUE, the block writes to Result the Boolean OR operation between Value1 and Value2.

When EN is FALSE, Result remains unchanged.

After the operation is complete, ENO passes the EN value to the next Ladder block.

Execution Flowchart

OR execution flowchart

Examples

OR Ladder example 1

The Ladder example performs a Boolean OR operation between AUX and AUX2 and stores the result in AUX3.