- Posts: 459
- Thank you received: 158
LinuxCNC S-Curve Accelerations
- arvidb
- Offline
- Platinum Member
-
Thanks!automata wrote: Hi arvidb,
Nice work with the jerk limited motion.
I am very much interested in helping out and have decent experience in the linuxcnc codebase.
Did you download and compile/run the code that I've already published ? If not, that's a good place to start (for anyone who wants to help).
Please Log in or Create an account to join the conversation.
- arvidb
- Offline
- Platinum Member
-
- Posts: 459
- Thank you received: 158
A bit more interesting than the last plot, don't you think?
There are still a few known bugs in the code, but it's nearing a state where testing might soon become meaningful!
Please Log in or Create an account to join the conversation.
- arvidb
- Offline
- Platinum Member
-
- Posts: 459
- Thank you received: 158
Hi Christian!chris@cnc wrote: hello arvidb hello automata, i would also help as far as i can. My approach would be a 2nd acceleration time in the ini that defines the curve. So we can easily decide whether linear or in s-curve. And the curve defines, for example, the sigmoid function. Some servo manufacturers go this route and it works very well. I have no idea how to start this. what do you think of this idea?
Christian
I think a great way to start would be to make your algorithm move a specified distance. Looking at your plot above, your algorithm moves from v = 0.0 to v = 1.0. Add a deceleration stage (from v = 1.0 to v = 0.0) and then scale peak velocity so that your algorithm ends up moving any distance that you specify as an input.
Then check that your peak velocity doesn't violate any "max velocity" (also specified as an input). If it does, insert a constant velocity segment.
Then make it work with initial velocity not zero.
And so on...
Please Log in or Create an account to join the conversation.
- chris@cnc
- Offline
- Platinum Member
-
- Posts: 529
- Thank you received: 140
Hi arvidb,arvidb wrote: . Add a deceleration stage (from v = 1.0 to v = 0.0) and then scale peak velocity so that your algorithm ends up moving any distance that you specify as an input.
You're right. It's a good idea to climb down the hill.
Maybe someone else can make something of it. I can not...
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
-
- Posts: 12170
- Thank you received: 4153
eg. Save the output first in an intermediate pin and then multiply by 1 or -1 before setting the out pin.
Please Log in or Create an account to join the conversation.
- chris@cnc
- Offline
- Platinum Member
-
- Posts: 529
- Thank you received: 140
Please Log in or Create an account to join the conversation.