Siemens CPU 948 Programming Manual page 80

Simatic s5 s5-155u
Table of Contents

Advertisement

Program Organization
Nesting blocks
OB 1
JU PB 5
*)
A
F 200.5
BE
*)
Operation to which the program returns
Fig. 3-4
Nested logic block calls
Block addresses
3 - 8
Fig. 3-4 shows the principle of nested block calls.
PB 5
1st STEP 5 op.
C
DB 20
JU
PB 20
*)
O
F 1.5
BE
A block start address specifies the location of a block in the user
memory. For logic blocks, this is the address of the memory location
containing the first STEP 5 operation (with FB and FX, the JU
operation via the formal operand list); with data blocks, it is the
address of the first data word.
To enable the CPU to locate the called block in the memory, the start
addresses of all valid blocks are entered in the block address list in
data block DB 0. DB 0 is managed by the system program, you cannot
call it yourself.
The CPU stores a return address every time a new block is called. After
the new block has been processed, this return address enables the program
to find the block from which the call originated. The return address is the
address of the memory location containing the next STEP 5 statement
after the block call. The CPU also stores the start address and length of
the data block valid at this location.
PB 20
1st STEP 5 op.
C
DB 30
FB 30
JU
NAME: KURV
*)
A
I 55.0
BE
CPU 948 Programming Guide
C79000-G8576-C848-04

Advertisement

Table of Contents
loading

Table of Contents