Conversion 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

STEP 5 Operations
8.2.6

Conversion Operations

Conversion operations convert the values in ACCUM 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
Load the contents of data word DW 12 into ACCUM 1.
CFW
Invert all bits in ACCUM 1.
T
QW 20
Transfer the new contents of ACCUM 1 to output word QW 20.
15
ACCUM 1
0 1 1 1 0 0 0 1
15
ACCUM 1
1 0 0 0 1 1 1 0 0 1 1 0 0 0 1 1
8-50
Table 8-16. Overview of Conversion Operations
One's complement
The contents of ACCUM 1 are inverted bit by bit.
Two's complement
The contents of ACCUM 1 are inverted bit by bit. Afterwards the
word 0001
is added.
H
Numeric Example
DW 12
0
1 0 0 1 1 1 0 0
CFW
0
Meaning
Explanation
In a system, normally open contacts
have been replaced by normally
closed contacts. If the information
in data word DW 12 is to maintain
its previous effect, DW 12 must be
inverted.
S5-115U Manual
EWA 4NEB 811 6130-02b

Advertisement

Table of Contents
loading

Table of Contents