Program instructions
7.4 Compare
S7-200 SMART
192 System Manual, 09/2015, A5E03822230-AC
The compare instructions can compare two number values with the same data type. You can
compare bytes, integers, double integers, and real numbers.
For
: When the comparison is TRUE, the compare instruction sets ON a
contact (LAD network power flow), or output (FBD logic flow).
For
: When the comparison is TRUE, the compare instructions can load, AND, or OR a 1
with the value on the top of the logic stack.
Six comparison types are available:
The output is TRUE only if
== (LAD/FBD)
IN1 is equal to IN2
<> IN1 is not equal to IN2
IN1 is greater than or equal to IN2
IN1 is less than or equal to IN2
Selecting the data types to be compared
The data type identifier that you choose determines the required data type for the IN1 and
IN2 parameters.
Required IN1, IN2 data type
Signed double word integer