Siemens SIMATIC S5-90U System Manual page 203

Table of Contents

Advertisement

S5-90U/S5-95U
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 DW3 in data block DB20.
Program Sequence
PB3
C DB10
L DW1
C DB20
T DW3
Generating and Deleting a Data Block (only for the S5-95U)
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 ACCU 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.
Note
The block is stored in memory and not accessible. When the programmable controller
memory is compressed, the old data block is deleted (see Section 7.4.3).
If you try to set up a data block that already exists, the "G DB x" statement is not executed.
A data block can be a maximum of 256 data words (DW0 to 255) in length.
EWA 4NEB 812 6115-02b
STL
DB10
C
DB 10
DW1
L
DW 1
.
.
.
.
DB20
C
DB 20
DW3
T
DW 3
STEP 5 Operations
Explanation
The information from data word DW1
in data block DB10 is loaded into the
accumulator. The contents of ACCU 1
are stored in data word DW3 of data
block DB20.
8-35

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s5-95u

Table of Contents