ClimateController
Member
I am trying to make an object sorting system using PLCs for university. The system uses the shape of incoming objects to figure out if they need to be on the conveyor belt. It's very simple. We are just looking for one shape: a circle. All other shapes are to be discarded. I am gonna be using a simple spring-loaded diverter at the other end to get rid of "bad" objects.
I am using a camera + an FPGA DSP kit to do the image processing. The camera takes a picture every time the proximity sensor at the feed end is triggered, it does the appropriate image processing and saves the result in an array. The array reads 1 if the object is "bad". It reads 0 otherwise. The array is updated in real time. The PLC is supposed to read this array to perform object sorting but it cannot happen in real time because there is a distance between the feed end and the diverter.
So I am wondering if I should use an optical encoder to keep track of objects and basically figure out when to activate the diverter?
Is this how I should go about it? Suppose it takes 20 pulses for an object to reach the diverter. Do I get the PLC to read the array earlier at every 20th pulse?
- I start a counter based on the optical encoder's pulses every time the proximity sensor is triggered.
- It counts up to 20 pulses and then it reads the array.
- So if an object is "bad" the diverter can remove it.
- The PLC starts right at the top of the array for the first object and it keeps progressing down the array for subsequent objects. It does this at every 20th pulse.
Will this work? I already have the image processing algorithm/code etc. figured out. Just need an object tracking mechanism.
Please help. Thanks in advance.
I am using a camera + an FPGA DSP kit to do the image processing. The camera takes a picture every time the proximity sensor at the feed end is triggered, it does the appropriate image processing and saves the result in an array. The array reads 1 if the object is "bad". It reads 0 otherwise. The array is updated in real time. The PLC is supposed to read this array to perform object sorting but it cannot happen in real time because there is a distance between the feed end and the diverter.
So I am wondering if I should use an optical encoder to keep track of objects and basically figure out when to activate the diverter?
Is this how I should go about it? Suppose it takes 20 pulses for an object to reach the diverter. Do I get the PLC to read the array earlier at every 20th pulse?
- I start a counter based on the optical encoder's pulses every time the proximity sensor is triggered.
- It counts up to 20 pulses and then it reads the array.
- So if an object is "bad" the diverter can remove it.
- The PLC starts right at the top of the array for the first object and it keeps progressing down the array for subsequent objects. It does this at every 20th pulse.
Will this work? I already have the image processing algorithm/code etc. figured out. Just need an object tracking mechanism.
Please help. Thanks in advance.