Siemens SIMATIC S5-90U System Manual page 162

Table of Contents

Advertisement

Introduction to STEP 5
Programming Data Blocks
Begin programming a data block by specifying a block number between 2 and 63 for the S5-90U,
and between 2 and 255 for the S5-95U. DB0 is reserved for the operating system, DB1 for setting
parameters for internal functions. 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
In the S5-95U, 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).
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, 3, 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 a memory.
When the program jumps back, this area is reopened.
The Function of DB1
Both the S5-90U and the S5-95U use DB1 for special functions. DB1 is already integrated into both
of them. DB1 contains default values that you can either accept or change (see Chapter 9). DB1 is
evaluated during start-up after a transition from STOP to RUN.
7-16
=
A13C
=
100.2
=
+21874
Figure 7-6. Data Block Contents
Figure 7-7. Validity Areas of Data Blocks
S5-90U/S5-95U
Stored Values
DW0
A13C
DW1
2100
DW2
5572
Valid
PB20
DB
DB10
C DB11
DB11
EWA 4NEB 812 6115-02b

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s5-95u

Table of Contents