Conversion Operations - Siemens SIMATIC S5 Manual

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

S5-115F Manual
3.2.6

Conversion Operations

Conversion operations convert the values in ACCUM 1. Table 3-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 ( 3.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
EWA 4NEB 811 6149-02
Table 3-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
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 DW 12 is to maintain
its previous effect, DW 12 must be
0
inverted.
STEP 5 Operations
3-51

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents