Change max acceleration, especially for pause, while running a file.

More
14 Aug 2017 01:05 #97433 by Nico2017
Hi,

was wondering if it was possible to adapt the maximum acceleration of the motion while running a ngc file.

More precisely I would like to increase the acceleration to a higher value when I pause in order to stop the motion more quickly. Then when I resume would like to use the default acceleration to have a smooth start motion.

Is such a thing possible? I have been trying to change the hal pin ini.0.max_acceleration and or ini.x.max_acceleration values. If I change them while running the file, nothing happens and it carries on with the initial acceleration when the file was started. If I change it just before the program.pause is activated or at the same time, again it does not change anything.

I guess the trajectory planner interpreter cannot really change on the go the acceleration and recompute the new trajectory so might not be possible.


Nicolas

Please Log in or Create an account to join the conversation.

More
14 Aug 2017 01:23 #97434 by dgarrett

I guess the trajectory planner interpreter cannot really change on the go the acceleration and recompute the new trajectory so might not be possible.


Correct -- ini hal pins are handled by the milltask module and changed
values are accepted only when there is no motion.

Please Log in or Create an account to join the conversation.

More
14 Aug 2017 01:32 #97435 by Nico2017
So would a new value be accepted and taken into account at a moment where there is no motion on the file?

Please Log in or Create an account to join the conversation.

More
14 Aug 2017 02:03 - 14 Aug 2017 02:34 #97437 by dgarrett

So would a new value be accepted and taken into account at a moment where there is no motion on the file?

no -- values are sampled only when a program (or mdi command or jogging move) is not running

Testing is easy using any of the supplied sim configs requiring no hardware.
For example, in a terminal (with same rip-environment if using a run-in-place build):
$ sim_pin ini.x.max_velocity ini.x.max_acceleration &
Last edit: 14 Aug 2017 02:34 by dgarrett.

Please Log in or Create an account to join the conversation.

More
14 Aug 2017 03:21 #97439 by Nico2017
Being investigating the different possibilities, I still have some questions related to some weird behavior observed:

-when pausing which max_acceleration value is supposed to be used? The axis ini.x.max_acceleration or joint ini.0.max_acceleration max acceleration? In my opinion as I am homed it should be the axis one but not sure, see the second point:
-was trying to change the hal value of ini.x.max_acceleration when the pause was triggered to a higher value during 0.8s to force the pause with a higher acceleration at the begining. It seems that doing a serie of pause/resume generates a random behavior presenting either a fast pause with high acceleration or a slow pause with low acceleration. Is it possible that the value get updated on a pause once the machine motion is stopped. Which could explain that for the next resume and the next stop the acceleration is different. Or is it a random behavior wether the pause either consider the axis or joint max acceleration which can be different? I attached some halscope log curves about the velocity (blue with Y on left axis) where we can see the slow pause first and the fast pause in second triggered by the orange signal (binary right axis).The first acceleration is about 200 mm/s2 and the second one about 690mm/s2 which does not correspond also to any parameter of my ini file. Those two pauses are done within the same ngc file.

Nico
Attachments:

Please Log in or Create an account to join the conversation.

More
01 Oct 2017 21:16 #99750 by Nico2017
Hi,

OK, so we cannot change the acceleration if the program is running or if there is a motion. What about a M100 python script called within the Gcode on a location where the machine stops. This M100 script would save the current line, send the abord command, change the ini acceleration through halcmd setp then resumes from the saved line.

With this way I can adapt the acceleration within the Gcode file and have for example some part where the machine has a low acceleration and some other parts where the machine has a high acceleration The switch from to another is done at a location where the machines stops.

Nico

Please Log in or Create an account to join the conversation.

More
03 Oct 2017 22:14 #99870 by andypugh
Might work, but it sounds elaborate.

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum