XHC-HB04 wireless MPG pendant HAL module
I am running kernel 2.6.32-122-rtai on linux 10.04 and using a newly arrived HB04 pendant.
the code appeared to compile OK.
but like other's I am having difficulty in running linuxcnc with the error from the debug file saying xhc-hb04.hal:20 Pin 'axis.0.jog-enable' does not exist.
commenting that out just gets me an error on the next line for axis.1. etc
I do not appear to have any axis visible, so I'm not sure where to go from here, I suspect I've missed something.
Also which file do these lines go in, I don't seem to have them anywhere, perhaps that is the issue.
[HALUI]
MDI_COMMAND=...
MDI_COMMAND=...
MDI_COMMAND=...
MDI_COMMAND=...
MDI_COMMAND=...
MDI_COMMAND=...
MDI_COMMAND=G10 L20 P1 X0
MDI_COMMAND=G10 L20 P1 Y0
MDI_COMMAND=G10 L20 P1 Z0
MDI_COMMAND=G0 X0 Y0 Z0
I have a standard 3 axis DIY CNC machine and using the joystick version of a pendant, it works fine but I'm keen to get this one going , so any help appreciated.
I also read through all previous post, but most of it was over my head.
thanks for any help you can give
Eric
Edit.....
found the main problem, I added the halfile before the main halfile, when I moved it to last position in [HAL] it started working (with axis 3 errors, but that was easily fixed.)
still not sure anout those other lines though and what they do.
Eric
Please Log in or Create an account to join the conversation.
I am having difficulty in running linuxcnc with the error from the debug file saying xhc-hb04.hal:20 Pin 'axis.0.jog-enable' does not exist.
This can happen if you try to set up the pendant before the motion module is loaded. Your INI file should reference the pendant hal file last in the list.
Also which file do these lines go in, I don't seem to have them anywhere, perhaps that is the issue.
[HALUI]
MDI_COMMAND=...
MDI_COMMAND=...
Not the first issue you have but it will cause an issue later. You need to add those lines, though you do not need to define the G-codes associated with them yet.
Please Log in or Create an account to join the conversation.
Anyway, after reading through this thread a few times, I can now jog my machine in world mode, which is great. And I've been able to get the "=0" button working, but when I use it, LinuxCNC switches back into joint mode, which is annoying. It does this after the Home and Origin buttons as well. Any way to prevent this?
So I'm trying to understand which buttons should be functional and which require additional modification of the hal file because not all of the buttons seem to work. From what I can tell, the C program creates pins, and the hal file ties some of them to signals but relies on MDI commands for the rest. Is this basically correct, and if so, which ones am I supposed to complete?
Hope this makes sense.
Van
Please Log in or Create an account to join the conversation.
This is (or was, it might be fixed) a bug in Halui. One solution was to not load Halui, but the pendant relies on it, so that isn't an option here.And I've been able to get the "=0" button working, but when I use it, LinuxCNC switches back into joint mode, which is annoying. It does this after the Home and Origin buttons as well. Any way to prevent this?
There is an unconfirmed report that the issue no longer exists in the 2.6 pre-release. You could try using that (it also has the pendant driver built in, as a bonus).
buildbot.linuxcnc.org
Largely correct, yes. You need to connect the button hal pins to mdi-command HAL pins to run MDI commands. You can also connect buttons to HAL pins such as spindle-on and coolant.From what I can tell, the C program creates pins, and the hal file ties some of them to signals but relies on MDI commands for the rest. Is this basically correct, and if so, which ones am I supposed to complete?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Here is the subroutine (LinuxCNC format) that I use to touch-off in the X axis & then center the controlled point.
Please Log in or Create an account to join the conversation.
snip from the "my-mill.ini" file for you to dissect.
[HAL]
HALUI = halui
HALFILE = my-mill.hal
HALFILE = custom.hal
HALFILE = xhc-hb04-noel.hal
POSTGUI_HALFILE = custom_postgui.hal
[HALUI]
# add halui MDI commands here (max 64)
MDI_COMMAND = o<probez> call ;#0
MDI_COMMAND = G1 X0 F1200 ;#1
MDI_COMMAND = G1 Y0 F1200 ;#2
MDI_COMMAND = G1 Z0 F1200 ;#3
MDI_COMMAND = o<x-half> call ;#4
MDI_COMMAND = o<y-half> call ;#5
MDI_COMMAND = o<z-half> call ;#6
MDI_COMMAND = G10 L20 P[#5220] X0 ;#7
MDI_COMMAND = G10 L20 P[#5220] Y0 ;#8
MDI_COMMAND = G10 L20 P[#5220] Z0 ;#9
MDI_COMMAND = G1 Z50 F1200 ;#10
MDI_COMMAND = G10 L20 P1 x0 ;#11
MDI_COMMAND = G10 L20 P1 y0 ;#12
MDI_COMMAND = G10 L20 P1 z0 ;#13
And some snips from the all- important XHX-04 hal-file!!
# GOTO ZERO button #################################################
net go0 xhc-hb04.button-goto-zero => and2.5.in0 and2.6.in0 and2.7.in0
net jog-x and2.5.in1
net jog-y and2.6.in1
net jog-z and2.7.in1
# MDI_COMMAND = G00 (X0,Y0,Z0)
net go-x0 halui.mdi-command-01 <= and2.5.out
net go-y0 halui.mdi-command-02 <= and2.6.out
net go-z0 halui.mdi-command-03 <= and2.7.out
# =HALF button #####################################################
net half0 xhc-hb04.button-half => and2.8.in0 and2.9.in0 and2.10.in0
net jog-x and2.8.in1
net jog-y and2.9.in1
net jog-z and2.10.in1
The MDI commands specified in lines similar to net go-x0 halui.mdi-command-01 must exist first!!
I hope this helps you in your journey!
I have my system beaten into shape now, and this is a fantastic pendant for CNC.
Though I still use the good ol' gamepad for large - distance jogging!
Please Log in or Create an account to join the conversation.
Looks as if you have the 14 button version. I have the 18 button.
Thx!
Murray
Please Log in or Create an account to join the conversation.
I fluked it and got it working almost right away.
The only mods to the original code was to delete any reference to the A axis.
Then it was a simple matter of pulling out the correct amount of hair to
make my customized buttons work
Next time I have my machine turned on I will attach my files here in the hopes someone
will find them useful.
Please Log in or Create an account to join the conversation.
But now the Step button on the pendant doesn't work, even though my XHC hal file hasn't changed. So the jog wheel still functions, but the jog multiplier shown on the pendant stays at 1.
How can I tell which version of the C code is included in the 2.6 release? Is there something else I can do to debug this issue?
Van
Please Log in or Create an account to join the conversation.