Siemens SIMATIC S5-90U System Manual page 217

Table of Contents

Advertisement

S5-90U/S5-95U
STL
Load the contents of data word DW2 into ACCU 1.
L
DW 2
Shift the bit pattern in ACCU 1 three positions to the left.
SLW 3
Transfer the result (contents of ACCU 1) to data word DW3.
T
DW 3
15
ACCU 1
0 0 0 0 0 0 0 1
15
ACCU 1
0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0
STL
Load the value of input word IW124 into ACCU 1.
L
IW 124
Shift the bit pattern in ACCU 1 four positions to the right.
SRW 4
Transfer the result (contents of ACCU 1) to output word QW126.
T
QW 126
15
ACCU 1
0 0 0 0 0 0 0 1
SRW 4
15
ACCU 1
0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0
EWA 4NEB 812 6115-02b
Numeric Example
464
(DW2)
10
0
1 1 0 1 0 0 0 0
SLW 3
3712
10
0
Numeric Example
352
(IW124)
10
0
0 1 1 0 0 0 0 0
22
10
0
Explanation
The value 464
is stored in data
10
word DW2. Multiply this value by
3
2
=8. Do so by shifting the bit
pattern of DW2 in ACCU 1 three
positions to the left.
Explanation
The value 352
is stored in IW124.
10
Shift the corresponding bit pattern in
ACCU 1 four positions to the right to
divide the value 352
STEP 5 Operations
4
by 2
= 16.
10
8-49

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s5-95u

Table of Contents