Siemens S5-100U User Manual page 137

Simatic s5 programmable controller
Hide thumbs Also See for S5-100U:
Table of Contents

Advertisement

S5-100U
Programming Data Blocks
Begin programming a data block by specifying a block number between 2 and 63 for CPU 100 or
CPU 102, and between 2 and 255 for CPU 103. DB0 is reserved for the operating system, DB1 for
setting parameters for internal functions (see section 9.1). Data is stored in this block in words.
If the information takes up less than 16 bits, the high-order bits are padded with zeros. Data input
begins at data word 0 and continues in ascending order. A data block can hold up to 256 data
words. You can call up or change the data word contents with load or transfer operations.
Input
0000
:
KH
0001
:
KT
0003
:
KF
You can also create or delete data blocks in the control program (see section 8.1.8).
Program Processing with Data Blocks
A data block must be called in the program with the C DBx operation (x = DB number) before it
can be accessed.
Within a block, a data block remains valid until another data block is called.
When the program jumps back into the higher-level block, the data block that was valid before
the block call is again valid.
After OB1, 2, 13, 21, 22 have been called by the operating system, no DB is valid.
Valid
DB
PB7
C DB10
DB10
JU PB20
DB10
When PB20 is called, the valid data area is entered into memory.
When the program jumps back, this area is reopened.
The Function of DB1
DB1 is used for special functions. DB1 is already integrated into CPU 103 version 8MA03 and
higher and contains (default) values that you can either accept or change (see section 9.1). DB1 is
evaluated once during start-up: either after Power ON or after a transition from STOP to RUN.
EWA 4NEB 812 6120-02
=
A13C
=
100.2
=
+21874
Figure 7-7. Example of Data Block Contents
Figure 7-8. Validity Areas of Data Blocks
Introduction to STEP 5
Stored Values
DW0
DW1
DW2
Valid
PB20
DB
DB10
C DB11
DB11
A13C
2100
5572
7-17

Advertisement

Table of Contents
loading

Table of Contents