XHC-HB04 wireless MPG pendant HAL module

More
11 years 6 months ago #57980 by andypugh

Gasman wrote: Is this likely to result in a functional solution or am I better off taking this back to the post office for a refund?


I think that it stands a good chance of working, but you might have some reverse-engineering to do.

I wonder if you can find what buttons it offers with hal_input?

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

More
11 years 6 months ago #58005 by Gasman
I have recompiled the xhc-hb04.cc with the deviceID EB6E as well as adding etc/udev/rules.d/90-xhc.rules with the altered deviceID. I have had to comment out quite a few lines in the HAL config file referring to extra axes. Linuxcnc now runs without error but the handset still does nothing. :dry:

I have run
Code:
xhc-hbo4
from the command line and, after creating the pins, it fails with
Code:
libusb error (libusb couldn't open USB device ...)

Living life dangerously I then tried running as root...

A partial success!!! xhc-hb04 now working and streaming rows of data on each button press. Not sure if I need to do anything to stop
Code:
libusb:warning [handle_bulk_completion] unrecognised urb status -108

Code:
john@john-desktop:~$ sudo xhc-hb04 [sudo] password for john: Creating pin: xhc-hb04.x.pos-absolute Creating pin: xhc-hb04.y.pos-absolute Creating pin: xhc-hb04.z.pos-absolute Creating pin: xhc-hb04.a.pos-absolute Creating pin: xhc-hb04.x.pos-relative Creating pin: xhc-hb04.y.pos-relative Creating pin: xhc-hb04.z.pos-relative Creating pin: xhc-hb04.a.pos-relative Creating pin: xhc-hb04.feed-value Creating pin: xhc-hb04.feed-override Creating pin: xhc-hb04.spindle-rps Creating pin: xhc-hb04.spindle-override Creating pin: xhc-hb04.jog.enable-off Creating pin: xhc-hb04.jog.enable-x Creating pin: xhc-hb04.jog.enable-y Creating pin: xhc-hb04.jog.enable-z Creating pin: xhc-hb04.jog.enable-a Creating pin: xhc-hb04.jog.enable-feed-override Creating pin: xhc-hb04.jog.enable-spindle-override Creating pin: xhc-hb04.jog.scale Creating pin: xhc-hb04.jog.counts Creating pin: xhc-hb04.jog.counts-neg Creating pin: xhc-hb04.jog.velocity Creating pin: xhc-hb04.jog.max-velocity Creating pin: xhc-hb04.jog.increment Creating pin: xhc-hb04.jog.plus-x Creating pin: xhc-hb04.jog.minus-x Creating pin: xhc-hb04.jog.plus-y Creating pin: xhc-hb04.jog.minus-y Creating pin: xhc-hb04.jog.plus-z Creating pin: xhc-hb04.jog.minus-z Creating pin: xhc-hb04.jog.plus-a Creating pin: xhc-hb04.jog.minus-a waiting for XHC-HB04 device found XHC-HB04 device libusb:warning [handle_bulk_completion] unrecognised urb status -108 04 17 00 00 00 1B 04 00 00 00 00 0C 04 16 00 00 00 1A 04 00 00 00 00 0C 04 01 00 00 00 0D 04 00 00 00 00 0C 04 02 00 00 00 0E 04 00 00 00 00 0C 04 03 00 00 00 0F 04 00 00 00 00 0C 04 04 00 00 00 08 04 00 00 00 00 0C 04 0C 00 00 00 00

However, I have also found this on Planet CNC - which says that the #_wc_frac is 8bit for the HB03 and 16bit for the HB04 as the former only displays to three significant figures. This sounds worrying to me as I am not a programmer and have not the faintest idea where to look to check this. Even more confusing is that my model displays not 2 or 4 but 3 significant digits!

#_wc_frac - it is 8bit for WHB03 and 16bit for WHB04 ... it is simple whan you look two display max frac part for WHB03 it is .99 and for WHB04 it is .9999 ... this value also have a SIGN bit if value is negarive you must set most significant bit to 1... little example:

WHB03
our X position is: -117.33
we put 117 to x_wc_int
we also put 33 to x_wc_frac
we have negative value... we also need to set most significant bit of x_wc_frac to 1...

Code: Select all

Code:
x_wc_frac = x_wc_frac | 0x80;


WGB04
our X position is: -220.3345
we put 220 to x_wc_int
we also put 3345 to x_wc_frac
we have negative value... we also need to set most significant bit of x_wc_frac to 1...

Code: Select all
Code:
x_wc_frac = x_wc_frac | 0x8000;

How can I sort out the presumed permissions problem(s), what do I need to do to manage the 8bit vs 16 it words and how far away from a working solution am I? If this needs much more work it is definitely on its way back to the seller!

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

More
11 years 5 months ago #58419 by rythmnbls
Replied by rythmnbls on topic Thanks !
I just received my XHC-HB04 from AutomationTech. I'm running 2.6.7 on an upgraded 10.04 / 2.5 system with a gmocappy gui. After plugging everything in, and following the instructions from the README file in the sample config folder it just works.

So, I just wanted to say thanks to everyone involved. This thing is the best thing since beer in cans.

Regards.

Steve.

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

More
11 years 5 months ago - 11 years 5 months ago #58472 by roki
Hi everyone,

Im a beginner in Linux and Linuxcnc.
i just installed my XBC-HB04 on my machine (Linuxcnc,Debian Wheezy 2.6 Buildbot, Display: gmoccapy).
So far the Buttons and spindle/feedoverride are working fine.
Selecting Axis and Jogging, also changing Scale works too. But Jogging works only in incremental Mode, i cannot make the machine go in Smooth Motion like when Jogging with the buttons on the Keyboard in continuos Mode. When turning the Wheel continuosly the machine jogs like hitting the Button on the Keyboard on and on in incremental Mode.

just normal behaviour ? or has anyone a tip where to look to change this ?

thanks in advance

Roland
Last edit: 11 years 5 months ago by roki.

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

More
11 years 5 months ago #58481 by andypugh

roki wrote: But Jogging works only in incremental Mode, i cannot make the machine go in Smooth Motion like when Jogging with the buttons on the Keyboard in continuos Mode. When turning the Wheel continuosly the machine jogs like hitting the Button on the Keyboard on and on in incremental Mode.


This can be a problem with jog wheels, especially if the machine is a fast one with high accelleration.
There is a HAL component specifically for this situation:
www.linuxcnc.org/docs/html/man/man9/ilowpass.9.html

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

More
11 years 5 months ago - 11 years 5 months ago #58483 by rythmnbls

andypugh wrote:

roki wrote: But Jogging works only in incremental Mode, i cannot make the machine go in Smooth Motion like when Jogging with the buttons on the Keyboard in continuos Mode. When turning the Wheel continuosly the machine jogs like hitting the Button on the Keyboard on and on in incremental Mode.


This can be a problem with jog wheels, especially if the machine is a fast one with high accelleration.
There is a HAL component specifically for this situation:
www.linuxcnc.org/docs/html/man/man9/ilowpass.9.html


I had the same issue, my mill is fairly small with 350oz in servos, it kind of snaps to each position when the jog wheel is turned at higher step settings. My workaround was to lower the feed override till it smoothed out, but I will check out the low-pass hal. Thanks for the link.

Steve.
Last edit: 11 years 5 months ago by rythmnbls.

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

Time to create page: 0.282 seconds
Powered by Kunena Forum