Conversion Operations - Siemens SIMATIC S5-100U System Manual

Simatic s5 series cpu 100/102/103
Hide thumbs Also See for SIMATIC S5-100U:
Table of Contents

Advertisement

STEP 5 Operations
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.
Table 8-16. Overview of Conversion Operations
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
Load the contents of data word DW12 into ACCU 1.
L
DW 12
Invert all bits in ACCU 1.
CFW
Transfer the new contents of ACCU 1 to output word QW20.
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
8-50
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
Explanation
Numeric Example
DW12
0
1 0 0 1 1 1 0 0
CFW
0
Meaning
In a system, normally open contacts
have been replaced by normally
closed contacts. If the information in
data word DW12 is to maintain its
previous effect, DW12 must be
inverted.
EWA 4NEB 812 6120-02b
S5-100U

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents