Conversion Operations - Siemens SIMATIC S5-95F Manual

Table of Contents

Advertisement

S5-95F
8.2.6

Conversion Operations

Conversion operations convert the values in ACCU 1. Table 8-16 provides an overview of the
conversion operations. Examples follow the table.
Operation
Operand
CFW
CSW
Processing Conversion Operations
Execution of these operations does not depend on the RLO nor does it affect the RLO.
The "CSW" operation sets the condition codes (see section 8.4).
STL
L
DW 12
CFW
T
QW 20
15
ACCU 1
0 1 1 1 0 0 0 1
15
ACCU 1
1 0 0 0 1 1 1 0 0 1 1 0 0 0 1 1
EWA 4NEB 812 6210-02
Table 8-16. Overview of Conversion Operations
One's complement
The contents of ACCU 1 are inverted bit by bit.
Two's complement
The contents of ACCU 1 are inverted bit by bit. Afterwards the word
0001
is added.
H
Load the contents of data word DW12 into ACCU 1.
Invert all bits in ACCU 1.
Transfer the new contents of ACCU 1 to output word QW20.
Numeric Example
DW12
1 0 0 1 1 1 0 0
CFW
Meaning
Explanation
In a system, normally open contacts
0
have been replaced by normally
closed contacts. If the information in
data word DW12 is to maintain its
previous effect, DW12 must be
0
inverted.
STEP 5 Operations
8-49

Advertisement

Table of Contents
loading

Table of Contents