Operator - Performs a logical OR of all inputs.
IN1 : BOOL First boolean input
IN2 : BOOL Second boolean input
Q : BOOL Boolean OR of all inputs
IN1 |
IN2 |
Q |
0 |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
In FBD language, the block may have up to 16 inputs. The block is called ">=1" in FBD language. In LD language, an OR operation is represented by contacts in parallel. In IL language, the OR instruction performs a logical OR between the current result and the operand. The current result must be boolean. The ORN instruction performs an OR between the current result and the boolean negation of the operand.
Q := IN1 OR IN2;
Q := IN1 OR IN2 OR IN3;
(* the block may have up to 16 inputs *)
(* parallel contacts *)
Op1: LD IN1
OR IN2
ST Q (* Q is equal to:
IN1 OR IN2 *)
Op2: LD IN1
ORN IN2
ST Q (* Q is equal to:
IN1 OR (NOT IN2) *)