S5-115U Manual
STEP 5 Operations
Call a Data Block "C DB"
Data blocks are always called unconditionally. All data processed following the call refers to the
data block that has been called. This operation cannot generate new data blocks. Blocks that are
called must be programmed before program scanning.
Example:
Program block PB3 needs information that has been programmed as data word DW 1
in data block DB10. Other data, e.g., the result of an arithmetic operation, is stored as
data word DW 3 in data block DB20.
C DB10
L DW 1
.
.
.
.
C DB20
T DW 3
The information from data word
DW 1 in data block DB 10 is loaded
into the accumulator. The contents of
ACCUM 1 are stored in data word
DW 3 of data block DB20.
STL
Explanation
Program Sequence
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
PB3
C DB20
C DB10
L DW 1
T DW 3
DB20
DW 1
DB10
DW 3
Generating and Deleting a Data Block
The "G DB x" statement does not call a data block. Instead, it generates a new block. If you want
to use the data in this data block, call it with the "C DB" statement.
Before the "G DB" statement, indicate in ACCUM 1 the number of data words the block is to have
(see the example below).
If you specify zero as the data block length, the data block in question is deleted, i.e., it is removed
from the address list. It is considered nonexistent (see 11.1.4 and 11.1.5).
Note
The block is retained as a "dead" block until the PLC memory is compressed (see
Section 7.5.3).
If an already existing data block is to be set up, the statement G DBx will have no effect! If the DB
to be set up is longer than the available memory, the CPU goes to STOP with "TRAF" or jumps to
the relevant error response OB.
The length of data blocks set up in this way is optional. However, please note that programmers
can process blocks of limited length only.
EWA 4NEB 811 6130-02b
8-35
Summary of Contents for SIMATIC S5-115U
Page 6: ...EWA 4NEB 811 6130 02b ...
Page 16: ...EWA 4NEB 811 6130 02b ...
Page 18: ...EWA 4NEB 811 6130 02b ...
Page 26: ......
Page 62: ...EWA 4NEB 811 6130 02b ...
Page 64: ...EWA 4NEB 811 6130 02b ...
Page 67: ......
Page 74: ......
Page 79: ......
Page 80: ......
Page 81: ......
Page 82: ......
Page 83: ......
Page 84: ......
Page 97: ......
Page 98: ......
Page 99: ......
Page 114: ...EWA 4NEB 811 6130 02b ...
Page 280: ...EWA 4NEB 811 6130 02b ...
Page 372: ...EWA 4NEB 811 6130 02b ...
Page 432: ...EWA 4NEB 811 6130 02b ...
Page 442: ......
Page 528: ...EWA 4NEB 811 6130 02b ...
Page 590: ......
Page 591: ......
Page 592: ......
Page 593: ......
Page 594: ......
Page 600: ...EWA 4NEB 811 6130 02b ...
Page 602: ...EWA 4NEB 811 6130 02b ...
Page 604: ...EWA 4NEB 811 6130 02b ...
Page 624: ...EWA 4NEB 811 6130 02b ...
Page 632: ...EWA 4NEB 811 6130 02b ...
Page 644: ...EWA 4NEB 811 6130 02b ...
Page 646: ...EWA 4NEB 811 6130 02b ...
Page 652: ...EWA 4NEB 811 6130 02b ...
Page 654: ...EWA 4NEB 811 6130 02b ...
Page 660: ...EWA 4NEB 811 6130 02b ...
Page 662: ...EWA 4NEB 811 6130 02b ...
Page 666: ...EWA 4NEB 811 6130 02b ...
Page 668: ...EWA 4NEB 811 6130 02b ...
Page 674: ...EWA 4NEB 811 6130 02b ...