S5-95F
Introduction to STEP 5
Programming Data Blocks
Begin programming a data block by specifying a block number. 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
Stored Values
0000 : KH
=
A13C
DW0
A13C
H
0001 : KT
=
100.2
DW1
2100
H
0003 : KF
=
+21874
DW2
5572
H
Figure 7-7. Data Block Contents
You can also generate 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, 34 and 37 have been called by the operating system, no DB is valid.
Figure 7-8. Validity Areas of Data Blocks
DB10
DB10
JU PB20
C DB10
C DB11
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
When PB20 is called, the valid data area is entered into a memory.
When the program jumps back, this area is reopened.
Valid
DB
PB7
PB20
Valid
DB
DB10
DB11
EWA 4NEB 812 6210-02
7-17