Shift Register Not Tracking

Classic bomb to target application. Faster the plane flies, the sooner it releases the bomb to hit the same target. I do these often on dispensing applications. As mentioned, for a simple reject, use a variable preset timer where the preset is based on your speed.
 
Classic bomb to target application. Faster the plane flies, the sooner it releases the bomb to hit the same target. I do these often on dispensing applications. As mentioned, for a simple reject, use a variable preset timer where the preset is based on your speed.
Yea this is what I’m going to work on implementing. (I just started here a month ago) I got the line speed calculated into an integer, bottles per minute. This is probably a dumb question but what would the formula look like to calculate the reject delay? Like line speed= 70% so use 30% of Max reject delay?(numbers are accurate and just for example) This is my first time ever “engineering” a solution instead of just using PLC’s to troubleshoot
 
Yea this is what I’m going to work on implementing. (I just started here a month ago) I got the line speed calculated into an integer, bottles per minute. This is probably a dumb question but what would the formula look like to calculate the reject delay? Like line speed= 70% so use 30% of Max reject delay?(numbers are accurate and just for example) This is my first time ever “engineering” a solution instead of just using PLC’s to troubleshoot

If you can test, find the delay that works at min speed, and the delay that works at max speed. You now have a two point line equation, where Y2 = delay max, Y1 = delay min, X2 = speed max, X2= speed min. 2 point formula is y=(y2−y1)/(x2−x1)*(x−x1)+y1.

Say your max speed is 1000 and min speed is 500. Delay at 1000 is 200ms, Delay at 500 is 400ms.

Y = (200-400)/(1000-500)*(x-500)+400
Solve for Y yields
Y= -.4x + 600

X = 1000, Y = 200
X = 500, Y = 400
X= 700, Y = 320
Etc.

This is assuming a linear function which most speed to delay applications are. If it's non linear, you can break the above equation up into a look up table with different min and max for each segment. So if linespeed is between 500 and 600, use this equation, between 600 and 700, use the next equation, and so forth.
 
If you can test, find the delay that works at min speed, and the delay that works at max speed. You now have a two point line equation, where Y2 = delay max, Y1 = delay min, X2 = speed max, X2= speed min. 2 point formula is y=(y2−y1)/(x2−x1)*(x−x1)+y1.

Say your max speed is 1000 and min speed is 500. Delay at 1000 is 200ms, Delay at 500 is 400ms.

Y = (200-400)/(1000-500)*(x-500)+400
Solve for Y yields
Y= -.4x + 600

X = 1000, Y = 200
X = 500, Y = 400
X= 700, Y = 320
Etc.

This is assuming a linear function which most speed to delay applications are. If it's non linear, you can break the above equation up into a look up table with different min and max for each segment. So if linespeed is between 500 and 600, use this equation, between 600 and 700, use the next equation, and so forth.
Awesome thank you so much! Everybody so far has been so helpful and nice. I should be able to do some testing next this week hopefully. I’ll update y’all! Thanks again so much!
 
... This is my first time ever “engineering” a solution instead of just using PLC’s to troubleshoot
"Engineering" here means "modeling."

You need to build a mathematical model of the process, using variables for the unknown quantities. Then determine the values of those variables empirically i.e. via experiment.

While that statement may be intimidating, if you can solve the "how long does it take the train moving at a speed of 45mph to travel 105mi?" class of problems, then modeling this bottle line will be straightforward.

What I can say is that, if you are going to start the timer as the fail bit gets to a particular position, and that position is the one to use when the speed is 100% i.e. when the timer delay will be 0 i.e. no delay, and trigger the reject device at timer expiry, then the increase in delay from 0 will not be linear with decreasing speed. I am not saying that a linear characteristic won't be "good enough" from 100% speed down to 50% speed, just that the actual relationship between line speed and delay would not be a line of you plotted it.

However, if you model the process, you will see that @Steve Bailey's suggestion earlier, to adjust the bit position to examine for a fail bit, where the magnitude of the adjustment is dependent on line speed, is a much simpler approach, both to model and implement, and that position adjustment magnitude is linear with line speed.
 
Also, you are not going to use the line speed on units of bottles per minute. The line speed needs to be in units of encoder counts per minute (or per second).

That is, unless the encoder scaling is such that there is one encoder count per bottle.
 
"Engineering" here means "modeling."

You need to build a mathematical model of the process, using variables for the unknown quantities. Then determine the values of those variables empirically i.e. via experiment.

While that statement may be intimidating, if you can solve the "how long does it take the train moving at a speed of 45mph to travel 105mi?" class of problems, then modeling this bottle line will be straightforward.

