Automationdirect.com DirectLOGIC DL205 Series User Manual page 372

Table of Contents

Advertisement

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) is the starting location for the source table and is loaded into the
accumulator. Remember, V1400 is used as the pointer location, and is not actually part of the
table data source. The destination location (V1500) is specified in the Table to Destination
instruction. The table pointer (V1400 in this case) will be increased by "1" after each
execution of the TTD instruction.
DirectSOFT
X1
Handheld Programmer Keystrokes
$
STR
L
SHFT
ANDST
L
SHFT
ANDST
T
SHFT
MLR
It is important to understand how the table locations
are numbered. If you examine the example table,
you'll notice that the first data 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 table
would cycle through the locations very quickly. If this is a
problem, you have an option of using SP56 in
conjunction with a one-shot (PD) and a latch (C1 for
example) to allow the table to cycle through all locations
one time and then stop. The logic shown here is not
required, it's just an optional method.
Chapter 5: Standard RLL Instructions - Table
Load the constant value 6
LD
(HEX) into the lower 16 bits
K6
of the accumulator
Convert octal 1400 to HEX
LDA
300 and load the value into
0 1400
the accumulator. This is the
table pointer location
Copy the specified value from
TTD
the table to the specified
destination (V1500)
V1500
B
ENT
1
D
G
PREV
3
6
D
A
B
3
0
1
T
D
B
MLR
3
1
DL205 User Manual, 4th Edition, Rev. B
ENT
E
A
A
ENT
4
0
0
F
A
A
ENT
5
0
0
Table
0
5
0
0
0 6
V1401
V1402
9
9
9
9
3
0
7
4
V1403
8
9
8
9
V1404
V1405
1
0
1
0
2
0
4
6
V1406
X
X X
X
V1407
.
.
DirectSOFT
Display (optional latch example using SP56)
X1
C1
C0
SP56
Since Special Relays are
reset at the end of the scan,
this latch must follow the TTD
instruction in the program.
Table Pointer
0
0
0
0
V1400
1
Destination
2
X
X X
X
V1500
3
4
5
C0
PD
LD
K6
Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
C1
SET
C1
RST
5–155
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF