Automationdirect.com DL05 User Manual page 240

Micro plc
Hide thumbs Also See for DL05:
Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions
Shuffle Digits (SFLDGT)
1
1
The Shuffle Digits instruction shuffles a maximum of 8 digits
DS5
Used
rearranging them in a specified order. This function requires
HPP
Used
2
2
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
3
3
following page shows a program for the Shuffle Digits function.
Step 1:— Load the value (digits) to be shuffled into the first level of the accumulator stack.
4
4
Step 2:— Load the order that the digits will be shuffled to into the accumulator.
Step 3:— Insert the SFLDGT instruction.
5
5
NOTE: If the number used to specify the order contains a 0 or 9-F, the corresponding position will
6
6
be set to 0.
Discrete Bit Flags
7
7
8
8
Shuffle Digits Block Diagram
9
9
There are a maximum of 8 digits that can be
shuffled. The bit positions in the first level of
the accumulator stack defines the digits to be
10
10
shuffled. They correspond to the bit positions in
the accumulator that define the order the digits will
11
11
be shuffled. The digits are shuffled and the result
resides in the accumulator.
12
12
13
13
14
14
A
a
b
B
C
c
D
D
5-94
DL05 Micro PLC User Manual, 6th Edition, Rev. D
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.
SFLDGT
Description
Digits to be
shuffled (first stack location)
9
A
B
C
1
2
8
7
Specified order (accumulator)
Bit Positions
8
7
6
5
B C
E
F
Result (accumulator)
D E
F
0
3
6
5
4
4
3
2
1
0
D A
9

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DL05 and is the answer not in the manual?

Table of Contents