Ben Miller
Ben Miller

Reputation: 510

Can FIFO and LIFO instructions be used on the same data structure in Rockwell PLCs?

I'm programming a Rockwell Automation Allen-Bradley Studio 5000 ControlLogix PLC.

I'm using FIFO instructions on an array, and I have a situation where I would like to unload either the First In or the Last In, depending on the circumstances. Rockwell has both FIFO instructions (FFL and FFU) and LIFO instructions (LFL and LFU).

I have two questions:

  1. Is there any reason why I can't use both an FFU and an LFU on the same structure?

  2. FFL and LFL (the two load instructions) appear to do exactly the same thing. Is there any difference between the two instructions?

Upvotes: 1

Views: 455

Answers (1)

Claus Nielsen
Claus Nielsen

Reputation: 551

You can, just use the same control tag. The control tag keeps track of the current stack/queue size and the FFL, FFU, LFL and LFU instructions will update it when triggered.

Remember that Logix only ensures 32 bit integrity so make sure the instructions can't overlap if called from different tasks.

Upvotes: 0

Related Questions