conveyor reject tracking

sprek

Member
Join Date
Mar 2009
Location
Catlin, IL
Posts
39
I am doing a new project were I need to keep track of bad parts( basically upside down) on a conveyor that I want to keep tracking on if someone changes the belt speed.

I have Two sensors that trigger at the same time for bad part
also I have an encoder with only the a-phase hooked up

I have never used an encoder before and am not sure were to start. What would be the best way to set this up? Do I use the encoder to run a shift register and if so what would the best way of thinking during programming? I know the sensors are 778 pulses away from the reject chute. Do I need to figure this number into the setup or do I need to think differently

I could use some direction on how to program this to work.

I take pride in doing new things and I challenged myself to figure this out

I am using the Eaton ELC-PC12 plc. I am not wanting to have the program written for me but to help me learn the way to do this correctly

P1010855.JPG

P1010856.JPG
 
Obviously you have a fairly simple setup there, but think of a more complex one, a greater distance between detection and blow-off, the possibility of more than one reject tagged items between detection and the blow-off.

Lets think of this in a non-PLC world

Put yourself in the position of the sensor. You spot a bad one and it is, right now, 778 pulses away from the blow-off. You can't be concerned with keeping track of that. So you write down on a piece of paper that a reject is coming and it's 778 pulses away. You then hand that to the blow-off guy. Then you go back to watching the PEs.

Now you are the blow-off guy. You get a piece of paper saying that a reject is coming and that it's 778 pulses away. AND, every so often, you know that a pulse has happened. You go to that piece of paper and subtract 1 from the number. What will you do after 778 pulses and the number on the paper has just been changed to zero? I think you can guess. AND, you can thrown that paper away.

