Nesting blocks
Fig. 3-4 shows the principle of nested block calls.
Block addresses
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.
OB 1
BE
PB 20
BE
PB 5
C
C
DB 20
DB 30
BE
JU PB 5
F 200.5
*)
JU
JU
PB 20
FB 30
O
F 1.5
*)
NAME: KURV
A
I 55.0
*)
*)
Operation to which the program returns
A
1st STEP 5 op.
1st STEP 5 op.
Fig. 3-4
Nested logic block calls
Program Organization
CPU 948 Programming Guide
3 - 8
C79000-G8576-C848-04
Summary of Contents for CPU 948
Page 10: ...Contents CPU 948 Programming Guide 1 2 C79000 G8576 C848 04 ...
Page 32: ...Contents CPU 948 Programming Guide 2 2 C79000 G8576 C848 04 ...
Page 72: ...Data Blocks CPU 948 Programming Guide 2 42 C79000 G8576 C848 04 ...
Page 74: ...Contents CPU 948 Programming Guide 3 2 C79000 G8576 C848 04 ...
Page 154: ...Contents CPU 948 Programming Guide 4 2 C79000 G8576 C848 04 ...
Page 200: ...Contents CPU 948 Programming Guide 5 2 C79000 G8576 C848 04 ...
Page 308: ...Contents CPU 948 Programming Guide 7 2 C79000 G8576 C848 04 ...
Page 324: ...Examples of Parameter Assignment CPU 948 Programming Guide 7 18 C79000 G8576 C848 04 ...
Page 326: ...Contents CPU 948 Programming Guide 8 2 C79000 G8576 C848 04 ...
Page 370: ...Addressable System Data Area CPU 948 Programming Guide 8 46 C79000 G8576 C848 04 ...
Page 372: ...Contents CPU 948 Programming Guide 9 2 C79000 G8576 C848 04 ...
Page 486: ...Contents CPU 948 Programming Guide 11 2 C79000 G8576 C848 04 ...
Page 522: ...PG Functions via the S5 Bus CPU 948 Programming Guide 11 38 C79000 G8576 C848 04 ...
Page 524: ...Contents CPU 948 Programming Guide 12 2 C79000 G8576 C848 04 ...
Page 538: ...Contents CPU 948 Programming Guide 13 2 C79000 G8576 C848 04 ...
Page 546: ...List of Key Words CPU 948 Programming Guide Index 6 C79000 G8576 C848 04 ...