DL205 User Manual, 4th Edition, Rev. D
5-57
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Using Pointers
Many of the DL205 series instructions will allow V-memory pointers as an 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.
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.
V3000 (P3000) contains the value 400
Hex. 400 Hex. = 2000 Octal which
contains the value 2635.
LD
P3000
X1
OUT
V3100
Copy the data from the lower 16 bits of
the accumulator to V3100.
V3000
040 0
263 5
XXX X
XXX X
XXX X
XXX X
XXX X
V3100
263 5
V3101
XXX X
263 5
Accumulator
V2000
V2001
V2002
V2003
V2004
V2005
V3000 (P3000) contains the value 400
HEX = 2000 Octal which contains the
value 2635
LDA
O 2000
X1
OUT
V 3000
Copy the data from the lower 16 bits of
the accumulator to V3000
V3000
0400
2635
XXXX
XXXX
XXXX
XXXX
XXXX
V3100
2635
V3101
XXXX
LD
P 3000
OUT
V 3100
Copy the data from the lower 16 bits of
the accumulator to V3100
Load the lower 16 bits of the
accumulator with Hexadecimal
equivalent to Octal 2000 (400))
V3000
Acc.
2000
0400
0000 0400
2000 Octal is converted to Hexadecimal
400 and loaded into the accumulator
Accumulator
0000 2635
Unused accumulator bits
are set to zero
V2000
V2001
V2002
V2003
V2004
V2005