Shift Register Instructions

Download Report

Transcript Shift Register Instructions

Shift Register Instructions
•
•
•
•
•
FFL FIFO Load
FFU FIFO Unload
LFL LIFO Load
LFU LIFO Unload
The FIFO is a First In First Out Register used
to buffer data.
• The LIFO is a Last In First Out Register
used as a stack
FIFO Load (FFL)
• On a false-to-true rung transition, the FFL
instruction loads words into a user-created file
called a FIFO stack. This instruction’s
counterpart, FIFO unload (FFU), is paired with
a given FFL instruction to remove elements
from the FIFO stack.
FIFO Unload (FFU)
• On a false-to-true rung transition, the FFU
instruction unloads words from a user-created
file called a FIFO stack. The data is unloaded
using first-in, first-out order. After the unload
completes, the data in the stack is shifted one
element toward the top of the stack and the last
element is zeroed out.
For asynchronous type lines, such as
pallet (assembly) lines in which
individual pallet are stopped and
released in zones, the FIFO
instructions are a better choice for a
data tracking system than the LIFO
instructions. The designers must be
careful to never let the FIFO get out
of sync because it’s not self-clearing
and will cause data to be skewed
forever until the FIFO is clear
LIFO Load (LFL)
• On a false-to-true rung transition, the LFL
instruction loads words into a user-created file
called a LIFO stack. This instruction’s
counterpart, LIFO unload (LFU), is paired
with a given LFL instruction to remove
elements from the LIFO stack.
LIFO Unload (LFU)
• On a false-to-true rung transition, the LFU
instruction unloads words or long words from
a user-created file called a LIFO stack. The
data is unloaded using last-in, first-out order.
One of the main uses of LIFO instruction
is for the temporary storage of data words
between functions or process when
tracking item on a stack. One program
can save a block of data in an array and
then allow a second program or process to
retrieve the data when control is passed to
the other program