Automationdirect.com DirectLOGIC DL205 Series User Manual page 389

Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions - Table
Handheld Programmer Keystrokes
1
$
STR
SHFT
2
SHFT
3
SHFT
V
AND
4
The example to the right shows a table of two words at V3000
and logically ORs it with K8888. The copy of the table at
5
V3100 shows the result of the OR operation for each word.
The program to the right performs the ORMOV example
6
above. It assumes that the data in the table at V3000 – V3001
already exists. First we load the table length (two words) into
7
the accumulator. Next we load the starting address of the
source table, using the LDA instruction. Then we load
the data into the accumulator to be ORed with the table.
8
In the ORMOV command, we specify the table
destination, V3100.
9
Handheld Programmer Keystrokes
10
$
STR
SHFT
11
SHFT
12
SHFT
Q
OR
13
The example to the right shows a table of two words at V3000
14
and logicall XORs it with K3333. The copy of the table at
V3100 shows the result of the XOR operation for each word.
A
The ladder program example for the XORMOV is similar to
the one above for the ORMOV. Just use the XORMOV
instruction. On the handheld programmer, you must use the
B
SHFT key and spell "XORMOV" explicitly.
C
D
5–172
DL205 User Manual, 4th Edition, Rev. B
A
ENT
0
L
D
C
PREV
ANDST
3
2
L
D
A
D
ANDST
3
0
3
L
D
G
PREV
ANDST
3
6
M
O
V
SHFT
AND
ORST
INST#
A
ENT
0
L
D
C
PREV
ANDST
3
L
D
A
D
ANDST
3
0
L
D
I
PREV
ANDST
3
M
O
V
SHFT
AND
ORST
INST#
ENT
A
A
A
ENT
0
0
0
G
G
G
ENT
6
6
6
D
B
A
A
3
1
0
0
ENT
2
A
A
A
ENT
3
0
0
0
I
I
I
ENT
8
8
8
8
D
B
A
A
3
1
0
0
DirectSOFT
X0
LD
Load the constant value 2
(Hex.) into the lower 16
bits of the accumulator.
LDA
Convert otal 3000 to HEX
ENT
and load the value into the
accumulator. This is the
table beginning.
LD
Load the constant value
6666 (Hex.) into the lower
16 bits of the accumulator.
ANDMOV
Copy the table to V3100,
ANDing its contents with the
accumulator as it is written.
V 3000
OR MOV
1 1 1 1
K 8888
1 1 1 1
DirectSOFT 32
X0
LD
Load the constant value 2
(Hex) into the lower 16 bits
of the accumulator.
LDA
0 3000
ENT
Convert octal 3000 to HEX
and load the value into the
accumulator. This is the
table beginning.
LD
Load the constant value
8888 (Hex.) into the lower
16 bits of the accumulator.
ORMOV
0 3100
Copy the table to V3100,
ORing its contents with the
accumulator as it is written.
V 3000
X OR MOV
1 1 1 1
K 3333
1 1 1 1
K2
0 3000
K6666
0 3100
V 3100
9 9 9 9
9 9 9 9
K2
K8888
V 3100
2 2 2 2
2 2 2 2

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