FIFO load and unload AB

Redael

Member
Join Date
Oct 2007
Location
54401
Posts
3
Looking for more information on FIFO
No one seems to have much information this instruction
Would like to see a ladder with FFl and FFU
More than the 2 rungs with the instructions on them so I can understand how it works
Thanks Jim
 
I have this much information
I know how it loads and unloads
How do I use this to control a process
Thanks JIM
 
Just so I fully understand what you are asking:

You have this bright, shiny , new instruction pair and you are looking for a process to use them on. Does that about sum up the question? From an engineering standpoint, isn't that putting the cart ahead of the horse?

I don't typically use FIFOs. I use arrays and pointers. I feel that method is less restrictive since you don't have to babysit the position variable if you do something atypical in the middle of the data block. However, I have seen FIFO load/unload pairs used to queue up diagnostics for reading by another device. This preserves the order of the diagnostics without requiring an explicit timestamp. If used correctly it could be used like a shift register operating on integer or real data types. Think of shifting a complex item status along a conveyor.

Keith
 
ONe example on how to use it to control a process is that you can use the FIFO stack to store barcodes of say boxes on a sortation conveyer as the box arrives at a certain point you would remove that barcode from the staqck and make your decisions on which lane to assign it to. Possibilities are subject to the imagination. I prefer other methods as they have greater flexibility but the easiest way to think of the command is as a temporary data storage area removes data in a set order.
 
Another possibility is to keeping a running average of the last 5 (or however many you want) samples of some variable. For example, every second you take a weight reading, unload the oldest reading from the FIFO and load the most recent reading in, then average the five redings for the last five seconds.

Like others, I would use a pointer/array for something like that, but a FIFO can do it just fine, and more people probably would use a FIFO.
 
Fifo

I'm still trying to get the FIFO program to work
If someone has a ladder with the complete process it would help
I'm learning most of this on My own and most of the information out there isn't of much help.
Thanks JIM
 
Why not post what you have so far we can probably step you through it. Currently I have no programs that uses FIFO however I coulod probably write an example early next week
 
Mordred is correct. You're saying you can't get it to work but you're not giving us any details on what you're trying to do and what's not getting done. I use FIFOs in three of my conveyor systems and they really are not hard to use so you've probably overlooked something simple. Post more details and ladder if you can so we can be more help.
 
Redael said:
.........
If someone has a ladder with the complete process it would help
.........

Again, look at the thread I linked in my original response, at the end of that thread OkiePC has a great example that includes screen shots of the ladder, screen shots of the N files he is using for his FIFO, and he does a pretty good job of explaining it too.

If it still does not make sense, as others said we'll need specifics of what you code currently looks like.

Edit: If you haven't already, look up the instruction in the help file, it should be helpful as well.
 
Last edited:
I think that some A/B platforms require a constant when using copy to move blocks of words around. Sometimes, in those cases, a FFU/FFL pair can be a good choice instead. But only if you don't need to insert or delete records from the "middle of the pile", but, rather, you want to preserve a list of alarms, or data changes without losing the order in which they occurred.

So, in my practice, the advantage to the FFU/FFL pair is that the length can be variable. You can do that with pointers too, but you may end up with more code to recreate what the FFU/FFL instruction has built-in.

For example: You want a PLC record of the state of 16 consecutive fault bits, for the most recent 100 alarms since power up, and you power up everyday at about 7:00 a.m. So, every time the word containing those 16 consecutive alarm bits changes, you FiFoLoad it into your data area.

I always program the FFU jsut before the load, and only unload the stack when it is full. If there 123 alarms today, I lose the oldest 23 of them. Gotta set a limit somehwere. So the FFU just above the FFL in the scan, conditioned by the done bit will keep room in the stack and utilize all 100 locations.

If there are only 23 alarms all day, you don't have to move 100 words around to track them all. But, when you want to see the oldest, you look at the file:[control.POS] location for the oldest, it won't always be located at position 100 unless the alarm queue is full (DN bit will be on...)

I have seen some cases where a guy unloaded the stack right after it got done, and made his file one element larger to accomodate that, but in his case, the DN bit was never set past that point and it makes more sense to use only the number of elemnets you need and unload just prior to loading the stack. Then, your done bit will be useful later in the program.

Only as many elements as exist in the "stack" (the control.POS value) have to be manipulated aduring each FFL execution.

Again, Redael, are you just expanding your knowledge or do you have a potential application?
 

Similar Topics

I just want to make sure I have this straight. I have 7 saws all in line, each with a valve and pneumatic cylinder to move it up or down. I will...
Replies
2
Views
2,972
Yes, this is a project for school, and I'm not looking for anyone to do my work for me. What I would like is some clarification on using FIFO load...
Replies
1
Views
2,349
Help Can someone help me. I am trying to use the load/unload command to move an interger value through the buffer. I cant seem to get it working...
Replies
1
Views
2,244
I am new to RS Logix 5 - can anyone help me with a little example of a FIFL and FIFU code. When I make an input I want to capture the data and...
Replies
8
Views
2,566
I have a camera system in a die that I am writing the program for. I have two tracks and capture two consecutive parts. The part out locations...
Replies
14
Views
5,243
Back
Top Bottom