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:
  loadusr -W xhc-hb04 -I xhc-hb04-layout2.cfg -H
and can also be used from the command line in simulation mode
in order to detect button codes from the device.

Commandline help:
------------------------------------------------------------------------
$ xhc-hb04 -h
xhc-hb04 version <linuxcnc-version> by Frederic RIBLE ([email protected])
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
------------------------------------------------------------------------

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.
The button 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

For a new button layout, create a layout file using no options:

   $ xhc-hb04

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: 16 buttons | 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:

http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=blob_plain;f=configs/sim/axis/xhc-hb04/README;hb=a3902a95ba98f4c00bcdc3d1108ebbe5a61e495b

Testing with a RIP build will require creating a rules file
in /etc/udev/rules.d  -- consult the README for information
-- 
Dewey Garrett


------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to