Opening Data Blocks - Siemens CPU 948 Programming Manual

Simatic s5 s5-155u
Table of Contents

Advertisement

Data Blocks
2.4.2

Opening Data Blocks

Validity of a data block
Access
2 - 38
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...
You want to open a DB data block Type in the STEP 5 operation
You want to open a DX 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.
You can access the data stored in the opened data block during
program execution using binary logic operations, set/reset
operations, 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.
THEN...
"C DB.."
Type in the STEP 5 operation
"CX DX."
CPU 948 Programming Guide
C79000-G8576-C848-04

Advertisement

Table of Contents
loading

Table of Contents