Fifo and lifo instructions overview – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 206

Advertising
background image

Chapter 11
Using Data Handling Instructions

11–23

FIFO instructions load words into a file and unload them in the same order as
they were loaded. The first word in is the first word out.

LIFO instructions load words into a file and unload them in the opposite
order as they were loaded. The last word in is the first word out.

Entering Parameters

Enter the following parameters when programming these instructions:

Source is a word address or constant (–32,768 to 32,767) that becomes
the next value in the stack.

Destination (Dest) is a word address that stores the value that exits from
the stack.

This Instruction:

Unloads the Value from:

FIFO’s FFU

First word

LIFO’s LFU

The last word entered

FIFO/LIFO is the address of the stack. It must be an indexed word
address in the bit, input, output, or integer file. (The HHP inserts the #
character automatically.) Use the same FIFO address for the associated
FFL and FFU instructions; use the same LIFO address for the associated
LFL and LFU instructions.

Control is the address of the control structure. The control structure
stores the status bits, the stack length, and the position value Do not use
the control file address for any other instruction.
Status bits of the control structure are addressed by mnemonic. These
include:

Empty Bit EM (bit 12) is set by the controller to indicate the stack is
empty.

Done Bit DN (bit 13) is set by the controller to indicate the stack is
full. This inhibits loading the stack.

FFU/LFU Enable Bit EU (bit 14) is set on a false-to-true transition
of the FFU/LFU rung and is reset on a true-to-false transition.

FFL/LFL Enable Bit EN (bit 15) is set on a false-to-true transition
of the FFL/LFL rung and is reset on a true-to-false transition.

Length specifies the maximum number of words in the stack. Address
the length value by mnemonic (LEN).

Position is the next available location where the instruction loads data
into the stack. This value changes after each load or unload operation.
Address the position value by mnemonic (POS).

FIFO and LIFO Instructions
Overview

Advertising