You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old October 17th, 2007, 12:22 PM   #1
Redael
Member
United States

Redael is offline
 
Join Date: Oct 2007
Location: 54401
Posts: 3
FIFO load and unload AB

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
  Reply With Quote
Old October 17th, 2007, 12:35 PM   #2
Paully's5.0
Lifetime Supporting Member
United States

Paully's5.0 is offline
 
Join Date: Jan 2006
Location: WI
Posts: 975
Check out this thread
  Reply With Quote
Old October 17th, 2007, 12:55 PM   #3
Redael
Member
United States

Redael is offline
 
Join Date: Oct 2007
Location: 54401
Posts: 3
I have this much information
I know how it loads and unloads
How do I use this to control a process
Thanks JIM
  Reply With Quote
Old October 17th, 2007, 01:15 PM   #4
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 2,936
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
  Reply With Quote
Old October 17th, 2007, 02:00 PM   #5
mordred
Member
Canada

mordred is offline
 
mordred's Avatar
 
Join Date: Mar 2004
Location: Red Deer
Posts: 1,892
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.
  Reply With Quote
Old October 17th, 2007, 02:22 PM   #6
TConnolly
Lifetime Supporting Member
United States

TConnolly is offline
 
TConnolly's Avatar
 
Join Date: Apr 2005
Location: Salt Lake City
Posts: 5,709
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.
__________________
True craftsmanship is only one more power tool away.

That's the beauty of processors, they don't have emotions they just run code - The PLC Kid.
  Reply With Quote
Old October 19th, 2007, 10:12 AM   #7
Redael
Member
United States

Redael is offline
 
Join Date: Oct 2007
Location: 54401
Posts: 3
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
  Reply With Quote
Old October 19th, 2007, 10:22 AM   #8
mordred
Member
Canada

mordred is offline
 
mordred's Avatar
 
Join Date: Mar 2004
Location: Red Deer
Posts: 1,892
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
  Reply With Quote
Old October 19th, 2007, 03:50 PM   #9
Rube
Member
United States

Rube is offline
 
Rube's Avatar
 
Join Date: Sep 2003
Location: Fort Worth, Texas
Posts: 886
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.
__________________
Mark A. Crowley

Automation is not a corrective action for a lack of discipline.
  Reply With Quote
Old October 19th, 2007, 03:59 PM   #10
Paully's5.0
Lifetime Supporting Member
United States

Paully's5.0 is offline
 
Join Date: Jan 2006
Location: WI
Posts: 975
Quote:
Originally Posted by Redael
.........
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 by Paully's5.0; October 19th, 2007 at 04:01 PM.
  Reply With Quote
Old October 20th, 2007, 12:03 AM   #11
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 7,645
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?
__________________
Justice is a nice ideal, but don't be surprised nor hurt when it is denied you.

It's not all the variables I am most concerned with, it's the undiscovered constants.

"You can lead a horse to water but if he's got his head up his as$ he may die of thirst anyway."
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Step7 - creating a running average of 256 values RMA LIVE PLC Questions And Answers 6 December 4th, 2007 10:15 AM
FIFO on SLC5/04 chavak LIVE PLC Questions And Answers 2 January 12th, 2006 08:05 AM
Sequential Status Display... Eric Nelson LIVE PLC Questions And Answers 32 January 4th, 2005 09:25 AM
Fi-FIFO-Fum... Eric Nelson LIVE PLC Questions And Answers 35 September 28th, 2004 02:52 PM


All times are GMT -5. The time now is 05:46 AM.


.