AutomationDirect C0-USER-M Manual page 60

Table of Contents

Advertisement

Chapter 2: Specifications
Memory Types (cont'd)
Pointer Addressing
The CLICK PLC allows the use of Pointer Addressing for flexibility in programming. The
Copy instruction supports Pointer Addressing in the single copy mode. The Pointer is always
assigned as a DS memory type and is designated as a Pointer by placing the DS memory type in
square brackets, such as [DS1]. Pointer Addressing uses the Pointer's data value to point to a
memory location within the range of one of the eligible memory types. Pointer Addressing can
be used with the DS, DD, DF, DH, XD, YD, TD, CTD and TXT data register memory types.
Pointer Addressing is also sometimes referred to as Indirect Addressing. One of the many uses
for Pointer Addressing would be to perform lookup in tables. An application example might
be determining the number of gallons in a horizontal tank when the liquid level is known. The
gallons could be determined by a rather complex math formula, but a simpler approach would
be to pre-calculate the number of gallons at several uniform levels, and place these values into
a table of data registers that can be accessed using Pointer Addressing.
Pointer Addressing Example
DS1 = 100; data register DS1 is assigned the value of 100.
Then the use of DD[DS1] would be the same as showing DD100.
As the value in DS1 is changed, the result would then point to a different DD data register.
In the example, data register DS1 is called a Pointer. Only a DS memory type can be used as a
pointer. As mentioned before, the use of the [square brackets] around DS1 in the data register
reference DD[DS1] is how the Pointer Addressing is designated.
2–17
CLICK PLC Hardware User Manual, 6th Edition, Rev. F – C0-USER-M

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the C0-USER-M and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

C0-01ac

Table of Contents