Siemens Simatic S7-200 System Manual page 83

Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

As shown in Figure 6-2, the S7-200 uses a logic stack to resolve the control logic. In these examples, "iv0"
to "iv7" identify the initial values of the logic stack, "nv" identifies a new value provided by the instruction,
and "S0" identifies the calculated value that is stored in the logic stack.
ALD
Before
AND the top
iv0
two stack
iv1
values
iv2
iv3
iv4
iv5
iv6
iv7
S0 = iv0 AND iv1
iv8
LPS
Before
Logic Push
iv0
iv1
iv2
iv3
iv4
iv5
iv6
iv7
2
iv8
1
The value is unknown (it could be either a 0 or a 1).
2
After the execution of a Logic Push or a Load Stack instruction, value iv8 is lost.
Figure 6-2
Operations of the Logic Stack Instructions
Example: Logic Stack Instructions
OLD
After
Before
OR the top two
S0
iv0
stack values
iv2
iv1
iv3
iv2
iv4
iv3
iv5
iv4
iv6
iv5
iv7
iv6
iv8
iv7
S0 = iv0 OR iv1
1
x
iv8
LRD
After
Before
Logic Read
iv0
iv0
iv0
iv1
iv1
iv2
iv2
iv3
iv3
iv4
iv4
iv5
iv5
iv6
iv6
iv7
iv7
iv8
Network 1
LD
LD
LD
A
OLD
ALD
=
Network 2
LD
LPS
LD
O
ALD
=
LRD
LD
O
ALD
=
LPP
A
=
S7-200 Instruction Set
LDS
Before
After
Load Stack
S0
iv0
iv2
iv1
iv3
iv2
iv4
iv3
iv5
iv4
iv6
iv5
iv7
iv6
iv8
iv7
1
2
x
iv8
LPP
After
Before
Logic Pop
iv1
iv0
iv1
iv1
iv2
iv2
iv3
iv3
iv4
iv4
iv5
iv5
iv6
iv6
iv7
iv7
iv8
iv8
I0.0
I0.1
I2.0
I2.1
Q5.0
I0.0
I0.5
I0.6
Q7.0
I2.1
I1.3
Q6.0
I1.0
Q3.0
Chapter 6
After
iv3
iv0
iv1
iv2
iv3
iv4
iv5
iv6
iv7
After
iv1
6
iv2
iv3
iv4
iv5
iv6
iv7
iv8
1
x
71

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents