Remove from Table (RFT)
The Remove From Table instruction pops a value off of a table
230
and stores it in a V-memory location. When a value is removed
240
from the table all other values are shifted up 1 location. The
250-1
first V-memory location in the table contains the table length
260
counter. The table counter decrements by 1 each time the
instruction is executed. If the length counter is zero or greater
than the maximum table length (specified in the first level of
DS
Used
the accumulator stack) the instruction will not execute and
HPP Used
SP56 will be on.
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 by two
additional instructions. Listed below are the steps necessary to program the Remove From
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 length counter.) This parameter must be a
HEX value.
Step 3: Insert the RFT instructions which specifies destination V-memory location (Vaaa). This is
where the value will be moved to.
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 table counter
should be between 1 and 6. If the value is outside of this range or zero, the data will not be
moved from the table. 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.
Discrete Bit Flags
SP56
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 can be set to start anywhere in the table. It is not set automatically. You
have to load a value into the pointer somewhere in your program.
Chapter 5: Standard RLL Instructions - Table
Operand Data Type
V-memory
V
On when the table counter equals 0.
DL205 User Manual, 4th Edition, Rev. B
R F T
DL260 Range
aaa
All (See page 3 - 56)
Description
1
V
aaa
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
5–163
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?