But what happens (you're still the blow-off guy) and you've accumulated more than one paper with numbers on them. What do you do when a pulse arrives? Think about it.

(This may seem a bit simplistic but it is exactly how I approach a new problem. Remember, the only thing you (the PLC) knows about the system is the state of the inputs. The only action you can take is to affect internal states and/or change the state of outputs.)

Actually you probably wouldn't need the level of accuracy that 778 pulses give over this distance a less precise encoder might have been just fine, but you work with what you have.
 
Last edited:
This used to be a vision system conveyor that I repurposed for this project that's why it has such a sensitive encoder. I like to figure out code to use in other application i'll call chunks that I can just change a few parameters and reuse in new programs

I really have the entire length of the conveyor to put the sensors. I just have them that close incase I fail at this

I forgot to mention that this runs about 1000 caps per minute


I would like to break this down into small segments instead of looking at whole program to wrap my head around this



After the logic to detect the bad cap do I run to a counter or a shift register.
I was thinking shift register being I could have bad good good bad in-between the sensor and reject
 
Shift registers and arrays work great for conveyor type applications. Arrays can be processor intensive for long conveyors but are useful when multiple operations need to be done along the line. Shift the values in the register or array along with each pulse of the encoder.
 
Shift registers work well if you can shift the register once for every part / position. Are these parts always spaced equally? are these parts always the same size? you can program a signal based on the part length / spacing but they need to be repeatable.

Think about using more of a "array shift". Record the position of the encoder each time the sensor sees a "bad" part record the encoder position in the next open array position (1, then 2 then 3 etc). then when the encoder is at the recorded position in array 1 plus the distance to the blow off, activate the blow off sol and shift array position 2 to 1, 3 to 2 , etc. and repeat.
 
Consider the combination of: encoder pulse frequency; length of shift register (if that's the way you go); and time for the processor to scan the logic. There's only so much time to do stuff and these three factors will interact.

I don't know your processor but, if you're up to it programming-wise, you could do as Bernie suggests and record the number of pulses 'til activation, store these numbers in a FIFO and decrement only a limited quantity of values rather than shifting a whole lot of values on every encoder pulse. It's conceptually more subtle but also a lot faster.
 
I forgot to mention that this runs about 1000 caps per minute
Doug said:
Consider the combination of: encoder pulse frequency; length of shift register (if that's the way you go); and time for the processor to scan the logic. There's only so much time to do stuff and these three factors will interact.

1000 caps per minute

That's 60ms per decision. Given an estimate of product size of 3" diameter that's 16.6 pieces per second with a conveyor speed of 250FPM.

given these stats and the type of processors I work with this application would require a High Speed Counter card that would react independant of processor scan time.
 
I started a program that That takes the current value of the encoder and adds the 778 to it and stores it in a register

It looks like if I trigger it I can see pretty accurate readings in the registers D0 D2 D4 D6 and so on

My question is what to do next do i just do some math and get a range for instance if D0 has 1500 in it say anything from 1500 to 1550 is good to trigger the reject


Im I on the right track or is ther something easier I could use

http://www.sprektech.com/ebay/conveyor.pdf
 
My question is what to do next...
IMHO, at this point it doesn't matter how you do the counting, the question I'd be asking is "How many locations am I going to need in which to store divert values?" This will depend on your application. If there are a lot of rejects you'll need lots of registers. Only one or two rejects an hour? Probably not so many. As an example, worst case would be how many registers are needed if EVERY cap is wrong?

The way I've seen this done usually is to load the (known) number of pulses from the inject point to the reject point into a register then subtract encoder pulses from that location and monitor it for <=0. When the register hits this point the divert is actuated.
 
I started a program that That takes the current value of the encoder and adds the 778 to it and stores it in a register

It looks like if I trigger it I can see pretty accurate readings in the registers D0 D2 D4 D6 and so on

My question is what to do next do i just do some math and get a range for instance if D0 has 1500 in it say anything from 1500 to 1550 is good to trigger the reject


Im I on the right track or is ther something easier I could use

Thats what I would do.

There is always a way to "improve" a process.do what works best for you, document the program so you can understand it when you look at in in the future.
 
Yes, each of your reject windows must have a range. Each window high and low value needs to be checked that it is not greater than the encoder rollover point (if it is, just subtract your encoder counter rollover value). You need to be able to detect at least two rejects in process it looks like from the pic? I would probably program for three just for the flexibility, and just use a counter that increments each time a reject occurs. Use the counter value (0-2) as an indirect address for storage of your ranges or just as a compare where you brute force stuff them into specific hard coded addresses for each of the 3 rejects you may be tracking at any point in time.

Then, the reject logic can be a few lines of LIM blocks setting bits which all parallel together to drive the reject solenoid. You may be able to strictly use the range, but I would probably also time limit it so that if the line slowed to a crawl or stopped, the blowoff does not go on too long. I would not let it blow much if any longer than the encoder range at high speed so as not to disturb the next product.

Solenoids to open pilots to shifts valves to blow air to move product are not instantaneous devices ... so be prepared to change that 778 number by a lot more than you expect, unless that is a value already derived by trial and testing. In super critical high speed applications, you would need to calculate the delays of the actuators separately to stay consistent at all speeds since the solenoid and valve delays are usually pretty constant.
 
Last edited:

Similar Topics

CompactLogix PLCs I'm tasked with getting a box packing machine to MSG (ethernet) another plc that handles a diverter gate/reject conveyor. My...
Replies
61
Views
17,484
So I'm doing a conveyor system. There isn't any absolute-type indexing, just a steady flow of product. I have a Keyence 1d/2d photographic barcode...
Replies
10
Views
2,826
I have done many simple tracking (test / track / reject) routines over the years. The speed was always slow and the resolution was +/- 1" which...
Replies
10
Views
6,172
the conveyor can stop because of a safety sensor or safety switch. And also it can stop because of an object jam detector sensor. If the conveyor...
Replies
5
Views
223
Does anyone have sample logic with conveyors that start and stop according to product on the line?
Replies
1
Views
115
Back
Top Bottom