Chapter 4. Ladder Diagram (LD) Programming
GFK-2950C February 2018 211
4.12 Relational Functions
Relational functions compare two values of the same data type or determine whether a number lies
within a specified range. The original values are unaffected.
CMP_DINT
CMP_INT
CMP_REAL
CMP_LREAL
CMP_UINT
Compares two numbers, IN1 and IN2, of the data type specified by the
mnemonic.
■ If IN1 < IN2, the LT output is turned ON.
■ If IN1 = IN2, the EQ output is turned ON.
■ If IN1 > IN2, the GT output is turned ON.
EQ_DATA
EQ_DINT
EQ_INT
EQ_REAL
EQ_LREAL
EQ_UINT
Tests two numbers for equality
GE_DINT
GE_INT
GE_REAL
GE_LREAL
GE_UINT
Tests whether one number is greater than or equal to another
GT_DINT
GT_INT
GT_REAL
GT_LREAL
GT_UINT
Tests whether one number is greater than another
LE_DINT
LE_INT
LE_REAL
LE_LREAL
LE_UINT
Tests whether one number is less than or equal to another
LT_DINT
LT_INT
LT_REAL
LT_LREAL
LT_UINT
Tests whether one number is less than another
NE_DINT
NE_INT
NE_REAL
NE_LREAL
NE_UINT
Tests two numbers for inequality
RANGE_DINT
RANGE_DWORD
RANGE_INT
RANGE_UINT
RANGE_WORD
Tests whether one number is within the range defined by two other
supplied numbers