In the following example, when X1 is on, the constant value (K6) is loaded into the
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), which is the starting location for the destination table and table
pointer, is loaded into the accumulator. The data source location (V1500) is specified in the
Source to Table instruction. The table pointer will be increased by "1" after each time the
instruction is executed.
DirectSOFT
Handheld Programmer Keystrokes
$
STR
SHFT
SHFT
SHFT
It is important to understand how the table locations are
numbered. If you examine the example table, you'll notice
that the first data storage location, V1401, will be used
when the pointer is equal to zero, and again when the
pointer is equal to six. Why? Because the pointer is only
equal to zero before the very first execution. From then
on, it increments from one to six, and then resets to one.
Also, our example uses a normal input contact (X1) to
control the execution. Since the CPU scan is extremely
fast, and the pointer increments automatically, the source
data would be moved into all the table locations very
quickly. If this is a problem for your applicaton, you have
an option of using a one-shot (PD) to move one value
each time the input contact transitions from low to high.
Chapter 5: Standard RLL Instructions - Table
X1
LD
K6
Load the constant value 6
(HEX) into the the lower 16 bits
of the accumulator
LDA
0 1400
Convert octal 1400 to HEX
300 and load the value into
the accumulator
STT
V1500
Copy the specified value
from the source location
(V1500) to the table
B
ENT
1
L
D
G
PREV
ANDST
3
6
L
D
A
B
ANDST
3
0
1
S
T
T
SHFT
RST
MLR
MLR
DL205 User Manual, 4th Edition, Rev. B
ENT
E
A
A
ENT
4
0
0
B
F
A
A
ENT
1
5
0
0
Table
X
X
X
X
V1401
V1402
X
X
X
X
X
X
X
X
V1403
X
X
X
X
V1404
V1405
X
X
X
X
X
X
X
X
V1406
X
X
X
X
V1407
S
S
DirectSOFT
(optional one-shot method)
X1
C0
1
2
3
4
5
6
7
8
9
10
11
Table Pointer
12
0 6
0
0
0
0
V1400
1
Data S ource
2
0
5
0
0
V1500
13
3
4
5
14
A
C0
PD
LD
B
K6
Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
C
LDA
O 1400
Convert octal 1400 to HEX
300 and load the value into
D
the accumulator. This is the
starting table location.
5–161
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?