What I can say is that, if you are going to start the timer as the fail bit gets to a particular position, and that position is the one to use when the speed is 100% i.e. when the timer delay will be 0 i.e. no delay, and trigger the reject device at timer expiry, then the increase in delay from 0 will not be linear with decreasing speed. I am not saying that a linear characteristic won't be "good enough" from 100% speed down to 50% speed, just that the actual relationship between line speed and delay would not be a line of you plotted it.

However, if you model the process, you will see that @Steve Bailey's suggestion earlier, to adjust the bit position to examine for a fail bit, where the magnitude of the adjustment is dependent on line speed, is a much simpler approach, both to model and implement, and that position adjustment magnitude is linear with line speed.

Most speed comp models are linear. Delay in time accomodates for travel distance in time reference to speed. Every high speed electrocam on the market that does pattern tracking uses a linear speed comprnsation. I'm not sure how shifting the position to trigger up the bit stream would even work as likely the resolution of bit shift isn't a perfect factor of the delay. You might need a position and a half, for example.
 
There could be two factors at play. If the sensor that detects pass/fail is more than one bottle width upstream of the reject mechanism, the shift register needs to be able to track the good and bad bottles in the pipeline between the two. And then the speed compensation gets applied to the preset time or pulse count between the trigger point and the actual reject point.
 
Steve, correct. Would be best to position the sensor within one bottle frame at high speed. Presumably the duration of the blast is short enough to accomodate two consecutive bottles. If the reject sensor position is not possible to move close, then I would use a secondary reject shift register to the position to reject and that executes the timer delay. That would still more than likely only need a linear timer preset adjustment.
 
Most speed comp models are linear. ...

Assuming linear behavior is the soul of engineering, but that doesn't mean a process is linear.

Show me a rational model for the camera-label-inspection-to-bottle-reject-station process, with a delay as proposed earlier, state your model assumptions, provide some hypothetical values, and finally calculate the time delays for three different constant line speeds: that calculated delay will not be linear wrt speed.

N.B. I am not saying that using a linear model approximation for that that speed vs. delay characteristic will not work; I am only saying that the line speed vs. delay characteristic is non-linear.

For example, when winding web material, using the square root of length on a roll (independent variable) in a linear model to approximate the diameter of that roll (dependent variable) may be "good enough," even though the non-zero diameter of the core means the actual relationship is non-linear

likely the resolution of bit shift isn't a perfect factor of the delay. You might need a position and a half, for example.

I would expect the unit length along the conveyor/line of a single count of the encoder to be much smaller than the width of a bottle; if it is not, that is a separate problem with the process design.
 
Assuming linear behavior is the soul of engineering, but that doesn't mean a process is linear.

Show me a rational model for the camera-label-inspection-to-bottle-reject-station process, with a delay as proposed earlier, state your model assumptions, provide some hypothetical values, and finally calculate the time delays for three different constant line speeds: that calculated delay will not be linear wrt speed.

N.B. I am not saying that using a linear model approximation for that that speed vs. delay characteristic will not work; I am only saying that the line speed vs. delay characteristic is non-linear.

For example, when winding web material, using the square root of length on a roll (independent variable) in a linear model to approximate the diameter of that roll (dependent variable) may be "good enough," even though the non-zero diameter of the core means the actual relationship is non-linear



I would expect the unit length along the conveyor/line of a single count of the encoder to be much smaller than the width of a bottle; if it is not, that is a separate problem with the process design.

Explain how it is non linear.

Assume detection is 5 inches from reject.

A bottle travels 5 inches per sec, it takes 1 sec to go 5 inches. Forgetting about delay to energize or delay to detect which would be a constants, in 5 inches or 1 second a puff of air is needed. If the bottle is traveling at 10 inches per sec, it takes .5 sec to travel 5 inches. If it's traveling 20 inches per sec it reaches the same spot in .25 sec. Thats a linear function. Delay is simply distance/speed - Constant.

Maybe you are confusing speed of the bottle (in/sec) with rate of bottles (bottles per sec)? Speed that the bottle traverses the delivery system from detection to rejection is all that matters. Rate would dictate how dense the shift register becomes with bottles, but each cell of the shift represents a physical distance. The pulse of the shift changes with speed.

I've done dozens of these type systems, tracking widget movement, pattern stitching, volume dispensing,...all with linear speed compensation. It's nothing more than a PLS (programmable limit switch) application and those use linear speed compensation.

As for web payoffs or winders, thats diameter comp that enters into length vs speed of the mandrel vs speed of web. Not sure how that's germaine to the linear travel of a bottle down a delivery system.
 
Last edited:
If it were linear (i.e. able to be calculated using y=mx+c) then there is a speed at which the time to travel x distance is zero.

