IEC 1131-3 Instructions
10.2
IEC Compare Instructions
There are no non-standard IEC Compare instructions.
Compare Equal
L
A
EN
D
IN1
IN2
F
B
D
221
222
Inputs/Outputs
Inputs
IB, QB, MB, SB, SMB, VB, LB, IW, QW, MW, SW, SMW, VW, LW,
(LAD & FBD)
T, C, AIW, ID, QD, MD, SD, SMD, VD, LD, HC, AC, Constant,
*VD, *AC, *LD
OUT (LAD only)
Power Flow
OUT (FBD only)
I, Q, M, SM, T, C, V, S, L, Power Flow
Compare Not Equal
L
A
D
EN
IN1
IN2
F
B
D
221
222 224
Inputs/Outputs
Inputs
IB, QB, MB, SB, SMB, VB, LB, IW, QW, MW, SW, SMW, VW, LW,
(LAD & FBD)
T, C, AIW, ID, QD, MD, SD, SMD, VD, LD, HC, AC, Constant,
*VD, *AC, *LD
OUT (LAD only)
Power Flow
OUT(FBD only)
I, Q, M, SM, T, C, V, S, L, Power Flow
10-8
The Compare Equal function compares IN1 and IN2
with the Boolean result placed in OUT. The input and
EQ
output data types can vary but must be of the same type.
OUT
Byte comparisons are unsigned. Integer, double integer,
and real comparisons are signed. Time operations are
signed integers.
EQ
224
226
Operands
The Compare Not Equal function compares IN1 and IN2
with the Boolean result placed in OUT. The input and
NE
output data types can vary, but must be of the same
OUT
type.
Byte comparisons are unsigned. Integer, double integer,
and real comparisons are signed. Time operations are
signed integers.
NE
226
Operands
BYTE, INT, DINT
REAL
BOOL
BOOL
BYTE, INT, DINT,
REAL
BOOL
BOOL
S7-200 Programmable Controller System Manual
Data Types
Data Types
A5E00066097-02