Siemens SIMATIC S5-95F Manual page 228

Table of Contents

Advertisement

STEP 5 Operations
STL
L
DW 2
SLW 3
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
L
IW 124
SRW 4
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
8-48
Load the contents of data word DW2 into ACCU 1.
Shift the bit pattern in ACCU 1 three positions to the left.
Transfer the result (contents of ACCU 1) to data word DW3.
Numeric Example
464
(DW2)
10
1 1 0 1 0 0 0 0
SLW 3
3712
10
Load the value of input word IW124 into ACCU 1.
Shift the bit pattern in ACCU 1 four positions to the right.
Transfer the result (contents of ACCU 1) to output word QW126.
Numeric Example
352
(IW124)
10
0 1 1 0 0 0 0 0
22
10
Explanation
The value 464
0
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.
0
Explanation
The value 352
0
Shift the corresponding bit pattern in
ACCU 1 four positions to the right to
divide the value 352
0
S5-95F
is stored in data
10
is stored in IW124.
10
4
by 2
= 16.
10
EWA 4NEB 812 6210-02

Advertisement

Table of Contents
loading

Table of Contents