Technical data
2.4.2
Opening Data Blocks
You can only open a data block (DB/DX) unconditionally. This is
possible within an organization, program, sequence or function block.
You can open a specific data block more than once in a program.
To open a data block, perform the following steps:
IF... THEN...
You want to open a DB data
block
Type in the STEP 5 operation
"C DB.."
You want to open a
DX data
block
Type in the STEP 5 operation
"CX DX.."
Validity of a data block
After you open a data block, all statements that follow with the
operand area
āDā refer to the opened data block.
The opened data block also remains valid when the program is
continued in a different block following a block call.
If a second data block is opened in this new block, the second data
block is
only valid in the newly called block from the point at which it
is called. After program execution returns to the calling block, the old
data block is once again valid.
Access
You can access the data stored in the opened data block during
program execution using
load or transfer operations (refer to
Chapter 3 for more detailed information).
With a
binary operation, the addressed data word bit is used to form
the RLO. The content of the data word is not changed.
With a set/reset operation, the addressed data word bit is assigned the
value of the RLO. The content of the data word may be changed.
A
load operation transfers the contents of the referenced data word
into ACCU 1. The contents of a data word are not changed.
A transfer operation transfers data from ACCU 1 to the referenced
data word. The old contents of the data word are overwritten.
Data Blocks
CPU 928B Programming Guide
2 - 40 C79000-B8576-C898-01