Help please with programming a timer value that depends on a conveyor speed

Of course it is.....

I didn't miss anything.

"Linear" is to do with the scale factor value, which can be positive or negative, and if that scale remains constant, then the relationship is "linear". If the scaling factor changes in any way, the relationship becomes "non-linear".

Linear means "straight-line" and a straight line is produced if m is kept a constant in the scaling equation y = mx + c

If m is kept a constant, it can be positive, to give "proportional", or negative, to give "inversely proportional".

The "proportional" part of the description is the scaling, and if you don't say "inversely" y increases as x increases. When you add "inversely", y will decrease as x increases.

Proportional and Inversely Proportional are both Linear.

A linear equation is a straight line:
https://www.quora.com/Why-is-the-graph-of-a-linear-equation-always-a-straight-line
https://en.wikipedia.org/wiki/Linear_equation

Inversely proportional isn't a first order polynomial (linear equation). How do you express m in y=m*x+c for 200/x?

As Bernie said, plot 200/x and you'll see.

Straight_or_not.png


I got it now, you mix up proportional with a negative m and the term inversely proportional. A proportional equation with a negative m isn't not called inversely proportional. Look it up.

Inverse proportionality on wikipedia:
https://en.wikipedia.org/wiki/Proportionality_(mathematics)#Inverse_proportionality
 
Last edited:
in the equation y=mx+c

m is the scaling factor.
c is the intercept on the y axis.

The scaling factor is the slope ( y/x) of the straight-line equation, in this case .... (10-4)/(20-50) = -0.2

The c is 14 because that is where that straight-line needs to cross the y axis.

2018-02-08_180557.jpg
 
ithe equation y=mx+c

m is 200.
If m were -200, then the slope would be "inverted".

But the equation is 200 / x, not 200 * x.

As the rate (x) approaches 0 (the line is stopping), the time between widgets approaches infinity, asymptotically.

As the rate (x) approaches infinity (really fast line) the time between widgets asymptotically approaches 0.


Bernie is right.
 
The question isn't whether you CAN derive a linear scaling, it's if that's what the OP wanted. For this particular application the answers are correct if the time multiplied by the speed equals a constant. The linear scaling doesn't do this. The inverse formula does.
 
I suppose the real question to ask is does Jim want "inversely proportional" by your definition.

In other words does he want a "straight-line" scaling that is the invert (inverse ?), of the y=kx+c equation (remember, c can be 0), or does he actually want a non-linear scaling that the inverse proportional equation of y=(k/x)+c gives.

All through I have assumed he wanted linear, and it was only when I plotted the y=k/x I realised that it does not produce a straight-line scaling, which in my mind is odd because it still has the word "proportional" in its moniker.

Perhaps I'm getting as confused as the rest of the web, there does seem to be a lot of descriptions that do not mention that "inversely proportional" is in no way proportional at all.

The distinction may be the difference between "inversely proportional" and "inverted proportional"
 
If you want, say a conveyor, to run the same distance every time, but speed varies from one run to the next run you need an equation where

y*x=c (c=constant, y=time, x=speed) and c is the distance

This is the definition of an inversely proportional equation.

A relationship between two variables in which the product is a constant. When one variable increases the other decreases in proportion so that the product is unchanged. (this is where it gets proportional, when you weigh in a third aspect, the distance in this case)

Inversely proportional is universally recognized, not just "our definition".
 
Last edited:
Hi guys, I'm the OP.

Thanks for all your inputs and the maths lessons as well (no irony here).

Although now I'm not sure what I actually need. Is it the inversely proportional relationship (hyperbola) or a linear function with a negative coefficient?

Just to clarify the application. I have a conveyor transferring products from a machine. If the product is faulty (detected by the machine) they need to be rejected (by a pneumatic cylinder) which should happened a fix distance from that machine. The operator can change the speed of the conveyor from those 20 to 50Hz. There is no encoder and any other info about the position of the conveyor. I empirically measured the time 10 and 4 seconds with two extreme speeds. My idea is to use an accumulative timer (triggered by the detection system of the machine) with values based on the speed of the conveyor.

