Not Equal To (NE)
When enabled, the NE instruction and the operator
test whether Source A is not equal to Source B.

Available Languages
Ladder Diagram

Operands
There are data conversion rules for mixing numeric data types within an instruction. See Data conversions.
Ladder Diagram
Numeric Comparison
Operand | Data Type | Format | Description |
---|---|---|---|
Source A | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | immediate tag | Value to test against Source B |
Source B | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | immediate tag | Value to test against Source A |
Affects Math Status Flags
No
Major/Minor Faults
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 | Numeric compare: If Source A or Source B is NAN or Source A is not equal to Source B. Set Rung-condition-out to true else Clear Rung-condition-out to false. |
Postscan | N/A |
Examples
Ladder Diagram

Provide Feedback