Compare Instructions

The compare instructions let you compare values by using an expression or a specific compare instruction.
Available Instructions
Ladder Diagram
If you want to:
Use this instruction:
compare values based on an expression
test whether two values are equal
test whether one value is greater than or equal to a second value
test whether one value is greater than a second value
test whether one value is less than or equal to a second value
test whether one value is less than a second value
test whether one value is between two other values
pass two values through a mask and test whether they are equal
test whether one value is not equal to a second value
Compare values of different data types, such as floating point and integer.
The bold data types indicate optimal data types. An instruction executes at its fastest and with it lowest memory requirements if all the parameters of the instruction use the same optimal data type, typically DINT or REAL.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.