Automationdirect.com DirectLOGIC DL205 Series User Manual page 342

Table of Contents

Advertisement

Shift Right (SHFR)
Shift Right is a 32-bit instruction that shifts the bits in the
230
accumulator a specified number (Aaaa) of places to the right.
240
The vacant positions are filled with zeros and the bits shifted
250-1
out of the accumulator are lost.
260
Operand Data Type
A
V-memory
V
All (See page 3 - 53)
Constant
K
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The bit pattern in the accumulator is
shifted 10 bits to the right using the Shift Right instruction. The value in the accumulator is
copied to V2010 and V2011 using the Out Double instruction.
DS
Used
HPP Used
Direct SOFT
X1
LDD
V2000
Load the value in V2000 and
V2001 into the accumulator
SHFR
K10
The bit pattern in the
accumulator is shifted 10 bit
positions to the right
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V201 1
Handheld Programmer Keystrokes
$
B
ENT
STR
1
L
D
D
SHFT
ANDST
3
3
S
H
SHFT
SHFT
RST
7
GX
D
SHFT
OUT
3
Chapter 5: Standard RLL Instructions - Bit Operation
DL230 Range
DL240 Range
aaa
All (See page 3 - 54)
1-32
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
0
1 1 0
0 1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0
0 0 0
0 0 0
0
0 0 0
0 1
Acc.
C
A
A
A
2
0
0
0
B
F
R
A
1
5
ORN
0
C
A
B
A
ENT
2
0
1
0
DL250-1 Range
aaa
aaa
All (See page 3 - 55)
1-32
1-32
V2001
V2000
Constant 6
7
0
5
3
1
0
15 14 13 12 11 10 9 8 7 6 5
1 1
0 0 0
0 0 1 0 1
0 0 1
15 14 13 12 11 10 9 8
0
0 0 0
1
1
0
0
1
1
1
0 0 0 0 0 1
0 0 0 0 0
0 0 0 0 0
0
0
1
9
V2011
ENT
ENT
DL205 User Manual, 4th Edition, Rev. B
SHFR
A aaa
DL260 Range
aaa
All (See page 3 - 56)
1-32
1
4 3 2 1
0
1 0 0 0 1
0 0 0 0 0 0 0 1
Shifted out of the
accumulator
7 6 5
4 3 2 1 0
0
1 0 0
1 1 0 0
C
1
4
C
V2010
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
5–125

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?

Table of Contents

Save PDF