Operator - Performs a boolean negation of the input.
IN : BOOL Boolean value
Q : BOOL Boolean negation of the input
IN |
Q |
0 |
1 |
1 |
0 |
In FBD language, the block "NOT" can be used. Alternatively, you can use a link terminated by a "o" negation. In LD language, negated contacts and coils can be used. In IL language, the "N" modifier can be used with instructions LD, AND, OR, XOR and ST. It represents a negation of the operand. In ST language, NOT can be followed by a complex boolean expression between parenthesis.
Q := NOT IN;
Q := NOT (IN1 OR IN2);
(* explicit use of the "NOT" block *)
(* use of a negated link: Q is IN1 AND NOT IN2 *)
(* Negated contact: Q is: IN1
AND NOT IN2 *)
(* Negated coil: Q is NOT (IN1 AND IN2) *)
Op1: LDN IN1
OR IN2
ST Q (* Q is equal to:
(NOT IN1) OR IN2 *)
Op2: LD IN1
AND IN2
STN Q (* Q is equal to: NOT
(IN1 AND IN2) *)