NEG   -PLCopen motion icon

Operator - Performs an integer negation of the input.

Inputs

IN : DINT  Integer value 

Outputs

Q : DINT   Integer negation of the input

Truth table (examples)

IN Q
0 0
1 -1
-123 123

Remarks

ST Language

Q := -IN;
Q := - (IN1 + IN2);

FBD Language

Neg Fbd

FFLD Language

(* The negation is executed only if EN is TRUE *)
(* ENO keeps the same value as EN *)
Neg Ffld