Compare - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Type shown in counter instruction (for preset
and count values)
1. Open the block that will use this FB.
2. Place this FB at the desired location. Doing so results in the creation of an instance data
3. Open the instance data block created when you placed the FB in the editor.
4. Under Static, locate the counter structure of interest. In the Retain column for this counter
7.4

Compare

7.4.1
Compare
Table 7- 27
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- 28
Data types for the parameters
Parameter
Data type
IN1, IN2
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, String, Char,
Time, DTL, Constant
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
INT
SINT
DINT
UINT
USINT
UDINT
block for this FB.
structure, check the box to make this structure retentive.
SCL
out := in1 == in2;
or
IF in1== in2,
THEN out := 1;
ELSE out := 0;
END_IF;
Corresponding structure Type shown in FB
interface
IEC_Counter
IEC_SCounter
IEC_DCounter
IEC_UCounter
IEC_USCounter
IEC_UDCounter
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
100BBasic instructions
7.4 Compare
183

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents