Skip to main content

Operator: NE

The IEC operator compares two operands for inequality.

All elementary data types are permitted as data types for the operands.

If the operands are unequal, then the operator yields the result TRUE; otherwise FALSE.

Example 132. Examples

Result: Var1= FALSE

ST:

Var1 := 40 <> 40;

FBD:

_cds_img_ne.png


Elementary data type

An elementary data type is available predefined in CODESYS Development System.

Besides the data types described in IEC 61131-3, there are the CODESYS-specific data types BIT, __UXINT, __XINT, and __XWORD.

Elementary data types:

__UXINT | __XINT | __XWORD | BIT | BOOL | BYTE | DATE | DATE_AND_TIME | DINT | DT | DWORD | INT | LDATE | LDATE_AND_TIME | LDT | LINT | LREAL | LTIME | LTOD | LWORD | REAL | SINT | TIME | TOD | TIME_OF_DAY | UDINT | UINT | ULINT | USINT | WORD