Automationdirect.com DirectLOGIC DL205 Series User Manual page 377

Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions - Table
Source to Table (STT)
1
The Source To Table instruction moves a value from a
230
V-memory location into a V-memory table and increments a
240
table pointer by 1. When the table pointer reaches the end of
2
250-1
the table, it resets to 1. The first V-memory location in the
260
table contains the table pointer which indicates the next
3
location in the table to store a value. The instruction will be
executed once per scan provided the input remains on. The
DS
Used
function parameters are loaded into the first level of the
4
HPP Used
accumulator stack and the accumulator with two additional
instructions. Listed below are the steps necessary to program
5
the Source To Table function.
Step 1: Load the length of the table (number of V-memory locations) into the firstlevel of the
6
Step 2:Load the starting V-memory location for the table into the accumulator. (Remember, the
7
Step 3:Insert the STT instruction which specifies the source V-memory location (Vaaa). This is where
8
Helpful hint: — For parameters that require HEX values when referencing memory locations,
9
the LDA instruction can be used to convert an octal address to the HEX equivalent and load
the value into the accumulator.
10
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.
11
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
12
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.
13
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.
14
A
Discrete Bit Flags
B
SP56
C
NOTE: Status flags (SPs) are only valid until:
— another instruction that uses the same flag is executed, or
— the end of the scan
D
The pointer for this instruction starts at 0 and resets to 1 automatically when the table length is reached.
5–160
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.
the value will be moved from.
Operand Data Type
V-memory
On when the table pointer equals the table length.
DL260 Range
aaa
V
All (See page 3 - 56)
Description
ST T
V
aaa

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?

Table of Contents

Save PDF