Logical block that performs an Boolean "or" operation between two variables, storing the result in a third one.
Ladder Representation

Block Structure
Variable Type |
Name |
Data Type |
Description |
VAR_INPUT |
EN |
BOOL |
Block enabling |
Value1 |
BYTE USINT SINT WORD UINT INT DWORD UDINT DINT |
Variable for the operation |
|
Value2 |
BYTE USINT SINT WORD UINT INT DWORD UDINT DINT |
Variable for the operation |
|
VAR_OUTPUT |
ENO |
BOOL |
End of operation |
Result |
BYTE USINT SINT WORD UINT INT DWORD UDINT DINT |
Variable that stores the result of the operation |
Operation
When this block has a TRUE value in EN, it sends to the Result output the "or" Boolean operation of input variables Value1 and Value2.
When EN has FALSE value, Result remains unchanged.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart

Example in Ladder

The example above performs an "or" Boolean operation between AUX and AUX2, storing the result in AUX3.
Example in ST
The example below displays the instructions for applying the example above in the ST language.
VAR AUX : BYTE := 2#1100_1110; AUX2 : BYTE := 2#1001_1100; AUX3 : BYTE; END_VAR
AUX3 := FB_OR( EN:=DI1, Value1:=AUX, Value2:=AUX2, ENO=>DO1);
|
|---|