NEG -

PLCopen motion icon

Operator - Performs a negation of the input. (unary operator)

Inputs

Input

Data Type

Range

Unit

Default

Description

IN

ANY

 

 

 

Numeric value.

Outputs

Output

Data Type

Range

Unit

Description

Q

ANY

 

 

Negation of the input.

Remarks

Truth Table

IN

Q

0

0

1

-1

-123

123

FBD Language Example

FFLD Language Example

  • In the FFLD Language, the conversion is executed only if the input rung (EN) is TRUE.
    • The output rung (ENO) keeps the same value as the input rung.
    • The negation is executed only if EN is TRUE.
    • ENO keeps the same value as EN.

IL Language Example

Not available.

ST Language Example

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