Bitwise Not (NOT)
The NOT instruction performs a bitwise inversion of the Source and places the result in Dest.
When enabled, the instruction evaluates the bitwise NOT operation:
Dest = NOT Source
If the bit in the Source is: | The bit in the Dest is: |
---|---|
0 | 1 |
1 | 0 |
Available Languages
Ladder Diagram
FactoryTalk Design Studio
DSL - Ladder DiagramOperands
IMPORTANT:
Unexpected operation may occur if:
- Output tag operands are overwritten
- Members of a structure operand are overwritten
- Except when specified, structure operands are shared by multiple instructions.
There are data conversion rules for mixing numeric data types within an instruction. See Data conversions
.
Ladder Diagram
Operand | Data Type | Format | Description |
---|---|---|---|
Source | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | immediate tag | Value to NOT //FLOAT includes REAL and LREAL data types. Tip: Floating point inputs are converted to integer which may cause an overflow. |
Dest | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | tag | Tag to store result of the instruction. Tip: If the destination type is FLOAT, the resultant value will be converted to floating point. |
TIP:
When integer promotion is required for the inputs, the smaller type is converted to the larger type using zero extension.
Affects Math Status Flags
Conditional. See Math status flags.
Major/Minor Faults
None specific to this instruction. See Index through arrays for array-indexing faults.
Execution
Ladder Diagram
Condition/State | Action Taken |
---|---|
Prescan | N/A |
Rung-condition-in is false | Set Rung-condition-out to Rung-condition-in |
Rung-condition-in is true | Set Rung-condition-out to Rung-condition-in Dest is set as described in the Description section. |
Postscan | N/A |
Examples
Ladder Diagram
Provide Feedback