Technical data
Note
If you manipulate the DBA register as shown in example 1, the
DBL register is
not changed. This means that transfer error
monitoring can no longer be guaranteed.
By using the special function OB 180 "variable data block
access" you can also shift the DBA register by a selected number
of data words. Since OB 180 also changes the DBL register at the
same time, transfer error monitoring remains in effect.
Example 2: By changing register 6, you can load data word DW 300 of
data block DB 100.
FB 7
NAME : LIR/TIR6
:L RS 34 start address of the DB address list plus 100
:ADD BN+100 produces the address list entry of DB 100
:LIR 1 start address of DB 100 (DW 0) to ACCU 1
:ADD KF+200 store address of DW 200 in DB 100 in system data
:T RS 62 word RS 62
:L RS 20 load base address of system data
:ADD KF+62 load address of RS 62 in ACCU 1
:LIR 6 load DBA register with the contents of the address
: of RS 62, i.e., the data block start is set to
DW 200
:L DW 100 load DW (200 + 100) = DW 300
:T FW 100 store DW 300 in flag word FW 100
:BE
Example 3: Changing the DBA and DBL registers.
FB7
NAME :OB180
:C DB 100 DBA and DBL registers are loaded with the values
:L KF 200 of DB 100 and with the help of OB 180 the
:JU OB 180 DBA register is increased by 200 and the DBL
: register reduced by 200
:JC =ERRO error output, in case DB 100 contains
: less than or equal to 200 data words
:L DW 100 load DW 300 and
:T FW 100 store in FW 100
:BEU
ERRO : program section for error handling
:
:BE
9
Access using the Address in ACCU 1
CPU 928B Programming Guide
C79000-B8576-C898-01
9 - 13