220 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ)
You can compare values of different data types, such as floating point
and integer.
For relay ladder instructions, bold data types indicate optimal data types. An
instruction executes faster and requires less memory if all the operands of the
instruction use the same optimal data type, typically DINT or REAL.
Test whether one value is less than or equal to
a second value
LEQ Relay ladder
Structured text
(1)
Function block
238
Test whether one value is less than a
second value
LES Relay ladder
Structured text
(1)
Function block
242
Test whether one value is between two
other values
LIM Relay ladder
Structured text
(1)
Function block
246
Pass two values through a mask and test
whether they are equal
MEQ Relay ladder
Structured text
(1)
Function block
252
Test whether one value is not equal to a
second value
NEQ Relay ladder
Structured text
(1)
Function block
257
(1) There is no equivalent structured text instruction. Use other structured text programming to achieve the same result. See the description for the instruction.
(2) There is no equivalent structured text instruction. Use the operator in an expression.
If you want to Use this instruction Available in these languages Page
REAL values are rarely absolutely equal. If you need to determine the
equality of two REAL values, use the LIM instruction.