QUOTE (IAFRANCO @ Oct 14 2009, 01:33 PM)

Iīm doing a new project in my job, itīs a level inspector based on a vision system.
The inspector works fine, the problem itīs the rejector, i canīt expulse the bad bottle,
using a simple delay because the lineīs speed itīs variable, sometimes faster and sometimes lower.
there are 2000mm between the inspector and the rejector.
I have a micrologix 1100.
what can i do?
sorry about my english....

2000 mm doesn't say much but you've got a bottle line which says line speeds are probably pretty high regardless. I will describe the standard method for doing this that does not rely on timing at all that is used in a glass bottle plant. The alternative is to measure line speeds and use timers. I don't know if the Micrologix processor is fast enough to do either one because it depends on your line speeds.
Place a photo eye just behind the vision system. Place another photo eye just in front of the reject point. Use an air knife to push bottles off at the reject point. Create an integer file long enough that it can store one entry if all bottles are lined up as close as possible in 1100 mm.
Every time a bottle passes the photo eye next to the vision system, use an FFL (FIFO load) command to store the status of the bottle (good or bad) into the integer file as a FIFO queue (first in, first out).
Every time a bottle passes the photo eye in front of the reject point, use FFU (FIFO unload) to read the value in the queue. If the bottle is bad, turn the air knife on to reject it. If it is good, turn the air knife off.
The FIFO queue stores the status of all the bottles between the vision system and the reject point. If your photo eyes ever miss a bottle, a bottle falls off the line, or if someone removes a bottle from the conveyor, the system will fail. Make sure to provide a button so that someone can remove all the bottles from the conveyor, put them back on the line in front of the vision system, and reset the conveyor. Operators and mechanics do this all the time and don't realize what they are doing. You must train them to either remove all bottles from the conveyor and reset it or do not touch any of them.