Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data
Using Pointers
Many of the DL205 series instructions will allow V-memory pointers as a operand. Pointers
can be useful in ladder logic programming, but can be difficult to understand or implement
in your application if you do not have prior experience with pointers (commonly known as
indirect addressing). Pointers allow instructions to obtain data from V-memory locations
referenced by the pointer value.
NOTE: In the DL205 V-memory addressing is in octal. However the value in the pointer location which will
reference a V-memory location is viewed as HEX. Use the Load Address instruction to move an address
into the pointer location. This instruction performs the Octal to Hexadecimal conversion for you.
The following example uses a pointer operand in a Load instruction. V-memory location
3000 is the pointer location. V3000 contains the value 400 which is the HEX equivalent of
the Octal address V-memory location V2000. The CPU copies the data from V2000 into the
lower word of the accumulator.
X1
V3000 (P3000) contains the value 400
Hex. 400 Hex. = 2000 Octal which
contains the value 2635.
Copy the data from the lower 16 bits of
the accumulator to V3100.
The following example is similar to the one above, except for the LDA (load address)
instruction which automatically converts the Octal address to the Hex equivalent.
X1
LDA
O 2000
OUT
V 3000
LD
P 3000
OUT
V 3100
LD
P3000
OUT
V3100
Load the lower 16 bits of the
accumulator with Hexadecimal
equivalent to Octal 2000 (400))
Copy the data from the lower 16 bits of
the accumulator to V3000
V3000 (P3000) contains the value 400
HEX = 2000 Octal which contains the
value 2635
Copy the data from the lower 16 bits of
the accumulator to V3100
DL205 User Manual, 4th Edition, Rev. B
V2000
V2001
V2002
V2003
V3000
0
4
0
0
V2004
V2005
V3100
V3101
2
0
Unused accumulator bits
are set to zero
0
0
0
0
0
4
Acc.
0
4
V3000
2
6
V2000
X
X
V2001
X
X
V2002
X
X
V3000
V2003
0
4
0
0
X
X
V2004
X
X
V2005
2
6
V3100
X
X
V3101
2
6
3
5
X
X
X
X
X
X
X
X
X
X
X
X
Accumulator
X
X
X
X
X
X
X
X
2
6
3
5
2
6
3
5
X
X
X
X
0
0
2000 Octal is converted to Hexadecimal
400 and loaded into the accumulator
0
0
0
0
3
5
X
X
X
X
Accumulator
X
X
0
0
0
0
2
6
3
5
X
X
X
X
3
5
X
X
5–57
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?