Replies: 12 comments 36 replies
-
I have plenty on my plate so take the deep dive. |
Beta Was this translation helpful? Give feedback.
-
This would indeed be cool and maybe even the way to go, but i'm afraid that's way beyond my skills. But i've recently worked through the planner and stepper files to get a feel for it and started adapting it a bit. grblHAL, in my current understanding, works with 3 buffers. My current approach is to adjust the acceleration that the planner uses to calculate entry/exit speeds to include the extra time needed for ramp up / down of the acceleration. So it can continue to operate in trapezoid mode, while the checked out segments acutally apply the jerk to the curve. Any thoughts on that? |
Beta Was this translation helpful? Give feedback.
-
I am watching with great interest, although I'm not so familiar with GRBLHal just yet. Of course we have a bit different implementation for LinuxCNC that I'm working on with Grotius. There's quite a few ways to tackle this particular problem - none of them particularly easy. I think that the two simplest methods involve bringing an external library to do the jerk calculations for you - basically just removing the existing trapezoidal planner and using this tool to calculate your trajectories (and you can keep the existing path planning code and just pass the commanded positions and the relevant vel/acc/jerk limits to it and get your results back) or to just take the existing phases that the trapezoidal motion planner is using and subdivide them into more phases to include increasing/decreasing acceleration on each end. We're of course taking the first option with our approach, passing everything to Ruckig in a single DOF and getting the results back. |
Beta Was this translation helpful? Give feedback.
-
@terjeio I’m helping Dietz0r with getting this tested on a servo machine. We’ve managed to get a firmware compiled and flashed onto the teensy I’m using. The new settings are appearing where they should be(per axis) but they aren’t being populated with the defaults set in settings.c in addition when we try to write a new value to them it doesn’t take. Switching to console and using $$ you can see the value is staying at 0. Is there anything you can think of that might be causing this and would give us an avenue to investigate? |
Beta Was this translation helpful? Give feedback.
-
I am VERY interested to hear how the testing is going with this. I have a large CNC machine and could use the jerk control feature to smooth out the movements. Is the change that you're making compatible with stepper motors as well? I'd also be happy to test any stable changes. BTW, I'm also an embedded firmware developer with 25+ experience who also happens to be using the RT1062 MCU in a project at work. I might also be able to assist with the development of this feature. |
Beta Was this translation helpful? Give feedback.
-
Just a little update on the progress. Feed: 10000mm/m , Accel: 5000mm/s² for both. Trapezoidal.movand with 50000 mm/s³ constant jerk: ConstantJerk.movYou can hear it being way smoother in the corners and on direction changes. It's not almost slamming to a full stop. Jerk-Milling.movThe left part was done with the tradition trapezoidal and the right with jerk. There's already a noticably improved surface finish. MillingResultJerk.movBig thanks to @EmpyreanCNC willing to also run beta software and providing debug help and the videos. :) Cheers! :) |
Beta Was this translation helpful? Give feedback.
-
What's the status on this? |
Beta Was this translation helpful? Give feedback.
-
Hi, thank you for your change, I hope my machine can also use it, so I changed it in the project of bdring/Grbl_Esp32, but unfortunately the change did not succeed, and the machine did not work properly. I modified my code according to the macro definition of ENABLE_JERK_ACCELERATION. Is it possible that Grbl_Esp32 is not compatible with grblHal? I would love to hear from you |
Beta Was this translation helpful? Give feedback.
-
Hello friends, |
Beta Was this translation helpful? Give feedback.
-
Just ran across this thread. The idea of adding S-Curve/JERK is a laudable pursuit. No machine can instantly accel/decel because of inertia. Using s-curve compensates for this by easing into the motion rather than slamming into motion the way trapezoidal motion works. There are added benefits as well: lower instantaneous current demands; less stress to motion parts/equipment; cleaner cuts without oscillations on movement transitions. Use of s-curve/jerk was very popular in usage by me, having retired from the industrial engineering/motion control fields, to make everything work longer and control machine abuse especially with high inertia loads. BTW, the diagram that Dietz0r put up is a good study of the subject. Now to leave this on a interesting note, you have velocity, acceleration, jerk, snap, crackle, and pop. Here is an interesting article if you care to dive into this and get a headache - https://en.wikipedia.org/wiki/Fourth,_fifth,_and_sixth_derivatives_of_position Happy New Year! |
Beta Was this translation helpful? Give feedback.
-
oggi ho provato ad installare il firmware con jerk attivato su mks dlc32...ho alzato i valori $800 e $801 da 100 fino a 60000 ma non ottenevo un movimento regolare. $110 e $111 sono 30000, $120 e $121 sono 3000...se disegno un quadrato e lo eseguo a 30000 parte a scatto per il primo tratto (70% del lato) per poi andare pianissimo nel restante tratto, stessa cosa per gli altri 3 lati...non so...forse è la scheda lenta e quindi non adatta a questa implementazione? e poi...avere un punto di partenza ed affinare le impostazioni? |
Beta Was this translation helpful? Give feedback.
-
https://github.com/grblHAL/core/wiki/Jerk-acceleration the initial checkin of the jerk acceleration wiki page is up, i'm still waiting on the pictures but the text is also helpfull :) |
Beta Was this translation helpful? Give feedback.
-
I recently looked up the old thread for that from 2021 (bevore the repository move) and there was a discussion back then to add s-curve / jerk settings to grblhal.
Before i take a deep dive down this rabbit hole i just wanted to ask if this is still on the roadmap or if it is currently parked.
I think it would be pretty substantial to have access to both 2nd order and 3rd order movement planners.
Greetings
Dietz
Beta Was this translation helpful? Give feedback.
All reactions