Fifo

jthornton

Member
Join Date
Jul 2002
Location
Poplar Bluff, MO
Posts
295
Just looking for a sanity check I've never programmed a FIFO before.

Each time an input turns on push that input number on to the top of then stack and increment the stack counter to show the depth of the stack.

Each time a station is done filling get the last input number from the bottom of the stack and decrement the stack counter.

Does this sound like a reasonable way to implement a FIFO?

Thanks
JT
 
Yep, that's a perfectly valid way to use it. Use FFL to "load" the stack and FFU to "unload" the stack. Make sure to use the same control tag for both the FFL and the FFU.

Also just remember to check whether your FIFO is full before trying to load it - [Control_Tag].DN bit is on when full.
 
JT
When using a FIFO you need to us both the FFL (Load) and FFU (Unload) together

FFL
On every false to true transition of the FFL if the FIFO full bit is false the load tag value is copied to index 0 of the FIFO stack and the value of index 0 is mover to index and index 1 is copied to index 2 and so on up through the stack basically pushing the new value in the bottom of the stack until the stack is full
It also moves the pos pointer up the stack by 1
When the pos pointer equals the max number the full bit is set.
When the stack is full no more data can be moved and FIFI cannot be loaded.
FFU
On every false to true transition of the FFU if the FIFO empty bit is false the value at the pointer is moved out to the unload tag and the pointer is down by 1

You can fill a FIFO without unloading up to the pointer is at the max number but you must at some point unload it or you will not be able to move more date in
That’s why it’s best to use the load and unload together they both must contain the same control
 
I forgot to mention that I'll be using an Automation Direct Click not an AB. So it's a single copy to move one and a block copy to push the stack up or down.

JT
 

Similar Topics

I am not sure if this is possible but if there is a way, you guys would be the ones to know. I am currently working on a project where we are...
Replies
7
Views
216
Hello all, I'm using a 5069-L330ER in a project and I need to essentially capture some data that will be shown as a trend on a screen. The data...
Replies
9
Views
961
Hello! I have a network of conveyors bringing raw product to 4 machines. A sensor in the hopper of each machine calls for more product. I'm...
Replies
15
Views
5,866
Hello everyone, has anyone out there ever made a FIFO using an FFL and FFU instructions on a Micro800? I have tried setting it up just as I would...
Replies
9
Views
3,114
I have a bottle capper that is using an encoder and FIFO logic to track the free standing bottles passing through a bottle capper. I have checked...
Replies
31
Views
11,671
Back
Top Bottom