DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-156
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Listed below are the steps necessary to program the Source To Table function.
Step 1: Load the length of the table (number of V-memory locations) into the first level
of the accumulator stack. This parameter must be a HEX value, 0 to FF.
Step 2: Load the starting V-memory location for the table into the accumulator.
(Remember, the starting location of the table is used as the table pointer.) This
parameter must be a HEX value.
Step 3: Insert the STT instruction which specifies the source V-memory location
(Vaaa). This is where the value will be moved from.
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
the value into the accumulator.
Helpful Hint:
— The instruction will be executed every scan if the input logic is on. If you do
not want the instruction to execute for more than one scan, a one-shot (PD) should be used in
the input logic.
Helpful Hint:
— The table counter value should be set to indicate the starting point for the
operation. Also, it must be set to a value that is within the length of the table. For example, if
the table is 6 words long, then the allowable range of values that could be in the pointer should
be between 0 and 6. If the value is outside of this range, the data will not be moved. Also, a
one-shot (PD) should be used so the value will only be set in one scan and will not affect the
instruction operation.
NOTE: Status flags (SPs) are only valid until another instruction that uses the same flag is executed,
or the end of the scan. The pointer for this instruction starts at 0 and resets to 1 automatically when
the table length is reached.
aaa
V
S T T
Operand Data Type
DL06 Range
A
aaa
V-memory
V
See memory map
Discrete Bit Flags
Description
SP56
On when the table pointer equals the table length.
DS
Used
HPP Used
Source to Table (STT)
The Source To Table instruction moves a value from a V-memory
location into a V-memory table and increments a table pointer by
1. When the table pointer reaches the end of the table, it resets
to 1. The first V-memory location in the table contains the table
pointer which indicates the next location in the table to store a
value. The instruction will be executed once per scan, provided
the input remains on. The function parameters are loaded into
the first level of the accumulator stack and the accumulator with
two additional instructions.y