XHC-HB04 wireless MPG pendant HAL module

More
9 years 9 months ago #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 to join the conversation.

More
9 years 9 months ago #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 to join the conversation.

More
9 years 9 months ago #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

Please Log in to join the conversation.

More
8 years 3 months ago #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 to join the conversation.

More
6 years 3 months ago #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

Attachment not found

Please Log in to join the conversation.

More
5 years 4 months ago #210879 by neodym
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

Please Log in to join the conversation.

More
5 years 4 months ago #211135 by andypugh
Can you try updating to LinuxCNC 2.8.1 ?

This fix might be related:

github.com/LinuxCNC/linuxcnc/commit/85a8...648d52c9db242db8bd46

Please Log in to join the conversation.

More
4 years 2 months ago #249935 by Samuelx
great video about setting up the hal file for mpg

Please Log in to join the conversation.

More
1 year 6 months ago #326990 by vre
I have already configured in hal cycle start pause stop external buttons
and spindle start stop external buttons and when i start linuxcnc it reports that
these signals already used and can't used by XHC-HB04.
How can i use both the external buttons and XHC-HB04 together without conflict ?

Please Log in to join the conversation.

More
1 year 6 months ago #326993 by COFHAL
You have to use an OR comparator, to connect two inputs to a single output.

Please Log in to join the conversation.

Time to create page: 0.192 seconds
Powered by Kunena Forum