FIFO & LIFO or Excel?

tony jaa

Member
Join Date
Oct 2017
Location
coahuila
Posts
2
Hi friends, I have a big question and a big problem, I'm new to programming PLC, I have a system where we use a cognex data reader to read a code of production line parts, these pieces come from the assembly line and this are scrap but these pieces are reused and the data reader should read the serial number and delete the record in a Rockwell ETR system and put these parts back on the production line, so I want to improve the PLC logic a bit of counter that when the part is detected 3 times that it returns like a scrap, the system activates an alarm and these pieces are sent to scrap directly and they are not returned to the assembly lines, and my question is if I use a tool FIFO and LIFO Can I access the database generated by the FIFO to compare and know if a piece is not the first time it is sent as scrap? and how much data can I store in a FIFO, well if this tool does not help me, it is possible to send data from rslogix 5000 to an excel database where I can put a thousand or maybe millions of serial numbers to compare and manipulate and gain control over this situation? Thank you very much for your attention.
 
If I read your question correctly, you want to detect if a part re-appears on the assembly line ?

The only limiting criteria is the physical size of your data-set. This will most likely be an array tag. A single tag can be created to use up to 2MB of memory, so the number of serial numbers you could store in one array would depend on the data-type of your serial numbers.

The following table can tell you the number of array elements (serial numbers) you could store, based on the data-type of the serial numbers....

SINT (1 byte) (-128 to +127) - 2097152 elements
INT (2 bytes) (-32768 to +32767) - 1048576 elements
DINT (4 bytes) (-2147483648 to +2147483647) - 524288 elements

If your serial numbers are stored as the default STRING data-type, then each string occupies 88 bytes, so your string array can only have 23832 elements.

You can create smaller STRING data-types, the size will always be the number of ASCII characters +4, so if you created a STRING8, for example, each string occupies 8 + 4 = 12 bytes. Your STRING8 array could then hold 174760 serial numbers.

All of the FIFO, LIFO, FSC, instructions can work with arrays of these sizes.

In your application, I believe you need a FIFO, not a LIFO. If you use the FFL, you will need to take steps to ensure you can load another when the FIFO becomes full, by using a FFU before the FFL.

But all you need is a "shift register", automatically losing the oldest entry. This is more easily achieved (and faster) with a simple COP instruction, shifting the storage array 1 place before inserting the new part's serial number. If you go for this, store the part numbers in reverse order, where the shift moves the data elements down, and your newest data goes into the highest element number, if you don't do this, the COP will fill the array with the data in ArrayName[0]

Here's an example of 10-element shift register...

2017-10-28_232640.jpg
 
thanks a lot!!! i wasnt shure to use only FIFO but now i know, and sorry maybe i didnt explain correctly, but i need to register and to delete the serial number from a ETR storage of the pieces that is supposly scarp because some componets are reused and back to assambly line, but i need to take control about how many times these pieces return because i only will reuse it 3 times in the 4th chance these pieces must be sended to scrap unconditionally.
your ansewer helps me a lot, because now i know the number of codes that i can storage.
thanks a lot and i beggin to make proofs
 

Similar Topics

I have been trying to get to grips with the LIFO and FIFO functions using Compact Logix but it seems that if you have multiple LFL instructions on...
Replies
3
Views
2,185
Hi, We have an application where we are using a FIFO list to track parts moving through a queue. the FIFO Load/Unload pair is working without...
Replies
9
Views
11,789
Well HI all I am trying to use the FiFo/LiFo with a S7 300 and I am not to sure how to use it. I think I need the ATT table so that I could store...
Replies
4
Views
4,526
I’m new user of S7, so I want to use the FIFO LIFO, I do as the help says,I create a DB1 and put the information, but it does not work when I test...
Replies
2
Views
2,227
Hi to everyone. Kindly discuss when to used LIFO & FIFO Instruction. I appreciate if you can give actual application on the use of this instruction.
Replies
10
Views
14,916
Back
Top Bottom