Skip to main content

Operator: EQ

The IEC operator compares two operands for equality.

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

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

Example 131. Example

Result: VAR1 = TRUE

ST:

// Implementation
VAR1 := 20 = 20;

FBD:

_cds_img_eq.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