EasyManuals Logo

Siemens CPU 948 User Manual

Siemens CPU 948
548 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #140 background imageLoading...
Page #140 background image
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
Executive Operations
CPU 948 Programming Guide
3 - 68 C79000-G8576-C848-04

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens CPU 948 and is the answer not in the manual?

Siemens CPU 948 Specifications

General IconGeneral
BrandSiemens
ModelCPU 948
CategoryController
LanguageEnglish

Related product manuals