Comparison (Relational) Operations; Comparing For Equal To; Comparing For Not Equal To - Siemens Simatic S5-101U Programming Instructions Manual

Table of Contents

Advertisement

5.1.6
Comparison (relational) operations
Comparing for equal to
The operand f i r s t s p e c i f i e d i s compared
The numerical representation o f the
w i t h the subsequent operation i n keeping
operands i s taken i n t o account, i.e.
w i t h the comparison function. The r e s u l t
the contents o f t h e accumulators are
of the comparison i s flagged by c o n d i t i o n
interpeted as being f i x e d - p o i n t numbers.
codes C C 0 and CC1.
A f t e r a comparison f o r equal to, a jump
can be made t o a l a b e l (+ 127 words)
w i t h the jump operation
JZ
=
. ..
( i f
R L O = 1).
Original
I B 0
IB1
Q
1.0
Comparing for not equal to
STEP 5 representation
f o r
I B O = I B l
I B 0
I B 1
I B 0
>
I B 1
The operand f i r s t s p e c i f i e d i s compared
The numerical representation o f the
w i t h the subsequent operand i n keeping
operands i s taken i n t o account, i.e.
w i t h the comparison function. The r e s u l t
the contents o f the accumulators are
of the comparison i s flagged by c o n d i t i o n
i n t e r p r e t e d as being f i x e d - p o i n t numbers.
codes C C 0 and CC1.
Following a comparison f o r n o t equal
to, a jump can be made t o a l a b e l (+ 127
words) w i t h the jump operation J N =
. . .
( i f RLO =
1).
Control system
flowchart
Statement
l i s t
L I B 0
CC1
0
0
1
Original
I B 0 IB1
Q1 l
Ladder
diagram
L
IB1
!
= F
= (21.0
C C 0
0
1
0
STEP
5 representat~on
IB1
I B 1
RL 0
1
0
0
RLO
0
1
1
f o r
I B 0 = I B 1
I B 0 c I B 1
I B 0
>
I B 1
Control system
flowchart
Statement
l i s t
L
1 8 0
Ladder
diagram
CC1
0
0
1
L I B 1
> < F
=
Q1.l
C C 0
0
1
0
I
B1
I
B
1

Advertisement

Table of Contents
loading

Table of Contents