No response from xhc-hb04 using demo
22 Mar 2018 16:10 #107728
by cncbeagle
No response from xhc-hb04 using demo was created by cncbeagle
I am trying to connect a new WHB04-L pendant to my Linuxcnc. I am using Ubuntu 12.04 upgraded from 10 and Linuxcnc 2.7.12. The lsusb command shows Bus 004 Device 003: ID 10ce:eb70 Silicon Labs, and have created the udev file. I have been using Linuxcnc for about 3 years but I am still a noob when it comes to configuration details. I scanned through all 35 pages of the "XHC-HB04 wireless MPG pendant HAL module" thread but I'm still a bit confused.
I launched the demo using xhc-hb04 -I xhc-hb04-layout2.cfg -s 2 and got the following:
Creating pin: xhc-hb04.x.pos-absolute
Creating pin: xhc-hb04.y.pos-absolute
.
.
Creating pin: xhc-hb04.jog.plus-a
Creating pin: xhc-hb04.jog.minus-a
xhc-hb04: waiting for XHC-HB04 device
xhc-hb04: found XHC-HB04 device
Nothing happens when I push any of the pendant buttons and nothing shows on the LCD screen. Neither LED illuminates(OK or battery). I have verified the batteries are good and inserted correctly. Occasionally the battery LED briefly flashes when I turn the pendant on but I have observed no other signs of life.
Did I get a bad xhc-hb04 from Amazon or am I doing something wrong (more likely!).
John
I launched the demo using xhc-hb04 -I xhc-hb04-layout2.cfg -s 2 and got the following:
Creating pin: xhc-hb04.x.pos-absolute
Creating pin: xhc-hb04.y.pos-absolute
.
.
Creating pin: xhc-hb04.jog.plus-a
Creating pin: xhc-hb04.jog.minus-a
xhc-hb04: waiting for XHC-HB04 device
xhc-hb04: found XHC-HB04 device
Nothing happens when I push any of the pendant buttons and nothing shows on the LCD screen. Neither LED illuminates(OK or battery). I have verified the batteries are good and inserted correctly. Occasionally the battery LED briefly flashes when I turn the pendant on but I have observed no other signs of life.
Did I get a bad xhc-hb04 from Amazon or am I doing something wrong (more likely!).
John
Please Log in or Create an account to join the conversation.
23 Mar 2018 12:45 #107752
by cncbeagle
Replied by cncbeagle on topic No response from xhc-hb04 using demo
Not sure what I did different but I got the demo to work. I had a WinSCP and Putty session active inside where it was warm for research and editing and was testing in my cold garage next to my CNC router. I may have changed some running processes between my many attempts to get the demo working.
Anyway, now I'm trying to edit the hal and ini files to get the real thing working. I learn best by examples. There is no xhc-hb04.hal file on my system as a starting point. I have found precious few examples of working hal and ini files online. My router uses two parallel ports for machine control. My original hal and ini files were created from the step configuration wizard but have been modified several times since. I found the xhc-hb04 documentation for version 2.7 but without some examples I'm still unsure of how everything fits together.
Google, brute force and perseverance usually solves most problems. Hopefully this one will be no different.
If not I'll be back with questions...
John
Anyway, now I'm trying to edit the hal and ini files to get the real thing working. I learn best by examples. There is no xhc-hb04.hal file on my system as a starting point. I have found precious few examples of working hal and ini files online. My router uses two parallel ports for machine control. My original hal and ini files were created from the step configuration wizard but have been modified several times since. I found the xhc-hb04 documentation for version 2.7 but without some examples I'm still unsure of how everything fits together.
Google, brute force and perseverance usually solves most problems. Hopefully this one will be no different.
If not I'll be back with questions...
John
Please Log in or Create an account to join the conversation.
25 Mar 2018 21:35 #107851
by andypugh
Replied by andypugh on topic No response from xhc-hb04 using demo
If it is making the pins then it is probably communicating with the pendant.
You can probably just add an existing HAL file for the pendant to your INI file in the [HAL] section.
The simulator config uses TCL files to make the connections, which is fairly clever but not so easy to copy and edit unless you know TCL.
Have you read the documentation here?
linuxcnc.org/docs/html/man/man1/xhc-hb04.1.html
You can probably just add an existing HAL file for the pendant to your INI file in the [HAL] section.
The simulator config uses TCL files to make the connections, which is fairly clever but not so easy to copy and edit unless you know TCL.
Have you read the documentation here?
linuxcnc.org/docs/html/man/man1/xhc-hb04.1.html
Please Log in or Create an account to join the conversation.
25 Mar 2018 22:09 #107855
by dgarrett
Replied by dgarrett on topic No response from xhc-hb04 using demo
The sim configs README files (located within configs/sim/axis/xhc-hb04) include
some instructions for adding an xhc-hb04 to any configuration:
current branch (2.7):
raw.githubusercontent.com/LinuxCNC/linux...axis/xhc-hb04/README
development branch (master(2.8):
raw.githubusercontent.com/LinuxCNC/linux...axis/xhc-hb04/README
some instructions for adding an xhc-hb04 to any configuration:
current branch (2.7):
raw.githubusercontent.com/LinuxCNC/linux...axis/xhc-hb04/README
development branch (master(2.8):
raw.githubusercontent.com/LinuxCNC/linux...axis/xhc-hb04/README
Please Log in or Create an account to join the conversation.
26 Mar 2018 04:40 #107888
by Desertboy
Replied by Desertboy on topic No response from xhc-hb04 using demo
Please Log in or Create an account to join the conversation.
26 Mar 2018 11:21 #107896
by cncbeagle
Replied by cncbeagle on topic No response from xhc-hb04 using demo
I had found the README file you referenced and others that enabled me to get started. Starting from my latest working configuration I modified the configuration using the references as a guide. After fixing the inevitable errors the configuration starts, tries to open axis then hangs. I ran the new configuration from the command line with the -d option. After a bunch of stuff I don't understand it hangs at the following:
xhc-hb04: waiting for XHC-HB04 device
xhc-hb04: found XHC-HB04 device
Can someone point me in the right direction to debug this configuration?
I have attached the startup log and my ini and xhc-hb04.hal file.
Thanks
John
xhc-hb04: waiting for XHC-HB04 device
xhc-hb04: found XHC-HB04 device
Can someone point me in the right direction to debug this configuration?
I have attached the startup log and my ini and xhc-hb04.hal file.
Thanks
John
Please Log in or Create an account to join the conversation.
26 Mar 2018 13:08 #107897
by dgarrett
Replied by dgarrett on topic No response from xhc-hb04 using demo
In your inifile:the lineis superflous as it will supersede and interfere
with the connections made by the library file specified
by the line that follows it:
I adapted your ini file to a sim-only inifile by disabling
hardware-specific items and unprovided files and using
LIB:basic_sim.tcl to simulate hardware connections.
This file (tst.ini attached) started ok with a working pendant.
Please start using a terminal and attach all terminal output.
Example:
HALFILE=xhc-hb04.hal
HALFILE=LIB:xhc-hb04.tcl
HALFILE=xhc-hb04.hal
with the connections made by the library file specified
by the line that follows it:
HALFILE=LIB:xhc-hb04.tcl
I adapted your ini file to a sim-only inifile by disabling
hardware-specific items and unprovided files and using
LIB:basic_sim.tcl to simulate hardware connections.
This file (tst.ini attached) started ok with a working pendant.
Please start using a terminal and attach all terminal output.
Example:
$ linuxcnc tst.ini
Please Log in or Create an account to join the conversation.
26 Mar 2018 14:28 #107901
by dgarrett
Replied by dgarrett on topic No response from xhc-hb04 using demo
Edit:
Looking some more at your files, the reason for the hang is because your
superfluous (unneeded when using LIB:xhc-hb04.tcl) xhc-hb04.hal file uses:
per the man page for halcmd:
Your file used '-w' (*lower* case) so the program hangs (waits forever)
since there is no reason for the xhc-hb04 program to exit.
Looking some more at your files, the reason for the hang is because your
superfluous (unneeded when using LIB:xhc-hb04.tcl) xhc-hb04.hal file uses:
loadusr -w xhc-hb04 -H -I xhc-hb04-layout2.cfg -s 2
per the man page for halcmd:
$ man halcmd
...
loadusr [flags] unix-command
-W to wait for the component to become ready. The component is
assumed to have the same name as the first argument of the command.
-Wn name to wait for the component, which will have the given name.
-w to wait for the program to exit
Your file used '-w' (*lower* case) so the program hangs (waits forever)
since there is no reason for the xhc-hb04 program to exit.
Please Log in or Create an account to join the conversation.
Time to create page: 0.143 seconds