Comparator Operations; Compare Values Instructions - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents
Basic instructions

7.4 Comparator operations

7.4
Comparator operations
7.4.1

Compare values instructions

Table 7- 28
Compare instructions
LAD
FBD
For LAD and FBD: Click the instruction name (such as "==") to change the comparison type from the drop-down list.
1
Click the "???" and select data type from the drop-down list.
Table 7- 29
Data types for the parameters
Parameter
Data type
IN1, IN2
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, String, Char,
Time, DTL, Constant
Table 7- 30
Comparison descriptions
Relation type
=
<>
>=
<=
>
<
226
SCL
out := in1 = in2;
or
IF in1 = in2
THEN out := 1;
ELSE out := 0;
END_IF;
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
Description
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.
Description
Values to compare
System Manual, 03/2014, A5E02486680-AG
S7-1200 Programmable controller
Table of Contents
loading

Table of Contents