Technical data
Examples of DO operations
DO DW/DO FW
Operand substitution
Using the statements "DO DW" and "DO FW" you can access data with
a substitution, e.g. in a program loop. The substituted access consists of
the statement DO DW/DO FW followed immediately by one of the
STEP 5 operations listed above.
"Substituted" means that the operand for the operation is not programmed
as a static value but is fixed during the course of the STEP 5 program.
Select the operand
type from the range permitted for the operation when
you write your program, e.g.
PB for the operation "JU PB nn":
You must first load the operand
value (nn in the example) in a data word
or F flag word (parameter word) before the substituted access with
DO DW/DO FW.
1. Principle of substitution:
:L KF +120
:T FW 14 load FW with the value "KF +120"
:DO FW 14
:L IB 0
before the operation "L IB" is executed,
the operand value ’0’ is replaced by the value
’120’;
Operation executed: L IB 120
2. Data word as index register:
The contents of data words DW 20 to DW 100 are set to signal state ’0’.
The index register for the parameter of the data words is DW 1.
:L KF +20 supply the index register
:T DW 1
M001 :L KF +0 reset
:DO DW 1
:T DW 0
:L DW 1 increment the index register
:L KF +1
:+F
:T DW 1
:L KF +100
:<=F
:JC =M001 jump if the index is within the range
... remaining STEP 5 program
Continued on next page
3
Executive Operations
CPU 928B Programming Guide
C79000-B8576-C898-01
3 - 67