Siemens SIMATIC S5-100U System Manual page 203

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

Advertisement

S5-100U
The result of the arithmetic operation is available in ACCU 1 for further processing. The contents of
ACCU 2 are not affected.
STL
Load input word IW92 into ACCU 1.
L
IW 92
Load a constant into ACCU 1. The previous contents of ACCU 1 are shifted
L
KH 00FF
to ACCU 2.
Combine the contents of both accumulators bit by bit through logic AND.
AW
Transfer the resulting contents from ACCU 1 to output word QW82.
T
QW 82
15
0 1 1 1 0 0 0 1 1 0 0 1 1 1 0 0
ACCU 2
ACCU 1
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
ACCU 1
0 0 0 0 0 0 0 0
EWA 4NEB 812 6120-02b
Explanation
Numeric Example
IW92
0
AND
KH 00FF
Result
1 0 0 1 1 1 0 0
STEP 5 Operations
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".
8-45

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents