DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-139
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Step 1: Load the value (digits) to be shuffled into the first level of the accumulator
stack.
Step 2: Load the order that the digits will be shuffled to into the accumulator.
Step 3: Insert the SFLDGT instruction.
NOTE: If the number used to specify the order contains a 0 or 9–F, the corresponding position
will be set to 0.
Shuffle Digits Block Diagram
There are a maximum of 8 digits that can be shuffled. The bit positions in the first level of the
accumulator stack define the digits to be shuffled. They correspond to the bit positions in the
accumulator that define the order the digits will be shuffled. The digits are shuffled and the
result resides in the accumulator.
Digits to be
shuffled (first stack location)
Specified order (accumulator)
D E
F
0
9 A B C
3 6 5
4
1 2 8
7
Result (accumulator)
0 D A 9
B C E
F
4 3 2
1
8 7 6
5
Bit Positions
SFLDGT
Discrete Bit Flags
Description
SP63
On when the result of the instruction causes the value in the accumulator to be zero.
SP70
On anytime the value in the accumulator is negative.
DS
Used
HPP Used
Shuffle Digits (SFLDGT)
The Shuffle Digits instruction shuffles a maximum of 8 digits,
rearranging them in a specified order. This function requires
parameters to be loaded into the first level of the accumulator
stack and the accumulator with two additional instructions.
Listed below are the steps necessary to use the shuffle digit
function. The example on the following page shows a program
for the Shuffle Digits function.