Siemens SIMATIC S5 Manual page 146

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

STEP 5 Operations
STL
L
DW 2
SLW 3
T
DW 3
15
ACCUM 1
0 0 0 0 0 0 0 1
15
ACCUM 1
0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0
STL
L
IW 128
SRW 4
T
QW 160
15
ACCUM 1
0 0 0 0 0 0 0 1
SRW 4
15
ACCUM 1
0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0
3-50
Load the contents of data word DW 2 into ACCUM 1.
Shift the bit pattern in ACCUM 1 three positions to the left.
Transfer the result (contents of ACCUM 1) to data word DW 3.
Numeric Example
464
(DW 2)
10
1 1 0 1 0 0 0 0
SLW 3
3712
10
Load the value of input word IW 128 into ACCUM 1.
Shift the bit pattern in ACCUM 1 four positions to the right.
Transfer the result (contents of ACCUM 1) to output word QW 160.
Numeric Example
352
(IW 128)
10
0 1 1 0 0 0 0 0
22
10
Explanation
The value 464
0
word DW 2. Multiply this value by
3
2
=8. Do so by shifting the bit
pattern of DW 2 in ACCUM 1 three
positions to the left.
0
Explanation
The value 352
0
Shift the corresponding bit pattern
in ACCUM 1 four positions to the
right to divide the value 352
4
2
= 16.
0
S5-115F Manual
is stored in data
10
is stored in IW 128.
10
by
10
EWA 4NEB 811 6149-02

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents