NOT

PLCopen motion icon

Operator - Performs a Boolean negation of the input.

Inputs

Input

Data Type

Range

Unit

Default

Description

IN

BOOL

FALSE, TRUE

 

 

Boolean value.

Outputs

Output

Data Type

Range

Unit

Description

Q

BOOL

FALSE, TRUE

 

Boolean negation of the input.

Remarks

None

Truth Table

IN

Q

0

1

1

0

FBD Language Example

  • In the FBD Language, the block "NOT" can be used.
    • Alternatively, you can use a link terminated by a "o" negation.

Example: Explicit use of the NOT block:

Example: Use of a negated link: Q is IN1 AND NOT IN2:

FFLD Language Example

  • In the FFLD Language, negated contacts and coils can be used.

Example: Negated contact: Q is: IN1 AND NOT IN2:


Example: Negated coil: Q is NOT (IN1 AND IN2):

IL Language Example

  • In the IL Language, the N modifier can be used with instructions FFLD, AND, OR, XOR and ST.
    • It represents a negation of the operand.
Op1: FFLDN IN1
     OR  IN2
     ST  Q   (* Q is equal to: (NOT IN1) OR IN2 *)
Op2: FFLD  IN1
     AND IN2
     STN Q   (* Q is equal to: NOT (IN1 AND IN2) *)st

ST Language Example

  • In the ST Language, NOT can be followed by a complex Boolean expression between parentheses.
Q := NOT IN;
Q := NOT (IN1 OR IN2);

See Also