XHC-HB04 wireless MPG pendant HAL module

More
08 Jan 2017 11:18 #85463 by timmert
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?

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

More
08 Jan 2017 13:28 #85466 by rodw
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!

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

More
08 Jan 2017 14:37 - 08 Jan 2017 16:01 #85467 by timmert
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
Last edit: 08 Jan 2017 16:01 by timmert.

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

More
11 Jul 2018 23:01 #114036 by Lcvette
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

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

More
31 Jul 2020 09:37 #176625 by kang2k
Hello.
I buy pendant XHC-HB04 from alliexpress, but in linuxcnc not correct working.
Linuxcnc v 2.7.15
in sim, write "connection lost"
And so every few minutes
Attachments:

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

Time to create page: 0.118 seconds
Powered by Kunena Forum