Velocity = Distance/Time >> v = d/t
Rearrange that for t = d/v, which can also be represented t=dv^-1
It's an exponential graph.

Put it another way.
If at speed x, your time for the bottle to travel distance y might be, say, 1000ms.
At speed 2x, the time will be 500ms
At speed 3x, 250ms
At speed 4x, 125ms
Each time you double the speed, you halve the time.

I went through this exact process trying to calculate dwell time in a spiral freezer from a known belt speed, when the OEM had always done it with a linear calculation. Their linear calculation was near enough as to not make any practical difference - if you constrain your application to between 3 and 6 on the x axis below, it's close enough to linear that nobody will notice - but I couldn't let it go until I'd wrapped my brain around why distance travelled is not linear with regard to speed.
 

Attachments

  • Screenshot 2024-04-08 at 3.58.55 pm.png
    Screenshot 2024-04-08 at 3.58.55 pm.png
    105.4 KB · Views: 2
(the key here is that distance is the constant. If speed or time are the constant, you have a linear relationship between the remaining two parameters)
 
(the key here is that distance is the constant. If speed or time are the constant, you have a linear relationship between the remaining two parameters)

Speed is
If it were linear (i.e. able to be calculated using y=mx+c) then there is a speed at which the time to travel x distance is zero.

Velocity = Distance/Time >> v = d/t
Rearrange that for t = d/v, which can also be represented t=dv^-1
It's an exponential graph.

Put it another way.
If at speed x, your time for the bottle to travel distance y might be, say, 1000ms.
At speed 2x, the time will be 500ms
At speed 3x, 250ms
At speed 4x, 125ms
Each time you double the speed, you halve the time.

I went through this exact process trying to calculate dwell time in a spiral freezer from a known belt speed, when the OEM had always done it with a linear calculation. Their linear calculation was near enough as to not make any practical difference - if you constrain your application to between 3 and 6 on the x axis below, it's close enough to linear that nobody will notice - but I couldn't let it go until I'd wrapped my brain around why distance travelled is not linear with regard to speed.

I stand corrected. In practical terms, noone is running a production line at 0 or infinite speed. Refer back to my original post, finding a min and max. It's 3am and too tired to do the math, but it gives me some food for thought. Thanks.
 
Explain how it is non linear.

Assume detection is 5 inches from reject.

A bottle travels 5 inches per sec, it takes 1 sec to go 5 inches. Forgetting about delay to energize or delay to detect which would be a constants, in 5 inches or 1 second a puff of air is needed. If the bottle is traveling at 10 inches per sec, it takes .5 sec to travel 5 inches. If it's traveling 20 inches per sec it reaches the same spot in .25 sec. Thats a linear function. Delay is simply distance/speed - Constant.

Maybe you are confusing speed of the bottle (in/sec) with rate of bottles (bottles per sec)? Speed that the bottle traverses the delivery system from detection to rejection is all that matters. Rate would dictate how dense the shift register becomes with bottles, but each cell of the shift represents a physical distance. The pulse of the shift changes with speed.

I've done dozens of these type systems, tracking widget movement, pattern stitching, volume dispensing,...all with linear speed compensation. It's nothing more than a PLS (programmable limit switch) application and those use linear speed compensation.

As for web payoffs or winders, thats diameter comp that enters into length vs speed of the mandrel vs speed of web. Not sure how that's germaine to the linear travel of a bottle down a delivery system.

Boy, I should learn not to post after 18 hour days...lol. I explained to myself how it's an inverse proportional function and then called it linear. 100 lashes for me.

Talk about not seeing the forest for the trees.

I will say in "practical" terms, most production lines run within a relative narrow confine of speed range and therefore linear approximation works 99% of the time. But in theory from 0 to infinity, ASF and Bitboy are completely accurate that across that range, it's a decay function.

Mea culpa all around :)
 

Similar Topics

Hey guys, I have to work on a project using AB plc. I have 12 indeed conveyors from which boxes are enter into the main conveyor. The main...
Replies
4
Views
1,954
Hi guys, I am pretty new when it comes to programming. I am working with CX-Programmer and I am having a problem where I have a sensor on my...
Replies
6
Views
693
Hi all, i have a very slow indexing machine where we are looking to make everything as bulletproof as possible, money is not much of a factor...
Replies
12
Views
3,069
Good morning (EST), I am trying to implement the code below in on an S7-1200. It's barely half a dozen instructions, but I am stuck; I have not...
Replies
26
Views
5,694
Hi everyone I am completely new to using shift registers and am a bit stuck, my shift register works as should, it is for an overhead conveyor...
Replies
55
Views
15,631
Back
Top Bottom