Programming S-curve motion profiles

... that rule about the initial jerk always being in the direction of the move ...

That's just calculus: the second derivative is always in the same direction.
It's the same with distance and acceleration, if you want to move a positive distance you need to start with a positive acceleration.

So if you have a positive velocity you need an initial positive jerk.

It gets more complicated if you are already moving, e.g. if you are tracing a profile, where you might already have negative acceleration and negative velocity happening and the next segment is "more positive" then you will have a positive addition to the existing negative values of V and A , and J will be positive (having been zero prior to this) .
 
That's just calculus:
I don't have a problem with that cf. here.

the second derivative is always in the same direction.
Apart from semantic ambiguity (second derivative of what?), assume d^2Postion/dt^2 is meant: what if the initial and final (target) acceleration have opposite sign?

...So if you have a positive velocity you need an initial positive jerk.


Arrgh, more ambiguity: positive initial velocity? final? change?


... It gets more complicated if you are already moving, e.g. if you are tracing a profile ...


Ah, so are you are saying the "rule" only applies to "simple" cases then? Because I interpreted it's original context as universal, i.e. from any initial PVA to any final PVA.


Sigh. Communication, humankind's second biggest problem.
 
What rules are you guys talking about?
There is one rule that rules them all. The Lyapunov function.
Lyapunov's rule for stability can be used to determine whether the sign of the errors in position, velocity and acceleration are correct and if not then how the next higher up derivative needs to change so the lower derivatives will converge with 0 error.

Unfortunately the explanations for the Lyapunov function are clear as mud. The wolfram example is bad. I could do a better job of explaining.
It is a simple trick we use here and there.

That will keep you scratching your head.

So a PLC can generate a 7 segment motion profile. The problem is that NO ONE on this forum has figured out how. After 3 weeks it is easier/cheaper to buy the motion controller.
 
The problem is that NO ONE on this forum has figured out how.

Not everyone has tried yet.

I already gave a solution for the simple problem where Vmax and Amax are reached.

I am only trying to understand the terms at this point.


After 3 weeks it is easier/cheaper to buy the motion controller


But not nearly as interesting.
 
Last edited:
There are many cases.

...I think you need to get better at generalizing.

Hey Peter! NO ONE on this forum has proven they can add integers! I haven’t seen it! Only me and one other person has ever solved adding integers!!!! Sure, you can do the easy case to add 1, but what if the number was 3?! Or if it was negative?! There are aleph naught cases!!!!! CaN U or SoLVe aLL OF tHeM?!!!!
 
But is your .png ALL of the cases?!!! What if I have a 7?!!! Does your .png handle that case????
Yes, can't you see there is a file called seg1234567
That handles the simple case where all 7 segments are used.
There is also a seg123567 where the commanded velocity is not reached so there is no constant velocity segment.
How do you calculate the peak velocity reached?



It also takes into account responding to moves on-the-fly and where the command position is behind the current target position so the target must slow down and go start the whole motion sequence again in the reverse direction.


...let’s see how long it takes you to figure out where I’m going with this.
You stepped in it.



Read this
http://www.plctalk.net/qanda/showthread.php?t=119883
It gives away the simple solution.
 
Yes, can't you see there is a file called seg1234567
That handles the simple case where all 7 segments are used.
There is also a seg123567 where the commanded velocity is not reached so there is no constant velocity segment.
How do you calculate the peak velocity reached?

Wow, you completely missed the question. I didn’t ask about 7 segments. I asked about the number 7 as an input parameter.

I’m not sure you’ll be able to follow along any further, so I’ll just spell it out for you.

I don’t see separate cases for things like whether or not a segment has a time span of zero anymore than I see different cases for someone passing in a 7 instead of an 8. It’s all calculated.

Did you know it’s technically possible to write a single abstraction that can calculate all of the targets for any input?

That’s where I was going with this. And why I said you need to get better at generalizing. And why I made fun of all of your “cases”.
 
Wow, you completely missed the question. I didn’t ask about 7 segments. I asked about the number 7 as an input parameter.
For what? Position, velocity, acceleration. How can I read a mind that is intentionally left blank?





I’m not sure you’ll be able to follow along any further, so I’ll just spell it out for you.
First you must understand the problem.



I don’t see separate cases for things like whether or not a segment has a time span of zero anymore than I see different cases for someone passing in a 7 instead of an 8. It’s all calculated.
7 or 8 what?
What is all calculated?



Did you know it’s technically possible to write a single abstraction that can calculate all of the targets for any input?
What is an abstraction? Show us!










That’s where I was going with this. And why I said you need to get better at generalizing. And why I made fun of all of your “cases”.[/QUOTE]
 

Similar Topics

Hey everyone, I have a sensor that gives a 4 - 20 mA signal that is not perfectly linear. There is a bit of a curve in it. I would like to hook...
Replies
27
Views
4,638
Does anyone can explain me how to do s-curve (for increasing and decreasing speed of the process ) programming in siemens simatic S7. If...
Replies
1
Views
1,857
Hello colleagues, Some time ago I started my adventure with programming. With your help and the courses, things are starting to come together...
Replies
13
Views
591
Dear All, I need a sample PLC program to count the output pulse of a mass flow meter so that a specific amount of mass (for example 100gm)can be...
Replies
2
Views
80
Hi Please I have zeilo smart relay #SR2A201BD but I don't have it's programming cable. Can I use any general usb/rs232 converter? Or need...
Replies
2
Views
79
Back
Top Bottom