XHC-HB04 wireless MPG pendant HAL module
18 Feb 2014 07:31 #43928
by cncnoel
Replied by cncnoel on topic XHC-HB04 wireless MPG pendant HAL module
Found those already, and thank you! I am using Maverick on the laptop, which doesn't appear in the distro list, hence my question.
When I have all the pendant button code working , I will post the HAL, MDI_COMMAND and <subroutine>.ngc files used.
When I have all the pendant button code working , I will post the HAL, MDI_COMMAND and <subroutine>.ngc files used.
The following user(s) said Thank You: joekline9
Please Log in or Create an account to join the conversation.
22 Feb 2014 07:08 #44056
by dgarrett
Replied by dgarrett on topic XHC-HB04 wireless MPG pendant HAL module
The excellent USB userspace driver for the XHC-HB04 pendant
contributed by Frederic Rible has been merged into git master
and is now available in recent buildbot debs. Thanks Frederic!
The driver can be used as a hal module, example:and can also be used from the command line in simulation mode
in order to detect button codes from the device.
Commandline help:
Configurations files for known configurations are provided as:
configs/sim/axis/xhc-hb04/xhc-hb04-layout1.cfg (16 button)
configs/sim/axis/xhc-hb04/xhc-hb04-layout2.cfg (18 button)
These are known to work for existing models but future versions
may have altered or additional codes.
When operated alone (from the commandline, no -H) the device can be
tested to show the codes sent for button pushes and wheel movements.
These codes can be used to create new configuration files.
To test a layout file (without starting linuxCNC) locate a .cfg
file, and try (for example):For a new button layout, create a layout file using no options:to determine the button codes and create your own .cfg file
following the format of the existing .cfg files
************************************************************************
Sim configurations that support testing of the device with linuxCNC
using a 9 axis simulation with the axis gui are in the configs tree and
available with the configuration picker:
configs/sim/axis/xhc-hb04/xhc-hb04-layout1.ini
configs/sim/axis/xhc-hb04/xhc-hb04-layout2.ini
configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.ini
The sim configurations support:
1) specification of a known layout (1: 16buttons | 2:18 buttons)
2) selection of any set of up to 4 coords (xyza, xyzc, xyz, etc)
3) per coord filtering (coefs -- usually not required)
4) per coord overall scale setting (scales -- usually not needed)
5) sequence selection (.001 .01 .1 1 | .001 .005 .010 .020)
6) require pendant at start (or allow disconnect/reconnect)
7) jogmode selection (normal,vnormal,plus-minus)
The README for these sim configs is:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...c3d1108ebbe5a61e495b
contributed by Frederic Rible has been merged into git master
and is now available in recent buildbot debs. Thanks Frederic!
The driver can be used as a hal module, example:
loadusr -W xhc-hb04 -I xhc-hb04-layout2.cfg -H
in order to detect button codes from the device.
Commandline help:
$ xhc-hb04 -h
xhc-hb04 version <linuxcnc-version> by Frederic RIBLE (frible@teaser.fr)
Usage: xhc-hb04 [-I ini-file] [-h] [-H] [-s 1|2]
-I ini-file: configuration file defining the MPG keyboard layout
-h: usage (this)
-H: run in real-time HAL mode (run in simulation mode by default)
-x: wait for pendant detection before creating HAL pins
-s: step sequence (*.001 unit):
1: 1,10,100,1000 (default)
2: 1,5,10,20
Configuration file section format:
[XHC-HB04]
BUTTON=XX:button-thename
...
where XX=hexcode, thename=nameforbutton
configs/sim/axis/xhc-hb04/xhc-hb04-layout1.cfg (16 button)
configs/sim/axis/xhc-hb04/xhc-hb04-layout2.cfg (18 button)
These are known to work for existing models but future versions
may have altered or additional codes.
When operated alone (from the commandline, no -H) the device can be
tested to show the codes sent for button pushes and wheel movements.
These codes can be used to create new configuration files.
To test a layout file (without starting linuxCNC) locate a .cfg
file, and try (for example):
$ xhc-hb04 -I your_path_to/xhc-hb04-layout2.cfg
$ xhc-hb04
following the format of the existing .cfg files
************************************************************************
Sim configurations that support testing of the device with linuxCNC
using a 9 axis simulation with the axis gui are in the configs tree and
available with the configuration picker:
configs/sim/axis/xhc-hb04/xhc-hb04-layout1.ini
configs/sim/axis/xhc-hb04/xhc-hb04-layout2.ini
configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.ini
The sim configurations support:
1) specification of a known layout (1: 16buttons | 2:18 buttons)
2) selection of any set of up to 4 coords (xyza, xyzc, xyz, etc)
3) per coord filtering (coefs -- usually not required)
4) per coord overall scale setting (scales -- usually not needed)
5) sequence selection (.001 .01 .1 1 | .001 .005 .010 .020)
6) require pendant at start (or allow disconnect/reconnect)
7) jogmode selection (normal,vnormal,plus-minus)
- normal: exact positioning, may run after wheel stops
- vnormal: stop when wheel stops, may not attain large steps
- plus-minus: halui plus-minus jogging, may be useful for
non-trivkins setups
The README for these sim configs is:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...c3d1108ebbe5a61e495b
The following user(s) said Thank You: f1oat
Please Log in or Create an account to join the conversation.
- bottleworks
- Offline
- Senior Member
Less
More
- Posts: 73
- Thank you received: 0
22 Feb 2014 11:04 #44060
by bottleworks
Replied by bottleworks on topic XHC-HB04 wireless MPG pendant HAL module
That's great news. So, how will the effect those with the existing incarnation of the driver when the next LinuxCNC update is released? Will there be a conflict?
Please Log in or Create an account to join the conversation.
22 Feb 2014 11:21 - 22 Feb 2014 11:39 #44061
by dgarrett
Replied by dgarrett on topic XHC-HB04 wireless MPG pendant HAL module
At this writing, the xhc-hb04 driver in git master is compatible
with the driver from the original tar files.
In the future, there is always the possibility of
divergence.
When using the program (from either the command line or
with a loadusr hal statement), the system finds it
by a search of the user PATH environemntal variable.
You can see your PATH variable with:
And you can determine which program is going to be
found using the which command:
Examples:
Note: when you use a Run-In-Place (RIP) build and source the
scripts/rip-environment, it modifies your PATH for the terminal
session. When you use an installed deb, the programs are
put in predefined system directories known to the default user
PATH.
So, if one has concerns, you can always put your executable in
a special directory and invoke it with an exact path, like:
with the driver from the original tar files.
In the future, there is always the possibility of
divergence.
When using the program (from either the command line or
with a loadusr hal statement), the system finds it
by a search of the user PATH environemntal variable.
You can see your PATH variable with:
echo $PATH
And you can determine which program is going to be
found using the which command:
Examples:
$ which xhc-hb04
/usr/bin/xhc-hb04
$ which linuxcnc
/usr/bin/linuxcnc
Note: when you use a Run-In-Place (RIP) build and source the
scripts/rip-environment, it modifies your PATH for the terminal
session. When you use an installed deb, the programs are
put in predefined system directories known to the default user
PATH.
So, if one has concerns, you can always put your executable in
a special directory and invoke it with an exact path, like:
loadusr -W ~/myspecialdir/xhc-hb04 -H
Last edit: 22 Feb 2014 11:39 by dgarrett.
Please Log in or Create an account to join the conversation.
11 Mar 2014 03:12 #44637
by library
Replied by library on topic XHC-HB04 wireless MPG pendant HAL module
Perhaps I'm the only guy, but I machine in inches and I only see the LCD on the display doing mm. Can it do inches as well?
Please Log in or Create an account to join the conversation.
- bottleworks
- Offline
- Senior Member
Less
More
- Posts: 73
- Thank you received: 0
11 Mar 2014 07:32 #44644
by bottleworks
At least for me, the "mm" is displayed on the pendant, however, it's reading in inches. If there is a way to turn off the "mm", that would be even better. For me, it's just cosmetic.
Replied by bottleworks on topic XHC-HB04 wireless MPG pendant HAL module
Perhaps I'm the only guy, but I machine in inches and I only see the LCD on the display doing mm. Can it do inches as well?
At least for me, the "mm" is displayed on the pendant, however, it's reading in inches. If there is a way to turn off the "mm", that would be even better. For me, it's just cosmetic.
Please Log in or Create an account to join the conversation.
20 Mar 2014 03:01 #44988
by YvonPIERS
Replied by YvonPIERS on topic XHC-HB04 wireless MPG pendant HAL module
Hello,
Thank you for this great work. I used it with success and I actually enjoy my French friends : www.usinages.com/emc2/hanwheel-xhc-hb04-linuxcnc-t64441.html
Sincerely,
Yvon (alias Skippy)
Thank you for this great work. I used it with success and I actually enjoy my French friends : www.usinages.com/emc2/hanwheel-xhc-hb04-linuxcnc-t64441.html
Sincerely,
Yvon (alias Skippy)
Please Log in or Create an account to join the conversation.
- bottleworks
- Offline
- Senior Member
Less
More
- Posts: 73
- Thank you received: 0
23 Mar 2014 07:48 #45123
by bottleworks
Just to update this. After changing xhc-hb04.c as noted above, the pendant does stream to the computer. I haven't integrated the settings into the hal and int files until the rest of this second machine is completed. So, I don't know if the buttons will work as is with this pendant.
Also to note,
needs to be updated to
Replied by bottleworks on topic XHC-HB04 wireless MPG pendant HAL module
There are some clues about WHB03 here: forum.planet-cnc.com/viewtopic.php?f=12&t=1125
Try to replace 0xEB70 by 0xEB6E at line 571 of xhc-hb04.c
It should detect the WHB03.
Just to update this. After changing xhc-hb04.c as noted above, the pendant does stream to the computer. I haven't integrated the settings into the hal and int files until the rest of this second machine is completed. So, I don't know if the buttons will work as is with this pendant.
Also to note,
SYSFS{idProduct}=="eb70", SYSFS{idVendor}=="10ce", MODE="666", OWNER="root", GROUP="users"
needs to be updated to
SYSFS{idProduct}=="eb6e", SYSFS{idVendor}=="10ce", MODE="666", OWNER="root", GROUP="users"
Please Log in or Create an account to join the conversation.
04 Apr 2014 02:55 #45549
by Poma
Replied by Poma on topic XHC-HB04 wireless MPG pendant HAL module
Can I suggest that the following be added to the LinuxCNC Documentation page "Using A XHC-HB04 Wireless MPG Pendant"?
I spent way too long trying to figure out why the Make command didn't work.
Best Regards,
"sudo apt-get install linuxcnc-dev"
I spent way too long trying to figure out why the Make command didn't work.
Best Regards,
Please Log in or Create an account to join the conversation.
10 May 2014 23:59 - 11 May 2014 00:20 #46800
by Muzzer
Replied by Muzzer on topic XHC-HB04 wireless MPG pendant HAL module
Received my WHB04-L yesterday. Cost me $100 inc shipping and arrived in 10 days from
Ali Express
Looks complete and undamaged but I won't know for a while if it works:
I'm new to both Linux and CNC, so wish me luck! So far I have got my 5i25/7i76 to turn one of my steppers and am trying to understand enough about how Linux, HALs etc work, to be able to follow the install process for Frederic's rather excellent sounding driver, ideally with some idea of what's going on.
One of the challenges is following the thread which is spread over 13 pages and is in evolution throughout. It's not a criticism but once I've digested it in sequence, I'll need to work backwards to figure out which comments and instructions are critical and need to be gathered together for me to get my installation running. At the moment I don't have much of an idea what I'm looking at!
Murray
Edit: Stuck already!!
The install procedure says
This module requires standard C development packages and libusb-1.0 You may need to install following packages on your system:
libc6-dev
libusb-1.0-0-dev
Where can I get these? As I said - this is pretty new to me!""
I'm new to both Linux and CNC, so wish me luck! So far I have got my 5i25/7i76 to turn one of my steppers and am trying to understand enough about how Linux, HALs etc work, to be able to follow the install process for Frederic's rather excellent sounding driver, ideally with some idea of what's going on.
One of the challenges is following the thread which is spread over 13 pages and is in evolution throughout. It's not a criticism but once I've digested it in sequence, I'll need to work backwards to figure out which comments and instructions are critical and need to be gathered together for me to get my installation running. At the moment I don't have much of an idea what I'm looking at!
Murray
Edit: Stuck already!!
The install procedure says
This module requires standard C development packages and libusb-1.0 You may need to install following packages on your system:
libc6-dev
libusb-1.0-0-dev
Where can I get these? As I said - this is pretty new to me!""
Last edit: 11 May 2014 00:20 by Muzzer. Reason: Where to find lib files?
Please Log in or Create an account to join the conversation.
Time to create page: 0.118 seconds