EasyManua.ls Logo

Siemens S5-100U - Page 200

Siemens S5-100U
512 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
S5-100U STEP 5 Operations
The result of the arithmetic operation is available in ACCU 1 for further processing. The contents of
ACCU 2 are not affected.
ExplanationSTL
L IW 92
L KH 00FF
AW
T QW 82
Load input word IW92 into ACCU 1.
Load a constant into ACCU 1. The previous contents of ACCU 1 are shifted
to ACCU 2.
Combine the contents of both accumulators bit by bit through logic AND.
Transfer the resulting contents from ACCU 1 to output word QW82.
Numeric Example
ACCU 2
ACCU 1
ACCU 1 1 0 0 1 1 1 0 0
AND
Result
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
15 0
0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 1 1 0 0 1 1 1 0 0
KH 00FF
IW92
Set the 8 high-order bits in input
word IW92 to “0”.
Compare both words bit by bit. If
corresponding bits are both “1”, the
result bit is set to “1”.
EWA 4NEB 812 6120-02
8-45

Table of Contents

Related product manuals