Shift Register Instructions
Chapter 13
136
To program a Shift File Down instruction press keys [SHIFT] [REG] 11.
The format that appears and the technique for insertion of numbers, will be
identical to that for Shift File Up (Figures 13.3 and 13.4) except that the
title will read Shift File Down.
The procedure for using the data monitor mode to monitor/edit file data is
presented in Chapter 12.
These two output instructions are used together to construct an
asynchronous word shift register (Figure 13.2). Upon false-true transition
of rung decision, FIFO Load transfers data from a specified input address
into the file. Upon false-true transition of rung decision, FIFO Unload
transfers data from the file into a specific output address.
Load and unload pointers track the load and unload addresses in the FIFO
files so that words are withdrawn from the file in the same order that they
were entered into the file, thus the acronym FIFO — first in first out.
These pointers are manipulated by the processor, as is the data in the FIFO
file.
The load and unload pointers will load and unload words at any point in
the file. The body of the file will float between these boundaries. Do not
expect to find any particular data entry at any specific data table location in
this area.
Only the FIFO input and output addresses are pertinent to the FIFO
operation and are the only words which should be manipulated by or
examined in the user program.
The status bits for this instruction are enable, full and empty (see
Figure 13.5). When the FIFO file is full, no data can be loaded if the rung
goes true for the FIFO Load instruction, that data will be lost. Conversely,
if the FIFO stack is empty, no data can be unloaded. Any data unloaded
from an empty FIFO is invalid. The full and empty flags should always be
used in the program to ensure that the data being loaded/unloaded to/from
the file is not lost/invalid.
Instruction overview:
Output instructions
Key sequence: [SHIFT REG] 14 and 15
Requires 5 words of user program each
Counter manipulated by instructions
The FIFO Load and FIFO Unload instructions must have the same
counter address, same size and the same file address.
13.3
FIFO Load and FIFO Unload
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com