DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-140
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
In the following example, when X1 is on, the value in the first level of the accumulator stack
will be reorganized in the order specified by the value in the accumulator.
Example A shows how the shuffle digits works when 0 or 9–F is not used when specifying the
order the digits are to be shuffled. Also, there are no duplicate numbers in the specified order.
Example B shows how the Shuffle Digits works when a 0 or 9–F is used when specifying the
order the digits are to be shuffled. Notice when the Shuffle Digits instruction is executed, the
bit positions in the first stack location that had a corresponding 0 or 9–F in the accumulator
(order specified) are set to “0”.
Example C shows how the Shuffle Digits works when duplicate numbers are used specifying
the order the digits are to be shuffled. Notice when the Shuffle Digits instruction is executed,
the most significant duplicate number in the order specified is used in the result.
DEF09ABC
Handheld Programmer Keystrokes
Direct
SOFT32
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
LDD
V2006
Load the value in V2006 and
V2007 into the accumulator
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V201
1
SFLDGT
Shuf fle the digits in the first
level of the accumulator
stack based on the pattern
in the accumulator. The
result is in the accumulator .
V2010
Acc.
0DA 9
9AB C DE F 0
V201
1
BCE F
Acc.
365 4
128 7 365 4
128 7
Acc.
BCE F 0DA 9
V2000V2001
V2006V2007
CBA90FED
V2010
Acc.
EDA 9
0FE D CBA 9
V201
1
000 0
Acc.
002 1
004 3 002 1
004 3
Acc.
000 0 EDA 9
V2000V2001
V2006V2007
DEF09ABC
V2010
Acc.
9AB C
9AB C DEF 0
V201
1
000 0
Acc.
432 1
432 1 432 1
432 1
Acc.
000 0 9AB C
V2000V2001
V2006V2007
ABC
Original
bit
Positions
43218765
43218765
43218765
Specified
order
43218765
43218765
43218765
New bit
Positions
43218765
43218765
43218765
STR
$
SHFT
ANDST
L
3
D
3
D
SHFT
ANDST
L
3
D
3
D
SHFT
RST
S
5
F
ANDST
L
3
D
6
G
MLR
T
ENT
OUT
GX
SHFT
3
D
1
B
ENT
2
C
0
A
0
A
0
A
ENT
2
C
0
A
0
A
ENT
6
G
2
C
0
A
1
B
0
A
ENT
SHFT
DirectSOFT