0% found this document useful (0 votes)
76 views5 pages

PLC File Instructions Guide

The document discusses different types of file instructions for programmable logic controllers, including FIFO (first in first out) and LIFO (last in first out) load and unload instructions. FIFO instructions load and unload data from a queue-like stack in a first in first out order, while LIFO instructions load and unload data from a stack-like structure in a last in first out order. The instructions require operands to specify the data, file location, and control information.

Uploaded by

athembo george
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views5 pages

PLC File Instructions Guide

The document discusses different types of file instructions for programmable logic controllers, including FIFO (first in first out) and LIFO (last in first out) load and unload instructions. FIFO instructions load and unload data from a queue-like stack in a first in first out order, while LIFO instructions load and unload data from a stack-like structure in a last in first out order. The instructions require operands to specify the data, file location, and control information.

Uploaded by

athembo george
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Programmable Logic

Controllers

File (Queue) Instructions

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 10-1

File Instruction Types


• FFL - First In, First Out (FIFO) Load
• FFU - First In, First Out (FIFO) Unload
• LFL - Last In, First Out (LIFO) Load
• LFU - Last In, First Out (LIFO) Unload

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 10-2

10-1
FIFO Load Instruction

• On a false-to-true rung
transition, the FFL
instruction loads words
or long words into a
user-created file called
a FIFO stack.

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 10-3

FIFO Load Operands


• Source - The source operand is a constant or
address of the value used to fill the currently
available p
position in the FIFO stack.
– The address level of the source must match the FIFO stack.
If FIFO is a word size file, source must be a word value or
constant. If FIFO is a long word size file, source must be a
long word value or constant. The data range for the source
is from -32768 to 32767 (word) or -2,147,483,648 to
2,147,483,647 (long word).
• FIFO - The FIFO operand is the starting address of
the stack.
stack
• Control - This is a control file address. The status
bits, stack length, and the position value are stored
in this element.

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 10-4

10-2
FIFO Control Structure

• Length - The length operand contains the number of elements in the


FIFO stack to receive the value or constant found in the source. The
length of the stack can range from 1 to 128 (word) or 1 to 64 (long
word). The position is incremented after each load.
• Position - This is the current location pointed to in the FIFO stack. It
determines the next location in the stack to receive the value or
constant found in source. Position is a component of the control
register. The position can range from 0 to 127 (word) or 0 to 63 (long
word).

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 10-5

FIFO Loading & Unloading

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 10-6

10-3
FIFO Unload Instruction
• On a false-to-true rung
transition, the FFU
instruction unloads words or
long words from a user-
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.
• FFU operands are exactly as
described in the FFL
instruction.

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 10-7

LFL - Last In, First Out (LIFO) Load

• On a false-to-true rung
transition, the LFL
instruction loads words
or long words into a
user-created file called
a LIFO stack.
• This instruction’s
counterpart, LIFO
unload (LFU),
(LFU) is paired
with a given LFL
instruction to remove
elements from the LIFO
stack.
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 10-8

10-4
LIFO Loading & Unloading

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 10-9

10-5

You might also like