Problem: Analog jog via gamepad does not move axis in LinuxCNC
- Tom369
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
02 Jun 2025 20:07 #329565
by Tom369
Problem: Analog jog via gamepad does not move axis in LinuxCNC was created by Tom369
System:
custom.hal:
loadusr -W hal_input -KRAL Dual
net jog-z input.0.abs-x-position => halui.axis.z.analog
net jog-x input.0.abs-rz-position => halui.axis.x.analog369.hal:
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net jog-speed halui.axis.jog-speedini:
[HAL]
HALUI = halui
HALFILE = 369.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
[KINS]
JOINTS = 2
KINEMATICS = trivkins coordinates=XZWhat I have tried:
Thanks for any ideas!
- CNC lathe with X and Z axes, stepper motors, Mesa 7i96S
- LinuxCNC 2.9.4, config generated by PnCConf, then manually edited
- Logitech Dual Action gamepad via hal_input (-KRAL Dual)
- GUIs tried: axis and gmoccapy, no difference
- Goal: proportional jogging (analog, stick halfway = half speed)
- Only Z axis motor is connected, X is not connected at the moment. Jog via GUI (mouse) works fine.
- Gamepad is detected correctly (evtest, halmeter both show correct values).
- In halmeter/halshow, input.0.abs-x-position and input.0.abs-rz-position change smoothly with stick movement. Scaling set so left = -1, center = 0, right = +1.
- Connections in custom.hal: net jog-z input.0.abs-x-position => halui.axis.z.analog and the same for X.
- The analog pins halui.axis.z.analog and halui.axis.x.analog show the values in halmeter.
- Jogging with GUI works, motors run as expected.
- If I jog with GUI and simultaneously move the stick in the opposite direction, the axis stops moving. This proves the analog value reaches the right place.
- No matter the scaling (tried 1, 127, 32767, etc.), values are correct in HAL but motors do not move from analog stick alone.
- I have NOT tried digital jogging via button/plus/minus, as I only want analog.
- No hardware issue: GUI jog moves motors.
- Estop, enable, limits, homing are all checked and fine.
- All HAL pins/signals seem correct, no missing values.
- No difference with gmoccapy GUI.
custom.hal:
loadusr -W hal_input -KRAL Dual
net jog-z input.0.abs-x-position => halui.axis.z.analog
net jog-x input.0.abs-rz-position => halui.axis.x.analog369.hal:
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net jog-speed halui.axis.jog-speedini:
[HAL]
HALUI = halui
HALFILE = 369.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
[KINS]
JOINTS = 2
KINEMATICS = trivkins coordinates=XZWhat I have tried:
- No hardware issue: GUI jog always works, signals are visible.
- All estop, enable, limit and home inputs are OK.
- No errors in logs, no HAL load error.
- Both axis and gmoccapy GUI tested, no difference.
- Analog pins connected, values update, motors do not move via gamepad.
- All possible scalings tested.
- Did NOT try button jog (digital), only want analog.
- It feels like halui.axis.*.analog is either not "active" or some enable/select/mode/condition is missing, or maybe a bug in halui or GUI blocks analog jogging.
- Is anyone currently using analog jogging with hal_input and halui.axis.x.analog etc. on LinuxCNC 2.9.x? If yes, what is the minimal working config (enable, select, mode...)?
- Does analog jogging need a special enable/select/mode pin to be set?
- Are there known bugs or dependencies in halui/axis/gmoccapy that block analog jogging?
- Can anyone provide a minimal working config for analog jogging?
Thanks for any ideas!
Please Log in or Create an account to join the conversation.
- jtrantow
- Offline
- Premium Member
-
Less
More
- Posts: 125
- Thank you received: 19
03 Jun 2025 02:54 #329584
by jtrantow
Replied by jtrantow on topic Problem: Analog jog via gamepad does not move axis in LinuxCNC
I use analog jog on all three of my machines with 2.9.4. Quite a while ago, I updated the wiki for remote pendant including .hal files you can include.
Please Log in or Create an account to join the conversation.
- Tom369
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
03 Jun 2025 06:14 #329585
by Tom369
Replied by Tom369 on topic Problem: Analog jog via gamepad does not move axis in LinuxCNC
Hello do you mean that instruction:
Simple Remote Pendant using a $10-20 joypad with halui and hal_input
???
The .zip downloadlink sdly doesent work anymore.
Simple Remote Pendant using a $10-20 joypad with halui and hal_input
???
The .zip downloadlink sdly doesent work anymore.
Please Log in or Create an account to join the conversation.
- jtrantow
- Offline
- Premium Member
-
Less
More
- Posts: 125
- Thank you received: 19
03 Jun 2025 13:04 #329598
by jtrantow
Replied by jtrantow on topic Problem: Analog jog via gamepad does not move axis in LinuxCNC
yes that's it. Not sure why the .jpg nor .zip download doesn't work anymore.
If you add these two of these files to your postgui list, you don't need to make any changes to your main configuration .hal. The first file is joystick_jog_speed.hal. Next add _xz or _xyz for a xz lathe or xyz mill configuration. You will also want _extras.hal as it lets you use btn-base and btn-top to go between manual and auto mode. Keeping all your joypad .hal in separate files helps keep track of changes and allows you to simply remove the joypad from a configuration is it's not available. These files have been used on many 2.9.x machines. (Small changes to several names with 2.8.x machines.)
If you add these two of these files to your postgui list, you don't need to make any changes to your main configuration .hal. The first file is joystick_jog_speed.hal. Next add _xz or _xyz for a xz lathe or xyz mill configuration. You will also want _extras.hal as it lets you use btn-base and btn-top to go between manual and auto mode. Keeping all your joypad .hal in separate files helps keep track of changes and allows you to simply remove the joypad from a configuration is it's not available. These files have been used on many 2.9.x machines. (Small changes to several names with 2.8.x machines.)
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- jtrantow
- Offline
- Premium Member
-
Less
More
- Posts: 125
- Thank you received: 19
03 Jun 2025 13:17 #329599
by jtrantow
Replied by jtrantow on topic Problem: Analog jog via gamepad does not move axis in LinuxCNC
You will want to qualify the analog jog with another button press. Both selected speed and analog stick need to be active for jog to occur.
Without this the machine will jog if the analog stick gets stuck at non-zero, which will happen when chips or dust get into the stick. When this happens I take the joypad apart and blow it out with air. After 4-5 years of using joypads on three machines, I should probably ebay a spare.
Without this the machine will jog if the analog stick gets stuck at non-zero, which will happen when chips or dust get into the stick. When this happens I take the joypad apart and blow it out with air. After 4-5 years of using joypads on three machines, I should probably ebay a spare.
Please Log in or Create an account to join the conversation.
Time to create page: 0.068 seconds