7.4 Comparator operations
Compare values instructions
Table 7- 28
For LAD and FBD: Click the instruction name (such as "==") to change the comparison type from the drop-down list.
Click the "???" and select data type from the drop-down list.
Table 7- 29
Data types for the parameters
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, String, Char,
Time, DTL, Constant
Table 7- 30
out := in1 = in2;
IF in1 = in2
THEN out := 1;
ELSE out := 0;
The comparison is true if ...
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
IN1 is greater than IN2
IN1 is less than IN2
Compares two values of the same data type. When the
LAD contact comparison is TRUE, then the contact is
activated. When the FBD box comparison is TRUE,
then the box output is TRUE.
Values to compare
System Manual, 03/2014, A5E02486680-AG
S7-1200 Programmable controller