- Posts: 275
- Thank you received: 49
XHC-HB04 wireless MPG pendant HAL module
HALFILE = xhc-hb04.hal
HALUI = halui
I haven't altered xhc-hb04.hal either, so the first line is
loadusr -W xhc-hb04 -I xhc-hb04-layout2.ini -H
However, there are no MDI_COMMAND entries in the .ini file, which is presumably where it's all going wrong. I thought the xhc-hb04-layout2.ini took care of defining the button functions. I notice that the xhc-hb04.hal file contains 6 references to halui.mdi-command-06 etc in the net definitions. Unless I've defined the MDI_COMMANDs, presumably they make no sense. I'll try to figure out where those need to come from next.
Thx!
Please Log in or Create an account to join the conversation.
Muzzer wrote: Unless I've defined the MDI_COMMANDs, presumably they make no sense. I'll try to figure out where those need to come from next.
You can just copy and paste them from the Wiki page.
Unless the config INI file contains the MDI_COMMAND entries then the HAL pins that the pendant hal tries to link to those commands will not exist.
If you want you can just add a lot of blank MDI_COMMAND lines to the [HALUI] section to create HAL pins that do nothing.
Please Log in or Create an account to join the conversation.
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.
ericg wrote: 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.vgraves wrote: 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.