Using Lower Accels While Jogging

  • Beef
  • Beef's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
08 Sep 2023 11:31 - 08 Sep 2023 11:34 #280265 by Beef
Using Lower Accels While Jogging was created 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)
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
./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.
Last edit: 08 Sep 2023 11:34 by Beef.

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

  • Aciera
  • Aciera's Avatar
  • Away
  • Administrator
  • Administrator
More
08 Sep 2023 12:16 #280268 by Aciera
Replied by Aciera on topic Using Lower Accels While Jogging
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
The following user(s) said Thank You: Beef

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

  • Beef
  • Beef's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
08 Sep 2023 12:30 #280269 by Beef
Replied by Beef on topic Using Lower Accels While Jogging
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 or Create an account to join the conversation.

  • Beef
  • Beef's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
08 Sep 2023 13:04 #280271 by Beef
Replied by Beef on topic Using Lower Accels While Jogging
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
# 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 or Create an account to join the conversation.

More
08 Sep 2023 18:24 #280282 by Roguish
Replied by Roguish on topic Using Lower Accels While Jogging
there is special accel parameters for jogging..

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

 
Attachments:
The following user(s) said Thank You: Aciera, Beef

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

  • Beef
  • Beef's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
08 Sep 2023 22:26 #280296 by Beef
Replied by Beef on topic Using Lower Accels While Jogging
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 or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum