Chapter 5: Standard RLL Instructions - Table
Table to Destination (TTD)
1
The Table To Destination instruction moves a value from a
230
V-memory table to a V-memory location and increments the
240
table pointer by 1. The first V-memory location in the table
2
250-1
contains the table pointer which indicates the next location in
260
the table to be moved. The instruction will be executed once
3
per scan provided the input remains on. The table pointer will
reset to 1 when the value equals the last location in the table.
DS
Used
The function parameters are loaded into the first level of the
4
HPP Used
accumulator stack and the accumulator by two additional
instructions. Listed below are the steps necessary to program
5
the Table To Destination function.
Step 1: Load the length of the data table (number of V-memory locations) into the first level of the
6
Step 2: Load the starting V-memory location for the table into the accumulator. (Remember, the
7
Step 3: Insert the TTD instruction which specifies destination V-memory location (Vaaa).
8
Helpful hint: — For parameters that require HEX values when referencing memory locations,
the LDA instruction can be used to convert an octal address to the HEX equivalent and load
9
the value into the accumulator.
Helpful hint: — The instruction will be executed every scan if the input logic is on. If you do
10
not want the instruction to execute for more than one scan, a one shot (PD) should be used
in the input logic.
11
Helpful hint: — The pointer location should be set to the value where the table operation
will begin. The special relay SP0 or a one shot (PD) should be used so the value will only be
set in one scan and will not affect the instruction operation.
12
13
14
Discrete Bit Flags
SP53
A
NOTE: Status flags (SPs) are only valid until:
— another instruction that uses the same flag is executed, or
B
— the end of the scan.
C
The pointer for this instruction starts at 0 and resets when the table length is reached. At first glance it may
appear that the pointer should reset to 0. However, it resets to 1, not 0.
D
5–154
DL205 User Manual, 4th Edition, Rev. B
accumulator stack. This parameter must be a HEX value, 0 to FF.
starting location of the table is used as the table pointer.) This parameter must be a HEX
value.
Operand Data Type
V-memory
On if there is no value in the table that is equal to the search value.
DL260 Range
aaa
V
All (See page 3 - 56)
Description
TTD
TTD
V
aaa
aaa
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?