beautypg.com

Outputs, Last in - first out (lifo) – Watlow LogicPro User Manual

Page 153

background image

LogicPro User’s Guide

Chapter 10: Function Blocks

Doc.# 28002-00 Rev 3.00

Watlow Anafaze

137

Outputs

Q is the FIFO output bit. This bit is enabled and passes power
when a False to True transition of the unload bit occurs. This
bit remains enabled until there are no more values in the stack
to unload and the count Variable equals zero.

FUL is the FIFO full bit. This bit is enabled and passes power
when the count value is equal to the size value. There does not
have to be a rung with an output coil placed between FUL in
the function block and the right power rail (in a Ladder
Diagram program) or an output Variable connected to it (in a
FBD program).

EMP is the FIFO empty bit. This bit is enabled and passes
power when the count value equals zero. A rung with an
output coil is not needed between EMP in the function block
and the right power rail (in a Ladder Diagram program) or an
output Variable connected to it (in a FBD program).

CNT is the FIFO count Variable. In Ladder logic, assign this
input a symbolic name or constant value in the

Assign

Function Block Symbolic Input/Output

dialog box. In

FBD, assign a variable to this output in the

Variable

Assignment

dialog box. The value of this Variable indicates

the number of integers in the stack.

OUTP is the FIFO output Variable. In Ladder logic, assign this
input a symbolic name or constant value in the

Assign

Function Block Symbolic Input/Output

dialog box. In

FBD, assign a variable to this output in the

Variable

Assignment

dialog box. This Variable holds the value

unloaded from the stack. The range of values this Variable can
assume is from -32,768 to 32,767, including 0 for INT type
Variables and -2,147,483,648 to 2,147,483,647, including 0
for LONG type Variables. If this Variable exceeds these
ranges, unpredictable results will occur.

Last In - First Out (LIFO)

The Last In - First Out (LIFO) function block, shown in Figure
10.19 on page 138
, creates and manipulates a stack of
integers.

LIFO moves the contents of the input Variable (INP) to the
stack when it encounters a False to True transition of the load
bit (LD). The size of the stack is specified by assigning a
constant or symbolic Variable to the SIZE parameter. The
count Variable (CNT) tracks the number of integers in the
stack.

When the stack is filled with integers, the full bit (FUL) is
True. This bit only remains True as long as the count of