PLC Tutorials

What are FIFO and LIFO Sequences in PLC?

Sequential logic is of great use in PLC programming. It helps in sorting out things easily. A wide range of applications that use PLC has some or the other sequential logic written in it.

Two of the most widely used sequences are LIFO and FIFO. You must have heard the names in electronics when used for stacking and sequencing. These types of sequential logic are available in PLC too.

In this article, we will learn the LIFO and FIFO sequence concepts in PLC programming.

FIFO Sequence in PLC

FIFO stands for first in first out. The meaning of this sequence can be understood easily from its name. The thing that comes first will go out first. You input one element; and when you request an element, the first one that is entered will be given to you. This same logic works in PLC programming for the FIFO sequence.

In programming, a logic block is assigned named FIFO. It can store up to 16 words or more, depending on the PLC. It contains three types of inputs – reset, storage, and retrieval.

On a rising edge of the reset input, the sequence is reset and made empty. On a rising edge of the storage input, the word present at the input is stored in the block. The block will memorize the sequence of words received.

On a rising edge of the retrieval input, the word entered first will be given in the destination word configured by the PLC programmer. It has two outputs – empty and full. If the empty bit is true, then it indicates that the storage is empty, and if the full input is true, then it indicates that the storage is full.

FIFO and LIFO Sequences in PLC

LIFO Sequence in PLC

LIFO stands for last in first out. The meaning of this sequence can be understood easily from its name. The thing that comes last will go out first. You input one element; and when you request an element, the last one that is entered will be given to you. This same logic works in PLC programming for the LIFO sequence.

In programming, a logic block is assigned named LIFO. It can store up to 16 words or more, depending on the PLC. It contains three types of inputs – reset, storage, and retrieval. On a rising edge of the reset input, the sequence is reset and made empty.

On a rising edge of the storage input, the word present at the input is stored in the block. The block will memorize the sequence of words received.

On a rising edge of the retrieval input, the word which entered last will be given in the destination word configured by the programmer. It has two outputs – empty and full. If the empty bit is true, then it indicates that the storage is empty, and if the full input is true, then it indicates that the storage is full.

These sequences are pretty easy to operate. The programmer has to take care that any inputs are not given simultaneously to the storage blocks. The block will then not do any action in this case. Only one input has to be given at a time. It is also to be noted that different PLCs function differently on warm restart or cold restart.

Generally, in a PLC cold restart, for example, the register will be reset and in case of a warm restart, the register will be intact as it is. It depends on manufacturer to manufacturer.

If you liked this article, then please subscribe to our YouTube Channel for Instrumentation, Electrical, PLC, and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

Read Next:

You've successfully subscribed !
Share

Recent Articles

  • PLC Tutorials

Example PLC Program to Control a Pump based on Level Sensors

Learn an example PLC program to control a pump based on level sensors using ladder…

2 weeks ago
  • PLC Tutorials

PLC Timer Application in Security Camera Recording

In the PLC timer application for security camera recording, when motion is detected then camera…

2 weeks ago
  • PLC Tutorials

Batch Mixing with PLC Ladder Logic Program

In this example, we will learn batch mixing with PLC ladder logic program using timer…

2 weeks ago
  • PLC Tutorials

PLC Example on Manufacturing Line Assembly

This PLC example on manufacturing line assembly is an intermediate-level PLC program prepared for the…

2 weeks ago
  • PLC Tutorials

PLC Programming Example with Pushbutton and Motor

In this article, you will learn the PLC programming example with pushbutton and motor control…

3 weeks ago
  • PLC Tutorials

Boolean Logic to PLC Programming

This article teaches how to convert Boolean logic to PLC programming ladder logic with the…

1 month ago