Working config for xhc-whb04b-4 pendant
12 Feb 2022 18:02 #234652
by eriksalo
Working config for xhc-whb04b-4 pendant was created by eriksalo
I had some trouble getting my "new generation" of wireless pendant to work in LinuxCNC. Here's what I did to make it work:
1) I've had the "old" version pendant (an xhc-hb04) for years and it works great. I did a new LinuxCNC build for a friends Bridgeport and though it would be good to upgrade to the "newer" pendant for that build. The build went great but I could not get the pendant to work.
2) I initially tried to use the same config for the WHB that I used for the HB but it didn't work. I found the LInuxCNC MAN page for the WHB model but that didn't work either. Well, it did work but it took me time to figure out what to delete, etc.
3) At the end of the day, you need to do two simple things to make the WHB pendant work:
3a) Modify you main .ini file with the following additions. Note that the MDI commands for the Macros in the "HALUI" section are my custom additions. I programmed Macros to zero x, y and z plus macros for 1/2 x and y.
[HAL]
HALFILE = xhc-whb04b-6.hal
HALUI = halui
[HALUI]
MDI_COMMAND=(DEBUG,<1>)
MDI_COMMAND=G10 L20 P0 X[#<_x>/2.0]
MDI_COMMAND=G10 L20 P0 Y[#<_y>/2.0]
MDI_COMMAND=(DEBUG,<4>)
MDI_COMMAND=(DEBUG,<5>)
MDI_COMMAND=G10 L20 P0 X0
MDI_COMMAND=G10 L20 P0 Y0
MDI_COMMAND=G10 L20 P0 Z0
MDI_COMMAND=(DEBUG,<5>)
MDI_COMMAND=(DEBUG,<9>)
MDI_COMMAND=(DEBUG,<10>)
MDI_COMMAND=(DEBUG,<2>)
MDI_COMMAND=(DEBUG,<12>)
MDI_COMMAND=(DEBUG,<13>)
MDI_COMMAND=(DEBUG,<14>)
3b) Put the attached xhc-whb04b-6.hal file in the same directory as you other ini files. Note that I have a xhc-whb04b-4 but the config and driver for the -6 work just fine
Just like everything linuxcnc (for me), it seemed impossible and took me countless tries to make it work. In the end, when it's done and working I look back and it was amazing simple.
I'll link to a short youtube video to help others with this "hard but simple" procedure.
Erik
1) I've had the "old" version pendant (an xhc-hb04) for years and it works great. I did a new LinuxCNC build for a friends Bridgeport and though it would be good to upgrade to the "newer" pendant for that build. The build went great but I could not get the pendant to work.
2) I initially tried to use the same config for the WHB that I used for the HB but it didn't work. I found the LInuxCNC MAN page for the WHB model but that didn't work either. Well, it did work but it took me time to figure out what to delete, etc.
3) At the end of the day, you need to do two simple things to make the WHB pendant work:
3a) Modify you main .ini file with the following additions. Note that the MDI commands for the Macros in the "HALUI" section are my custom additions. I programmed Macros to zero x, y and z plus macros for 1/2 x and y.
[HAL]
HALFILE = xhc-whb04b-6.hal
HALUI = halui
[HALUI]
MDI_COMMAND=(DEBUG,<1>)
MDI_COMMAND=G10 L20 P0 X[#<_x>/2.0]
MDI_COMMAND=G10 L20 P0 Y[#<_y>/2.0]
MDI_COMMAND=(DEBUG,<4>)
MDI_COMMAND=(DEBUG,<5>)
MDI_COMMAND=G10 L20 P0 X0
MDI_COMMAND=G10 L20 P0 Y0
MDI_COMMAND=G10 L20 P0 Z0
MDI_COMMAND=(DEBUG,<5>)
MDI_COMMAND=(DEBUG,<9>)
MDI_COMMAND=(DEBUG,<10>)
MDI_COMMAND=(DEBUG,<2>)
MDI_COMMAND=(DEBUG,<12>)
MDI_COMMAND=(DEBUG,<13>)
MDI_COMMAND=(DEBUG,<14>)
3b) Put the attached xhc-whb04b-6.hal file in the same directory as you other ini files. Note that I have a xhc-whb04b-4 but the config and driver for the -6 work just fine
Just like everything linuxcnc (for me), it seemed impossible and took me countless tries to make it work. In the end, when it's done and working I look back and it was amazing simple.
I'll link to a short youtube video to help others with this "hard but simple" procedure.
Erik
The following user(s) said Thank You: keyboard, ChironFZ16, Dbsharp, smc.collins, H2B, pistrix, bioname
Please Log in or Create an account to join the conversation.
12 Feb 2022 18:53 #234655
by eriksalo
Replied by eriksalo on topic Working config for xhc-whb04b-4 pendant
Here's a related youtube video:
Please Log in or Create an account to join the conversation.
15 Mar 2022 14:02 #237326
by belli
Replied by belli on topic Working config for xhc-whb04b-4 pendant
Hi Erik,
Was the -A version running on a 2.7 or less version of LCNC and the -B version on 2.8 or later?
Was the -A version running on a 2.7 or less version of LCNC and the -B version on 2.8 or later?
Please Log in or Create an account to join the conversation.
29 May 2022 16:45 #244136
by eriksalo
Replied by eriksalo on topic Working config for xhc-whb04b-4 pendant
Thanks for your question, yes. The early pendant was a couple of years ago prior to the 2.8 release. The new pendant was on 2.8
Please Log in or Create an account to join the conversation.
11 Jun 2022 01:44 #244924
by shanham67
Replied by shanham67 on topic Working config for xhc-whb04b-4 pendant
Eric,
Thank you for the effort you put into this. I am hoping you can point me in the right direction. I commented out the lines indicated by the 'diff' below in the xhc-whb04b-6.hal file you provided in order to get Axis up and running.
If i 'un-comment' the./xhc-whb04-6.hal:45: Pin 'halui.axis.x.select' was already linked to signal 'axis-select-x'
[/code]
Thanks again.
Thank you for the effort you put into this. I am hoping you can point me in the right direction. I commented out the lines indicated by the 'diff' below in the xhc-whb04b-6.hal file you provided in order to get Axis up and running.
These buttons work:
Working:
RESET
* Stop
* Start/Pause
* Feed+
* Feed-
* Spindle+
* Spindle-
* S-ON/OFF
These do not:
* Select Axis knob
* Hand wheel
If i 'un-comment' the
whb.halui.axis.x.select line I get the following startup error:
[code]cncuser@bridgeport1:~/linuxcnc/configs/my_LinuxCNC_machine$ diff xhc-whb04b-6.hal xhc-whb04b-6.hal--as-downloaded-from-erics-linux-forum-post
14c14
< #net machine.is-on halui.machine.is-on whb.halui.machine.is-on
---
> net machine.is-on halui.machine.is-on whb.halui.machine.is-on
35c35
< #net pdnt.mode.is-mdi halui.mode.is-mdi whb.halui.mode.is-mdi
---
> net pdnt.mode.is-mdi halui.mode.is-mdi whb.halui.mode.is-mdi
40,42c40,42
< #net pdnt.axis.X.is-homed halui.joint.0.is-homed whb.halui.joint.x.is-homed
< #net pdnt.axis.Y.is-homed halui.joint.1.is-homed whb.halui.joint.y.is-homed
< #net pdnt.axis.Z.is-homed halui.joint.2.is-homed whb.halui.joint.z.is-homed
---
> net pdnt.axis.X.is-homed halui.joint.0.is-homed whb.halui.joint.x.is-homed
> net pdnt.axis.Y.is-homed halui.joint.1.is-homed whb.halui.joint.y.is-homed
> net pdnt.axis.Z.is-homed halui.joint.2.is-homed whb.halui.joint.z.is-homed
45,47c45,47
< #net pdnt.axis.X.select whb.halui.axis.x.select halui.axis.x.select
< #net pdnt.axis.y.select whb.halui.axis.y.select halui.axis.y.select
< #net pdnt.axis.Z.select whb.halui.axis.z.select halui.axis.z.select
---
> net pdnt.axis.X.select whb.halui.axis.x.select halui.axis.x.select
> net pdnt.axis.y.select whb.halui.axis.y.select halui.axis.y.select
> net pdnt.axis.Z.select whb.halui.axis.z.select halui.axis.z.select
101c101
< #net pdnt.button.m-home whb.button.m-home halui.home-all # Homing use built-in halui home all
---
> net pdnt.button.m-home whb.button.m-home halui.home-all # Homing use built-in halui home all
127,128c127
< #net pdnt.spindle.is-on whb.halui.spindle.is-on spindle.0.on
< #net pdnt.spindle.is-on whb.halui.spindle.is-on
---
> net pdnt.spindle.is-on whb.halui.spindle.is-on spindle.0.on
130,132c129,131
< #net pdnt.spindle.stop whb.halui.spindle.stop halui.spindle.0.stop
< #net pdnt.spindle.forward whb.halui.spindle.forward halui.spindle.0.forward
< #net pdnt.spindle.reverse whb.halui.spindle.reverse halui.spindle.0.reverse
---
> net pdnt.spindle.stop whb.halui.spindle.stop halui.spindle.0.stop
> net pdnt.spindle.forward whb.halui.spindle.forward halui.spindle.0.forward
> net pdnt.spindle.reverse whb.halui.spindle.reverse halui.spindle.0.reverse
135c134
< #net pdnt.spindle-speed-abs whb.halui.spindle-speed-cmd spindle.0.speed-out-abs # speed cmd from motion in rpm absolue
---
> net pdnt.spindle-speed-abs whb.halui.spindle-speed-cmd spindle.0.speed-out-abs # speed cmd from motion in rpm absolue
Thanks again.
~
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 676
- Thank you received: 117
10 Nov 2022 23:59 #256393
by smc.collins
Can you lsusb and see which hardware ID you have, I can't get my pendant to work at all.
Replied by smc.collins on topic Working config for xhc-whb04b-4 pendant
Eric,
Thank you for the effort you put into this. I am hoping you can point me in the right direction. I commented out the lines indicated by the 'diff' below in the xhc-whb04b-6.hal file you provided in order to get Axis up and running.
[/code][/code][/code][/code]These buttons work: Working: RESET * Stop * Start/Pause * Feed+ * Feed- * Spindle+ * Spindle- * S-ON/OFF These do not: * Select Axis knob * Hand wheel If i 'un-comment' the [code]whb.halui.axis.x.select line I get the following startup error: ./xhc-whb04-6.hal:45: Pin 'halui.axis.x.select' was already linked to signal 'axis-select-x' [code][code]cncuser@bridgeport1:~/linuxcnc/configs/my_LinuxCNC_machine$ diff xhc-whb04b-6.hal xhc-whb04b-6.hal--as-downloaded-from-erics-linux-forum-post 14c14 < #net machine.is-on halui.machine.is-on whb.halui.machine.is-on --- > net machine.is-on halui.machine.is-on whb.halui.machine.is-on 35c35 < #net pdnt.mode.is-mdi halui.mode.is-mdi whb.halui.mode.is-mdi --- > net pdnt.mode.is-mdi halui.mode.is-mdi whb.halui.mode.is-mdi 40,42c40,42 < #net pdnt.axis.X.is-homed halui.joint.0.is-homed whb.halui.joint.x.is-homed < #net pdnt.axis.Y.is-homed halui.joint.1.is-homed whb.halui.joint.y.is-homed < #net pdnt.axis.Z.is-homed halui.joint.2.is-homed whb.halui.joint.z.is-homed --- > net pdnt.axis.X.is-homed halui.joint.0.is-homed whb.halui.joint.x.is-homed > net pdnt.axis.Y.is-homed halui.joint.1.is-homed whb.halui.joint.y.is-homed > net pdnt.axis.Z.is-homed halui.joint.2.is-homed whb.halui.joint.z.is-homed 45,47c45,47 < #net pdnt.axis.X.select whb.halui.axis.x.select halui.axis.x.select < #net pdnt.axis.y.select whb.halui.axis.y.select halui.axis.y.select < #net pdnt.axis.Z.select whb.halui.axis.z.select halui.axis.z.select --- > net pdnt.axis.X.select whb.halui.axis.x.select halui.axis.x.select > net pdnt.axis.y.select whb.halui.axis.y.select halui.axis.y.select > net pdnt.axis.Z.select whb.halui.axis.z.select halui.axis.z.select 101c101 < #net pdnt.button.m-home whb.button.m-home halui.home-all # Homing use built-in halui home all --- > net pdnt.button.m-home whb.button.m-home halui.home-all # Homing use built-in halui home all 127,128c127 < #net pdnt.spindle.is-on whb.halui.spindle.is-on spindle.0.on < #net pdnt.spindle.is-on whb.halui.spindle.is-on --- > net pdnt.spindle.is-on whb.halui.spindle.is-on spindle.0.on 130,132c129,131 < #net pdnt.spindle.stop whb.halui.spindle.stop halui.spindle.0.stop < #net pdnt.spindle.forward whb.halui.spindle.forward halui.spindle.0.forward < #net pdnt.spindle.reverse whb.halui.spindle.reverse halui.spindle.0.reverse --- > net pdnt.spindle.stop whb.halui.spindle.stop halui.spindle.0.stop > net pdnt.spindle.forward whb.halui.spindle.forward halui.spindle.0.forward > net pdnt.spindle.reverse whb.halui.spindle.reverse halui.spindle.0.reverse 135c134 < #net pdnt.spindle-speed-abs whb.halui.spindle-speed-cmd spindle.0.speed-out-abs # speed cmd from motion in rpm absolue --- > net pdnt.spindle-speed-abs whb.halui.spindle-speed-cmd spindle.0.speed-out-abs # speed cmd from motion in rpm absolue Thanks again. [code]~
Can you lsusb and see which hardware ID you have, I can't get my pendant to work at all.
Please Log in or Create an account to join the conversation.
15 Jun 2023 09:10 #273592
by Rabin
Replied by Rabin on topic Working config for xhc-whb04b-4 pendant
Very thank you and your video. Help me so mach.
Please Log in or Create an account to join the conversation.
15 Oct 2023 14:31 - 15 Oct 2023 19:12 #283075
by pistrix
Replied by pistrix on topic Working config for xhc-whb04b-4 pendant
Thank you so much for this tutorial, Erik.
There is one thing that is bugging me and I wonder if anyone can give me a hint on how to move on:
If I start the spindle in Gmocappy GUI, it starts to rotate with 6000 RPM as specified in the GUI settings but if I start it with s-on-off button on the pendant, it starts with 100 RPM. Is there a way to start the spindle with the pendant with the same speed as specified in the Gmocappy settings or at least with an arbitrary speed?
Thank you for help.
There is one thing that is bugging me and I wonder if anyone can give me a hint on how to move on:
If I start the spindle in Gmocappy GUI, it starts to rotate with 6000 RPM as specified in the GUI settings but if I start it with s-on-off button on the pendant, it starts with 100 RPM. Is there a way to start the spindle with the pendant with the same speed as specified in the Gmocappy settings or at least with an arbitrary speed?
Thank you for help.
Last edit: 15 Oct 2023 19:12 by pistrix.
Please Log in or Create an account to join the conversation.
31 Dec 2023 14:34 - 31 Dec 2023 14:40 #289433
by pistrix
Replied by pistrix on topic Working config for xhc-whb04b-4 pendant
After lot's of thinking, asking questions, and some logic, I managed to solve this issue using two simple steps:
- to make the pendant button s-on-off start the spindle with the same speed as the GUI button before the S word is defined, add RS274NGC_STARTUP_CODE = Sx to the [RS274NGC] section of your INI file where x are the same RPMs as specified in GUI for Spindle Starting RPM (6000, for example).
- somehow, the pendant button s-on-off starts the spindle and also increases the RPMs for about 100 RPMs. In our example, the GUI would start the spindle to 6000 RPM while the pendant would start it to 6100 RPM. To avoid this, comment the following two lines in xhc-whb04b-6.hal:
# net pdnt.spindle.increase whb.halui.spindle.increase halui.spindle.0.increase
# net pdnt.spindle.decrease whb.halui.spindle.decrease halui.spindle.0.decrease
After these modifications, pendant s-on-off starts the pendant to the same speed as the GUI and the Spindle+/Spindle- buttons work the same way as in the GUI.
I hope someone will find this useful.
- to make the pendant button s-on-off start the spindle with the same speed as the GUI button before the S word is defined, add RS274NGC_STARTUP_CODE = Sx to the [RS274NGC] section of your INI file where x are the same RPMs as specified in GUI for Spindle Starting RPM (6000, for example).
- somehow, the pendant button s-on-off starts the spindle and also increases the RPMs for about 100 RPMs. In our example, the GUI would start the spindle to 6000 RPM while the pendant would start it to 6100 RPM. To avoid this, comment the following two lines in xhc-whb04b-6.hal:
# net pdnt.spindle.increase whb.halui.spindle.increase halui.spindle.0.increase
# net pdnt.spindle.decrease whb.halui.spindle.decrease halui.spindle.0.decrease
After these modifications, pendant s-on-off starts the pendant to the same speed as the GUI and the Spindle+/Spindle- buttons work the same way as in the GUI.
I hope someone will find this useful.
Last edit: 31 Dec 2023 14:40 by pistrix.
The following user(s) said Thank You: Aciera
Please Log in or Create an account to join the conversation.
31 Dec 2023 21:15 #289449
by ewarner77
Replied by ewarner77 on topic Working config for xhc-whb04b-4 pendant
Erik (and the rest of contributors too!) -
Thanks for all the hard work on this topic and sharing what you learned. I'm REALLY looking forward to getting this running on my Tormach 1100 machine. My understanding is that PathPilot is basically LinuxCNC with some customization so I'm pretty sure most of what you have found will be applicable. However I'm stuck at square 0...
I have followed the video and can see the wheel with the lsusb command, but the xhc-whb04b-6 command comes back with the command not found error and I can't seem to find where I can download/install the driver for the pendant. I have been trying to find it on github, but can't seem to figure out how to get this. I need to figure out where things are and then use the command interface in a terminal window as github doesn't seem to be playing nicely on chrome on my tormach and I really don't want to go yet one more layer deep into this multi day and numerous hour long journey...
Any guidance at all is GREATLY appreciated.
Thanks!!!!
Thanks for all the hard work on this topic and sharing what you learned. I'm REALLY looking forward to getting this running on my Tormach 1100 machine. My understanding is that PathPilot is basically LinuxCNC with some customization so I'm pretty sure most of what you have found will be applicable. However I'm stuck at square 0...
I have followed the video and can see the wheel with the lsusb command, but the xhc-whb04b-6 command comes back with the command not found error and I can't seem to find where I can download/install the driver for the pendant. I have been trying to find it on github, but can't seem to figure out how to get this. I need to figure out where things are and then use the command interface in a terminal window as github doesn't seem to be playing nicely on chrome on my tormach and I really don't want to go yet one more layer deep into this multi day and numerous hour long journey...
Any guidance at all is GREATLY appreciated.
Thanks!!!!
Please Log in or Create an account to join the conversation.
Time to create page: 0.151 seconds