Edit: Hmm, thinking about it again.... It should be a linear dependence, shouldn't it? Maybe I messed up and measured the times wrongly... I'm sorry for all the confusion.
 
Last edited:
So, all these many years, I've been incorrect in thinking that "inversely proportional" is the same as "proportional", but with a negative slope.

I can see now that the y = kx + c equation, which will always produce a straight-line, in any "direction", is a polynomial function, and only equivalent to direct proportionality.

Thanks for the re-education guys, I won't be calling a linear negative slope mapping "inversely proportional" any longer.

🍻
 
Hi guys, I'm the OP.

Thanks for all your inputs and the maths lessons as well (no irony here).

Although now I'm not sure what I actually need. Is it the inversely proportional relationship (hyperbola) or a linear function with a negative coefficient?

Just to clarify the application. I have a conveyor transferring products from a machine. If the product is faulty (detected by the machine) they need to be rejected (by a pneumatic cylinder) which should happened a fix distance from that machine. The operator can change the speed of the conveyor from those 20 to 50Hz. There is no encoder and any other info about the position of the conveyor. I empirically measured the time 10 and 4 seconds with two extreme speeds. My idea is to use an accumulative timer (triggered by the detection system of the machine) with values based on the speed of the conveyor.

Edit: Hmm, thinking about it again.... It should be a linear dependence, shouldn't it? Maybe I messed up and measured the times wrongly... I'm sorry for all the confusion.

I would think it must be a linear relationship.

At half the speed, the distance traveled would be half also. The "inversely proportional" equation doesn't give you that....

EDIT : One problem you may encounter is if the speed is changed while a faulty product is "in-flight" from machine to the reject cylinder.
 
Last edited:
If you have time and speed as variables and need distance kept constant, you need the time to be inversely proportional to the speed.

Please reread my previous post and really think it through. If you're guessing, why not test stuff before answering?

If you want, say a conveyor, to run the same distance every time, but speed varies from one run to the next run you need an equation where

y*x=c (c=constant, y=time, x=speed) and c is the distance

This is the definition of an inversely proportional equation.

A relationship between two variables in which the product is a constant. When one variable increases the other decreases in proportion so that the product is unchanged. (this is where it gets proportional, when you weigh in a third aspect, the distance in this case)

Inversely proportional is universally recognized, not just "our definition".

Think of it this way:
If speed aproaches zero, what time do we need to get the same distance? We would need to approach infinite time. Can we agree on that? Does it sounds like a linear function?

You can easily test which function gives the correct answer. Choose any point but the end points (20 and 50) for both equations an multiply those times you get from the different equations with the corresponding speed. Compare that to 20*10 and 50*4.
 
Last edited:
If you think I'm cheating with the formulas, you have excel to try it out yourselves. Can we agree on time * speed = distance at least?

time_and_distance.png
 
Last edited:

Similar Topics

I'm hurting here and really need help. I have an old machine running a AutomationDirect PLC 405. I have a data collection system that is...
Replies
7
Views
1,647
  • Poll
Micrologix1100 PLC with rslogix software. Does anyone know how to use a single turn absolute rotary encoder as if it were a multiturn encoder...
Replies
2
Views
1,396
Hi everyone, I'm new to ladder programming and I may have been too ambitious thinking I could do a full plc program by myself. My father has a...
Replies
62
Views
14,728
Hello Guys, I'm new to PLC programming and a course I'm currently studying has asked a question and requested we use a shift register. The...
Replies
20
Views
5,935
Hello! I am extremely new to PLC programming and would be incredibly grateful for anyone's input and/or advice. I am not entirely sure how much...
Replies
18
Views
5,758
Back
Top Bottom