I'm in the brainstorming phase of a project and am looking to see if anyone has ideas on the feasibility of some code I'd like to implement.
My project involves tracking vials for a filling machine, the product being filled is being frozen after filling and is perishable so I need to track how long a particular vial has been on the line between the filler and freezer and reject any that exceed a set time limit (about 5 minutes just to give an idea of scale I'm working with). I was thinking of using inkjet labeling after the filler and then scanning prior to the freeze, but I think those options may be too costly, so I'm trying to figure out if I can do it all in a PLC using just discrete sensors along the line.
I'd like to implement an array of timers where each timer represents a vial...the array would be manipulated as a FIFO buffer, so when a vial gets filled and passes an input sensor to the monitoring zone, its timer starts. The timer keeps incrementing until the output sensor trips and then that particular timer would get reset and reused for the next vial coming in. The array would need to have a variable and dynamic number of elements equal to the number of vials in the zone being monitored (I know a PLC will not allow dynamic array sizing, so the max number of elements could be set high enough never to be exceeded, but the elements with timers active at any time would be variable).
Has anyone ever implemented something like this before?
Is ladder the right language to do this in, or should I be using structured text?
Thanks for any input,
Greg Krueger
My project involves tracking vials for a filling machine, the product being filled is being frozen after filling and is perishable so I need to track how long a particular vial has been on the line between the filler and freezer and reject any that exceed a set time limit (about 5 minutes just to give an idea of scale I'm working with). I was thinking of using inkjet labeling after the filler and then scanning prior to the freeze, but I think those options may be too costly, so I'm trying to figure out if I can do it all in a PLC using just discrete sensors along the line.
I'd like to implement an array of timers where each timer represents a vial...the array would be manipulated as a FIFO buffer, so when a vial gets filled and passes an input sensor to the monitoring zone, its timer starts. The timer keeps incrementing until the output sensor trips and then that particular timer would get reset and reused for the next vial coming in. The array would need to have a variable and dynamic number of elements equal to the number of vials in the zone being monitored (I know a PLC will not allow dynamic array sizing, so the max number of elements could be set high enough never to be exceeded, but the elements with timers active at any time would be variable).
Has anyone ever implemented something like this before?
Is ladder the right language to do this in, or should I be using structured text?
Thanks for any input,
Greg Krueger