Using Lower Accels While Jogging

More
3 years 1 month ago #280265 by Beef
Hey, so I'm trying to follow instructions from forum.linuxcnc.org/38-general-linuxcnc-q...n-in-jog-manual-mode with the knowledge that things are a bit outdated there (2015). Using my limited understanding of HAL, the adjustments I made resulted in the following (I have LinuxCNC 2.9 on my machine at the moment)
Code:
loadrt mux2 names=xmux,ymux,zmux addf xmux servo-thread addf ymux servo-thread addf zmux servo-thread net slowselect <= halui.mode.is-manual net slowselect => xmux.sel => ymux.sel => zmux.sel setp xmux.in0 [AXIS_X]MAX_ACCELERATION setp ymux.in0 [AXIS_Y]MAX_ACCELERATION setp zmux.in0 [AXIS_Z]MAX_ACCELERATION setp xmux.in1 1000 setp ymux.in1 1000 setp zmux.in1 1000 net xmux.out => ini.x.max_acceleration net ymux.out => ini.y.max_acceleration net zmux.out => ini.z.max_acceleration

When looking in HalShow, I have ini.x.max_acceleration (and Y and Z) pins and its current values match what I have written in the INI file. I can also manually set val for it in Halshow. I have placed the above code into a jog.hal file and linked it at the bottom of the other hal files in my main configuration.

However, I get the error
Code:
./jog.hal:17: Pin 'ini.x.max_acceleration' does not exist 3140

so it's clear that either there's some nuance to how to reference the pin, or I'm missing something about load order where that pin has not yet been created.

Please Log in to join the conversation.

More
3 years 1 month ago #280268 by Aciera
Two things:

1. Try loading it as POSTGUI_HALFILE

2. Fix your last three lines to this (you are missing a signal name):
net xmux-sig xmux.out => ini.x.max_acceleration
net ymux-sig ymux.out => ini.y.max_acceleration
net zmux-sig zmux.out => ini.z.max_acceleration

Please Log in to join the conversation.

More
3 years 1 month ago #280269 by Beef
Thanks, I'll give it a go.

I think that second part will be the answer. It makes sense as the xmux.out is a pin and not a signal when re-reading the mux2 and net documentation.

Please Log in to join the conversation.

More
3 years 1 month ago #280271 by Beef
Well it works, and it did require both elements. Thanks for the assistance.
I guess it makes sense that it requires postgui since it includes the halui.mode.is-manual element.
For any who come here anyway, the working HAL code is as follows
Code:
# Slow Jogging - Add this to your postgui halfile loadrt mux2 names=xmux,ymux,zmux addf xmux servo-thread addf ymux servo-thread addf zmux servo-thread net slowselect <= halui.mode.is-manual net slowselect => xmux.sel => ymux.sel => zmux.sel # This reads in the values from your .ini for each axis setp xmux.in0 [AXIS_X]MAX_ACCELERATION setp ymux.in0 [AXIS_Y]MAX_ACCELERATION setp zmux.in0 [AXIS_Z]MAX_ACCELERATION # Replace each with the value you want for jogging accels setp xmux.in1 1000 setp ymux.in1 1000 setp zmux.in1 1000 net xmux-sig xmux.out => ini.x.max_acceleration net ymux-sig ymux.out => ini.y.max_acceleration net zmux-sig zmux.out => ini.z.max_acceleration

Please Log in to join the conversation.

More
3 years 1 month ago #280282 by Roguish
there is special accel parameters for jogging..

     setp joint.0.jog-accel-fraction .2

 

Attachment not found

Please Log in to join the conversation.

More
3 years 1 month ago #280296 by Beef
Well that's a hell of a lot cleaner. I saw this on the Discord from you and intended to cross-post here for whoever comes with a similar question, but you beat me to it.

Thanks for pointing this out.

Please Log in to join the conversation.

Time to create page: 0.145 seconds
Powered by Kunena Forum