Comparing For Greater Than; Comparing For Less Than - Siemens Simatic S5-101U Programming Instructions Manual

Table of Contents

Advertisement

Comparing for greater than
The operand f i r s t s p e c i f i e d i s compared
The numerical r e p r e s e n t a t i o n o f t h e
w i t h t h e subsequent operand i n keeping
operands i s taken i n t o account, i.e.
w i t h t h e comparison f u n c t i o n . The r e s u l t
the con t e n t s o f the accumulators are
o f t h e 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
CC0
and
CC1.
A f t e r a comparison f o r g r e a t e r than,
a jump can be made t o a l a b e l ( +
127
words) w i t h the jump o p e r a t i o n
3
=
.
. .
( i f RLO
=
1).
Or~glnal
1 8 0 I B I
Q 1 2
f o r
l c ~ l c ; l R i o
IB 0
=
IB 1
IB 0 < IB 1
IB
0
>
IB 1
STEP 5
representation
Comparing for less than
Control system
flowchart
1
~
o
-
j
~
~
IBI
c 2
Q
a 1 2
/Statement
i
Iis t
L I B 0
L I B 1
> F
=
81
2
Original
I B 0
I B 1
I
I
01.4
f o r
IB
0
=
IB 1
IB
0
<
IB
1
IB
0 > 1%
1
Ladder
diagram
1B017J
Q1
2
I B ~ c2
The operand f i r s t s p e c i f i e d i s corn-
The numerical r e p r e s e n t a t i o n o f t h e
pared w i t h the subsequent operand i n
operands i s taken i n t o account, i.e.
keeping w i t h the comparison f u n c t i o n .
t h e con t e n t s o f the accumulators a r e
The r e s u l t o f the comparison i s f l a g g e d
i n t e r p r e t e d as being f i x e d - p o i n t numbers.
by c o n d i t i o n codes
CC0
and
CC1.
A f t e r comparing f o r l e s s than, a jump
can be made t o a l a b e l
( 2
127
words)
w i t h the jump o p e r a t i o n J M
=
...
( i f RLO
=
1).
STEP 5 representation
CC1
0
0
1
Control system
flowchart
I B 0
-
I B 1
-
-
Q1.4
Statement
\is t
L I B O
L I B 1
F
=
01.4
CC0
0
1
0
Ladder
diagram
1 ~ 0 ] 7 k . 4
I B 1
C 2
RLO
0
1
0

Advertisement

Table of Contents
loading

Table of Contents