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