EasyManua.ls Logo

Automationdirect.com DirectLOGIC DL205 Series

Automationdirect.com DirectLOGIC DL205 Series
587 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DL205 User Manual, 4th Edition, Rev. B
5–158
Chapter 5: Standard RLL Instructions - Table
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
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 Remove From Bottom.
The table pointer (V1400 in this case) will be decremented by “1” after each execution of the
RFB instruction.
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 one. The second data
location, V1402, will be used when the pointer is equal to
two, etc.
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
would cycle through the locations very quickly. If this is a
problem for your applicaton, you have an option of using
a one-shot (PD) to remove one value each time the input
contact transitions from low to high.
X1
Handheld Programmer Keystrokes
STR
$
SHFT
ANDST
L
3
D
SHFT
ORN
R
5
F
1
B
PREV
1
B
ENT
6
G
0
A
0
A
ENT
SHFT
ANDST
L
3
D
1
B
4
E
0
A
ENT
0
A
1
B
5
F
0
A
ENT
LD
K6
L
DA
0
1400
RFB
V
1500
Load the constant value 6
(HEX) into the lower 16 bits
o
f the accumulator
Convert octal 1400 to HEX
300 and load the value into
t
he accumulator. This is the
table pointer location
Copy the specified value from
the table to the specified
destination (V1500)
DirectSOFT
V1401
0 5 0 0
V1402
9999
V1403
3 0 7 4
V1404
8 9 8 9
V1405
1 0 1 0
V1406
2 0 4 6
V1407
XXXX
S
S
V1500
XXX X
1
2
3
4
5
6
Des tination
V1400
000 0
Table P ointerTa ble
LD
K6
C0
X1 C0
PD
Load the constant value 6
(HEX) i nto the l ow er 16 bits
of the accumulator
LDA
O 1400
Conver t octal 1400 to HEX
300 and load the value i nto
the accumulator . Thi s is the
table poi nter location.
LD
K6
C0
X1 C0
PD
Load the constant value 6
(HEX) i nto the l ow er 16 bits
of the accumulator
LDA
O 1400
Conver t octal 1400 to HEX
300 and load the value i nto
the accumulator . Thi s is the
table poi nter location.
DirectSOFT (optional one-shot method)

Table of Contents

Related product manuals