It appears the documentation
http://linuxcnc.org/docs/html/man/man1/xhc-hb04.1.html
is inadequate.
It doesn't have enough in it to create the .ini and .hal files but has just
enough information to lead one down the garden path.
Not sure now if this was even needed:
===================================
Debian package installs (debs) handle this automatically but Run-In-Place (RIP)
builds may need a udev rules file. This file should be created (using sudo and
a text editor) as:
/etc/udev/rules.d/99−xhc−hb04.rules with the single line:
ATTR{idProduct}=="eb70", ATTR{idVendor}=="10ce", MODE="0666", OWNER="root",
GROUP="plugdev"
===================================
Then there's this which was the real killer in this case:
===================================
Hal Usage
Use the −H option to specify HAL mode and other options as required:
loadusr −W xhc−hb04 −H [Options]
Example: loadusr −W xhc−hb04 −H −I path_to_cfg_file −s 2
===================================
What I entered into my .ini file as instructed was:
loadusr -W xhc-hb04 -x -I/usr/share/linuxcnc/hallib/xhc-hb04-layout2.cfg -H
Nothing worked. Because of course none of the HAL connections were made. So
into the README file at the end of the above mentioned doc:
Added the appropriate INCLUDE commands:
INCLUDE file: layout2.inc
More problems. Removed some. Added the
HALFILE = LIB:xhc-hb04.tcl
And finally it went far enough to then throw up the error dialog as I mentioned
in a previous posting.
Andy's comment about HAL linkages put me on the right track. The xhc-hb04.tcl
program created an extended .ini file but the .hal file wasn't touched.
Although it doesn't say anywhere that I should do this, the solution was
simple. Comment out the loadusr
#loadusr -W xhc-hb04 -x -I/usr/share/linuxcnc/hallib/xhc-hb04-layout2.cfg -H
The modified .ini file has this
===================================
[XHC_HB04_CONFIG]
# specify layout = n for LIB:xhc-hb04-layout{n}.cfg files
layout = 2
===================================
If I've already told it where the layout2.cfg file is then why would the .tcl
file create the same linkage?
And if it's doing that then odds are it's also loaded and is running the
xhc-hb04 program with the -H parameter. So trying to run it again and capture
the USB port would cause it to hang. Although the error message in the dialog
is miseading.
Removing the loadusr now allows the Pendant buttons and MPG to function.
Next step is to make some of them do useful things rather than just report
that M1 button was pressed.
And when I'm done, if I'm allowed I'll add something to
http://linuxcnc.org/docs/html/man/man1/xhc-hb04.1.html
that expands on how to connect this pendant in a very basic fashion rather than
the extreme details including the .tcl program.
The simple approach should instruct what to add to the .ini and what needs to
be added to the .hal file along with a similar breakdown on what each added
line does.
John
> -----Original Message-----
> From: andy pugh [mailto:[email protected]]
> Sent: July-08-19 2:18 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] xhc_hbo4 pendant
>
> On Mon, 8 Jul 2019 at 21:59, John Dammeyer <[email protected]>
> wrote:
>
> > The key issue appears to be the -H parameter which as documented:
> > Use the -H option to specify HAL mode
> > Without the -H from the command line the Pendant is alive and reports
> button presses and MPG encoder changes.
>
> Does it report them on actual HAL pins, though?
>
> Maybe HAL mode need the udev rules and sim doesn't? Have you done that
> part?
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> � George Fitch, Atlanta Constitution Newspaper, 1916
>
>
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users