XHC-HB04 wireless MPG pendant HAL module
08 Jan 2017 11:18 #85463
by timmert
Replied by timmert on topic XHC-HB04 wireless MPG pendant HAL module
Trying to get the pendant (5m usb cable) to work. I got it working some time ago but somehow I'm unable to get it working again...
What I did
used the files from the sample config and copied them to my config
I copied 'xhc-hb04.tcl' to my config folder
Edited my .ini file:
HALFILE = xhc-hb04.tcl
[XHC_HB04_CONFIG]
layout = 2
coords = x y z
coefs = 1 1 1 1
scales = 1 -1 1 1
jogmode = normal
sequence = 1
require_pendant = no
inch_or_mm = mm
mpg_accels = 50 50 500 600
When I start it now it complains it's missing the buttons stanza...makes sense. But the first step works.
And beneath I added (copy from the xhc-hb04-layout2.ini)
[XHC_HB04_BUTTONS]
# use button names according to layout file LIB:xhc-hb04-layout{n}.cfg
# note: "start-pause" is connected for standard behavior
# controlling halui.pause/halui.resume/halui.run
# these are examples, edit as required:
goto-zero = halui.mdi-command-00
# synthesized per-axis buttons for goto-zero button:
goto-zero-x = ""
goto-zero-y = ""
goto-zero-z = ""
goto-zero-a = ""
start-pause = std_start_pause
rewind = halui.program.step
# probe-input for simulating a probe:
probe-z = motion.probe-input
macro-3 = halui.mdi-command-03
half = halui.spindle.stop
# synthesized per-axis buttons for half button:
half-x = ""
half-y = ""
half-z = ""
half-a = ""
zero = ""
# synthesized per-axis buttons for zero button:
zero-x = halui.mdi-command-12
zero-y = halui.mdi-command-13
zero-z = halui.mdi-command-14
zero-a = halui.mdi-command-15
safe-z = halui.mdi-command-10
# in this sim, home-all only works first time, hold down till finished:
home = halui.home-all
macro-1 = halui.mdi-command-01
macro-2 = halui.mdi-command-02
spindle = halui.spindle.start
step = xhc-hb04.stepsize-up
mode = ""
macro-6 = halui.mdi-command-06
macro-7 = halui.mdi-command-07
stop = halui.program.stop
reset = halui.estop.activate
[HALUI]
# these are examples, edit as required:
# a halui hal pin is created for each MDI_COMMAND below
# halui.mdi-command-00, halui.mdi-command-01,... etc
MDI_COMMAND=G0 X0 Y0 Z0
MDI_COMMAND=(debug, example: mdi-01)
MDI_COMMAND=(debug, example: mdi-02)
#03 M110: clears notifications
MDI_COMMAND=M110
MDI_COMMAND=(debug, example: mdi-04)
MDI_COMMAND=(debug, example: mdi-05)
MDI_COMMAND=(debug, example: mdi-06)
#07 M101: example print to stdout
MDI_COMMAND=M101
MDI_COMMAND=(debug, example: mdi-08)
MDI_COMMAND=(debug, example: mdi-09)
MDI_COMMAND=(debug, example: mdi-10)
MDI_COMMAND=(debug, example: mdi-11)
#12
MDI_COMMAND= G10 L20 P0 X0
#13
MDI_COMMAND= G10 L20 P0 Y0
#14
MDI_COMMAND= G10 L20 P0 Z0
#15
MDI_COMMAND= G10 L20 P0 C0
#*** End #INCLUDE file: layout2.inc
I should use layout2 because I have the 17 button pendant.
But when I start LinuxCNC it says: "pin 'halui.spindle.stop' was already linked to signal 'spindle-manual-stop' "
And I have no clue what to change
Any ideas?
What I did
used the files from the sample config and copied them to my config
I copied 'xhc-hb04.tcl' to my config folder
Edited my .ini file:
HALFILE = xhc-hb04.tcl
[XHC_HB04_CONFIG]
layout = 2
coords = x y z
coefs = 1 1 1 1
scales = 1 -1 1 1
jogmode = normal
sequence = 1
require_pendant = no
inch_or_mm = mm
mpg_accels = 50 50 500 600
When I start it now it complains it's missing the buttons stanza...makes sense. But the first step works.
And beneath I added (copy from the xhc-hb04-layout2.ini)
[XHC_HB04_BUTTONS]
# use button names according to layout file LIB:xhc-hb04-layout{n}.cfg
# note: "start-pause" is connected for standard behavior
# controlling halui.pause/halui.resume/halui.run
# these are examples, edit as required:
goto-zero = halui.mdi-command-00
# synthesized per-axis buttons for goto-zero button:
goto-zero-x = ""
goto-zero-y = ""
goto-zero-z = ""
goto-zero-a = ""
start-pause = std_start_pause
rewind = halui.program.step
# probe-input for simulating a probe:
probe-z = motion.probe-input
macro-3 = halui.mdi-command-03
half = halui.spindle.stop
# synthesized per-axis buttons for half button:
half-x = ""
half-y = ""
half-z = ""
half-a = ""
zero = ""
# synthesized per-axis buttons for zero button:
zero-x = halui.mdi-command-12
zero-y = halui.mdi-command-13
zero-z = halui.mdi-command-14
zero-a = halui.mdi-command-15
safe-z = halui.mdi-command-10
# in this sim, home-all only works first time, hold down till finished:
home = halui.home-all
macro-1 = halui.mdi-command-01
macro-2 = halui.mdi-command-02
spindle = halui.spindle.start
step = xhc-hb04.stepsize-up
mode = ""
macro-6 = halui.mdi-command-06
macro-7 = halui.mdi-command-07
stop = halui.program.stop
reset = halui.estop.activate
[HALUI]
# these are examples, edit as required:
# a halui hal pin is created for each MDI_COMMAND below
# halui.mdi-command-00, halui.mdi-command-01,... etc
MDI_COMMAND=G0 X0 Y0 Z0
MDI_COMMAND=(debug, example: mdi-01)
MDI_COMMAND=(debug, example: mdi-02)
#03 M110: clears notifications
MDI_COMMAND=M110
MDI_COMMAND=(debug, example: mdi-04)
MDI_COMMAND=(debug, example: mdi-05)
MDI_COMMAND=(debug, example: mdi-06)
#07 M101: example print to stdout
MDI_COMMAND=M101
MDI_COMMAND=(debug, example: mdi-08)
MDI_COMMAND=(debug, example: mdi-09)
MDI_COMMAND=(debug, example: mdi-10)
MDI_COMMAND=(debug, example: mdi-11)
#12
MDI_COMMAND= G10 L20 P0 X0
#13
MDI_COMMAND= G10 L20 P0 Y0
#14
MDI_COMMAND= G10 L20 P0 Z0
#15
MDI_COMMAND= G10 L20 P0 C0
#*** End #INCLUDE file: layout2.inc
I should use layout2 because I have the 17 button pendant.
But when I start LinuxCNC it says: "pin 'halui.spindle.stop' was already linked to signal 'spindle-manual-stop' "
And I have no clue what to change
Any ideas?
Please Log in or Create an account to join the conversation.
08 Jan 2017 13:28 #85466
by rodw
Replied by rodw on topic XHC-HB04 wireless MPG pendant HAL module
5.0m is the maximum limit for a USB cable under the USB specs. You need the highest quality cable to get that far otherwise you need to add a USB hub. Not many cables will make the grade.
Says he who found out the hard way after cutting the end of a 5.0m long USB cable to get it through a vehicle firewall only to find it would not work. I had to cut it off again, shorten the cable add a hub and resolder it all again!
Says he who found out the hard way after cutting the end of a 5.0m long USB cable to get it through a vehicle firewall only to find it would not work. I had to cut it off again, shorten the cable add a hub and resolder it all again!
Please Log in or Create an account to join the conversation.
08 Jan 2017 14:37 - 08 Jan 2017 16:01 #85467
by timmert
Replied by timmert on topic XHC-HB04 wireless MPG pendant HAL module
I believe they come original with 5m cable
I know that's the maximum for USB. But so far (knock knock) never had problems with it under Mach3.
I got the pendant working fine with the sample config.
But when I make the config ready for my own. It says the signals are already linked.
It's unclear to me how to get it working now. Not possible to have 2 signals on the same function?
Edit
Found it and got it working
The HAL file I received from the supplier contained already a config for a pendant (but not for the pendant I'm using).
When I removed all these settings the pendant is working.
Edit
Only thing that's not working is I can't zero Y and Z with the pendant
Zeroing X is working fine
I know that's the maximum for USB. But so far (knock knock) never had problems with it under Mach3.
I got the pendant working fine with the sample config.
But when I make the config ready for my own. It says the signals are already linked.
It's unclear to me how to get it working now. Not possible to have 2 signals on the same function?
Edit
Found it and got it working
The HAL file I received from the supplier contained already a config for a pendant (but not for the pendant I'm using).
When I removed all these settings the pendant is working.
Edit
Only thing that's not working is I can't zero Y and Z with the pendant
Zeroing X is working fine
Last edit: 08 Jan 2017 16:01 by timmert.
Please Log in or Create an account to join the conversation.
11 Jul 2018 23:01 #114036
by Lcvette
Replied by Lcvette on topic XHC-HB04 wireless MPG pendant HAL module
I just read this whole thing is there a solid finished revision and instruction anywhere now for this? I have a XHC WHB04-L from a previous Mach3 machine and never thought it may work on my big machine as a pendant, I would love to have it as a way to jog and have some control other than the main control panel, but it seems there is alot of confusion as to whats what from all the reading i just did. any direction would be much appreciated!
I am running a 7i92 with 7i76 and 7i77 using preempt RT stretch and linuxcnc version 2.7.13 at the moment.
Thanks in advance!
Chris
I am running a 7i92 with 7i76 and 7i77 using preempt RT stretch and linuxcnc version 2.7.13 at the moment.
Thanks in advance!
Chris
Please Log in or Create an account to join the conversation.
31 Jul 2020 09:37 #176625
by kang2k
Replied by kang2k on topic XHC-HB04 wireless MPG pendant HAL module
Please Log in or Create an account to join the conversation.
01 Jun 2021 11:46 #210879
by neodym
Replied by neodym on topic XHC-HB04 wireless MPG pendant HAL module
Unfortunately I couldn't get the xhc-hb04 to work under Linuxcnc2.8.0 / Debian10.
That has become very confusing and extensive. This only makes mistakes that are difficult to interpret.
The handwheel was originally intended for a lathe on a Mesa 5i20.
Should I have overlooked a current manual, I would be very happy to hear from you. Sample files are also very welcome.
Many thanks for your help
That has become very confusing and extensive. This only makes mistakes that are difficult to interpret.
The handwheel was originally intended for a lathe on a Mesa 5i20.
Should I have overlooked a current manual, I would be very happy to hear from you. Sample files are also very welcome.
Many thanks for your help
Please Log in or Create an account to join the conversation.
04 Jun 2021 09:35 #211135
by andypugh
Replied by andypugh on topic XHC-HB04 wireless MPG pendant HAL module
Can you try updating to LinuxCNC 2.8.1 ?
This fix might be related:
github.com/LinuxCNC/linuxcnc/commit/85a8...648d52c9db242db8bd46
This fix might be related:
github.com/LinuxCNC/linuxcnc/commit/85a8...648d52c9db242db8bd46
Please Log in or Create an account to join the conversation.
17 Aug 2022 07:21 #249935
by Samuelx
Replied by Samuelx on topic XHC-HB04 wireless MPG pendant HAL module
great video about setting up the hal file for mpg
Please Log in or Create an account to join the conversation.
Time to create page: 0.127 seconds