Automationdirect.com DirectLOGIC DL205 Series User Manual page 375

Table of Contents

Advertisement

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. 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 Remove From Bottom.
3
The table pointer (V1400 in this case) will be decremented by "1" after each execution of the
RFB instruction.
4
5
6
7
8
9
10
11
12
It is important to understand how the table locations are
13
numbered. If you examine the example table, you'll
notice that the first data location, V1401, will be used
14
when the pointer is equal to one. The second data
location, V1402, will be used when the pointer is equal to
two, etc.
A
B
Also, our example uses a normal input contact (X1) to
control the execution. Since the CPU scan is extremely
fast, and the pointer decrements automatically, the table
C
would cycle through the locations very quickly. If this is a
problem for your applicaton, you have an option of using
D
a one-shot (PD) to remove one value each time the input
contact transitions from low to high.
5–158
DL205 User Manual, 4th Edition, Rev. B
DirectSOFT
X1
LD
K6
Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
LDA
0 1400
Convert octal 1400 to HEX
300 and load the value into
the accumulator. This is the
table pointer location
RFB
V1500
Copy the specified value from
the table to the specified
destination (V1500)
Handheld Programmer Keystrokes
$
B
ENT
STR
1
L
D
SHFT
PREV
ANDST
3
L
D
A
SHFT
ANDST
3
0
R
F
B
SHFT
ORN
5
1
G
ENT
6
B
E
A
A
ENT
1
4
0
0
B
F
A
A
ENT
1
5
0
0
V1401
V1402
V1403
V1404
V1405
V1406
V1407
DirectSOFT (optional one-shot method)
X1
X1
C0
C0
Table
Table Pointer
0
5
0
0
1
0
0
0
0
V1400
9
9
9
9
2
Des tination
3
0
7
4
3
X
X
X
X
V1500
8
9
8
9
4
1
0
1
0
5
2
0
4
6
6
X
X
X
X
S
S
C0
C0
PD
PD
LD
LD
K6
K6
Load the constant value 6
Load the constant value 6
(HEX) into the lower 16 bits
(HEX) into the lower 16 bits
of the accumulator
of the accumulator
LDA
LDA
O 1400
O 1400
Convert octal 1400 to HEX
Convert octal 1400 to HEX
300 and load the value into
300 and load the value into
the accumulator. This is the
the accumulator. This is the
table pointer location.
table pointer location.

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?

Table of Contents

Save PDF