Siemens CPU 948 Programming Manual page 293

Simatic s5 s5-155u
Table of Contents

Advertisement

Example
You want the data block start address (DBA = 4152H in DB 17, length = 256
DW) to be shifted by 32 data words relative to the end of the block.
:C
DB
17
:L
KB
32
:JU
OB
180
After OB 180 has been called, the data word, for example, at address 4
1543H can no longer be addressed with DW 35 but only with DW 3 etc. (see
Fig. 6-3).
Due to the change made at the same time in the DBL register, error monitoring
is not affected: the operation T DW 223 is permitted, while T DW 224/L DW 224
causes an error.
By calling OB 180 again, the DBA can be increased again (and the DBL
reduced). The operation C DB 17 returns the block to its original settings
(DBA = 4152H, length 256 DW).
If DB 17 had a length of 256 data words for example, you could then no
longer access DW 256 and DW 257 using STEP 5 operations. By shifting the
DBA resgister by 16, data words 256 and 257 can be addressed as "DW 240"
and "DW 241".
CPU 948 Programming Guide
C79000-G8576-C848-04
open DB 17
shift value as constant
call OB 180: shift access window
OB 180: Variable Data Block Access
Continued on next page
6 - 55

Advertisement

Table of Contents
loading

Table of Contents