Chapter 5: Standard RLL Instructions - Table
In the following example, when X1 is on, the constant value (K6) is loaded into the
1
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400) is the starting location for the source table and is loaded into the
2
accumulator. The destination location (V1500) is specified in the Remove from Table
instruction. The table counter will be decreased by "1" after the instruction is executed.
3
4
5
6
7
8
9
10
11
Since the table counter specifies the range of data
that will be removed from the table, it is important
12
to understand how the table locations are
numbered. If you examine the example table, you'll
notice that the data locations are numbered from
13
the top of the table. For example, if the table
counter started at 6, then all six of the locations
14
would be affected during the instruction execution.
A
Also, our example uses a normal input contact (X1)
to control the execution. Since the CPU scan is
B
extremely fast, and the pointer decrements
automatically, the data would be removed from the
table very quickly. If this is a problem for your
C
applicaton, you have an option of using a one-shot
(PD) to remove one value each time the input contact
D
transitions from low to high.
5–164
DL205 User Manual, 4th Edition, Rev. B
DirectSOFT
X1
LD
K6
LDA
O 1400
RFT
V1500
Handheld Programmer Keystrokes
$
B
ENT
STR
1
L
D
SHFT
ANDST
3
L
D
A
SHFT
ANDST
3
0
R
F
T
SHFT
ORN
5
MLR
Load the constant value 6
(Hex.) into the lower 16 bits
of the accumulator
Convert octal 1400 to HEX
300 and load the value into
the accumulator
Copy the specified value
from the table to the
specified location (V1500)
G
PREV
ENT
6
B
E
A
1
4
0
B
F
A
1
5
0
V1401
V1402
V1403
V1404
V1405
V1406
V1407
A
ENT
0
A
ENT
0
Table
Table C ounter
0
5
0
0
1
0
0
0
6
9
9
9
9
2
Des tination
3
0
7
4
3
X
X
X
X
8
9
8
9
4
1
0
1
0
5
2
0
4
6
6
X
X
X
X
S
S
DirectSOFT
(optional one-shot method)
X1
C0
LD
K6
Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
LDA
O 1400
Convert octal 1400 to HEX
300 and load the value into
the accumulator. This is the
table pointer location.
V1400
V1500
C0
PD
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?