Other Operations - Siemens SIMATIC S5-115U User Manual

Simatic s5 series cpu 941-7ub11 cpu 942-7ub11 cpu 943-7ub11 and cpu 943-7ub21 cpu 944-7ub11 and cpu 944-7ub21
Table of Contents

Advertisement

S5-115U Manual
Example
Decrement the constant 1020
and store the result in flag word
FW 28. Afterwards add the constant
256 to the result and store the sum in
flag word FW 30.
8.3.5

Other Operations

Tables 8-30 and 8-31 provide an overview of the remaining system operations. Each table is
followed by processing information.
Operation
Operand
DI
Processing
The "DI" operation works like the other processing operations. In contrast to "DO DW" or
"DO FW", a formal operand is indexed for this operation. The statement that is executed by "DI"
refers to the formal operand specified. However, the formal operand is not specified by its
designation. You must load the "location number" of the formal operand in the parameter list
into ACCUM 1 before the "DI" statement.
EWA 4NEB 811 6130-02b
STL
by 33
L
KH 1020
H
ADD BN -33
T
FW 28
ADD KF
256
T
FW 30
Table 8-30. Processing Operation
Process indirectly
A formal operand indexes an operation; when the operation is
executed, the block parameter is processed. Its number is in
ACCUM 1.
STEP 5 Operations
Explanation
The constant 1020
H
ACCUM 1.
The constant -33
10
the ACCUM contents.
The new ACCUM contents
(0FFF
) are stored in flag word
H
FW 28.
The constant 256
10
the last result.
The new ACCUM contents
(10FF
) are stored in flag word
H
FW 30.
Meaning
is loaded into
is added to
is added to
8-71

Advertisement

Table of Contents
loading

Table of Contents