# CODESYS NE

Instructions · `NE` · verification: source checked

NE is an IEC 61131-3 operator in the CODESYS Development System that compares two operands for inequality. It returns TRUE when the operands are unequal and FALSE when they are equal. Any elementary data type can be used for the operands.

## Specification

| Property | Value |
|---|---|
| Language | iec 61131 3 |
| Code | NE |
| Group | Operator |
| Dialect | CODESYS |

## Study notes

- All elementary data types are permitted as data types for the operands.
- In structured text (ST) the inequality operator is written as <>; the example shown is: Var1 := 40 <> 40; which yields Var1 = FALSE.
- An FBD representation of the operator is also shown in the source.
- CODESYS provides elementary data types predefined: besides those described in IEC 61131-3, the CODESYS-specific types BIT, __UXINT, __XINT and __XWORD are available.
- Listed elementary data types include BOOL, BYTE, WORD, DWORD, LWORD, SINT, INT, DINT, LINT, USINT, UINT, UDINT, ULINT, REAL, LREAL, TIME, LTIME, DATE, TOD, TIME_OF_DAY, DT, LDT, LDATE, LDATE_AND_TIME and LTOD.

## Sources

1. [Beckhoff Information System](https://infosys.beckhoff.com/content/1033/tc3_plc_intro/2529009803.html) (accessed 2026-10-26)
2. [CODESYS Group](https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_operator_ne.html) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/iec-ne  
JSON: https://machineschema.com/instruction/iec-ne.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
