Siemens SIMATIC S5-115U User Manual page 245

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

S5-115U Manual
The result of the arithmetic operation is available in ACCUM 1 for further processing. The
contents of ACCUM 2 are not affected.
STL
L
IW 92
Load input word IW 92 into ACCUM 1.
L
KH 00FF
Load a constant into ACCUM 1. The previous contents of ACCUM 1 are
shifted to ACCUM 2.
AW
Combine the contents of both accumulators bit by bit through logic AND.
T
QW 82
Transfer the resulting contents from ACCUM 1 to output word QW 82.
15
0 1 1 1 0 0 0 1 1 0 0 1 1 1 0 0
ACCUM 2
ACCUM 1
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
ACCUM 1
0 0 0 0 0 0 0 0
EWA 4NEB 811 6130-02b
Explanation
Numeric Example
IW 92
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 IW 90 to "0".
Compare both words bit by bit. If
corresponding bits are both "1", the
result bit is set to "1".
8-45

Advertisement

Table of Contents
loading

Table of Contents