Specifications

SIMATIC Instructions
9-10
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
9.2 SIMATIC Compare Instructions
Compare Byte
The Compare Byte instruction is used to compare two
values: IN1 to IN2. Comparisons include: IN1 = IN2,
IN1 >= IN2, IN1 <= IN2, IN1 > IN2, IN1 < IN2, or
IN1 <> IN2.
Byte comparisons are unsigned.
In LAD, the contact is on when the comparison is true.
In FBD, the output is on when the comparison is true.
In STL, the instructions Load, AND, or OR, a 1 with the
top of stack when the comparison is true.
Inputs/Outputs Operands Data Types
Inputs IB, QB, MB, SMB, VB, SB, LB, AC, Constant, *VD, *AC,*LD BYTE
Outputs (FBD) I, Q, M, SM, T, C, V, S, L, Power Flow BOOL
L
A
D
S
T
L
LDB= IN1, IN2
AB= IN1, IN2
OB= IN1, IN2
LDB>= IN1, IN2
AB>= IN1, IN2
OB>= IN1, IN2
LDB<= IN1, IN2
AB<= IN1, IN2
OB<= IN1, IN2
==B
F
B
D
LDB<> IN1, IN2
AB<> IN1, IN2
OB<> IN1, IN2
LDB< IN1, IN2
AB< IN1, IN2
OB< IN1, IN2
LDB> IN1, IN2
AB> IN1, IN2
OB> IN1, IN2
IN1
==B
IN2
222 224
333
221