XHC LHB04B-4: fails to detect - SOLVED

More
30 Nov 2019 13:55 #151566 by travis036
says it is already installed

~Travis
The following user(s) said Thank You: COFHAL

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

More
30 Nov 2019 15:09 #151575 by travis036
Don't take this the wrong way, but i aborted the Stretch distro install, in favor of a working system, for now. of all the computer bits i have laying around, i couldn't put together a complete system for development, so once i can afford to get some components off eBay, i will load it up with the Stretch distro, and continue on this topic.

the LinuxCNC PC is back to running Wheezy, with 2.7.14 LinuxCNC. this is because i know it works, and the machine will be usable. in the meantime, i will be on the lookout for computer components for a development PC.

I have a Dell PowerEdge R200 server, with a pair of parallel-port cards, but no SATA hard-drive. it is a dual-core processor, and i know it will likely not be worth anything, as far as running realtime, but once i find a hard-drive, i will give it a shot, just because i am curious as to what the latency numbers will be. i also have a Pentium 2 board, but i doubt it would work with Debian 9, if it even works.

~Travis

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

More
30 Nov 2019 20:34 #151603 by travis036
so, found a hard-drive for the development LinuxCNC (Stretch) PC, the Dell R200. i scavenged a 1TB Seagate from a external (backup) drive that i haven't used for several years. i tested the latency, and it seemed rock stable at 57171. not great, but better than i thought it would be. i will get busy loading on the development deps, and the source code, and see what i can make of it. if i get a chance tomorrow, i may plug it into my machine, just to see if it is capable of driving steppers via parallel port. it runs smooth (GUI) so far, and LinuxCNC starts, so maybe it could work, if the latency isn't too bad. let me know what you all think about the latency of 57171, in regards to CNC performance. i know it isn't great, and may be horrible, but my experience is that it is similar to my other CNC PC, so it may run.

~Travis

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

More
30 Nov 2019 22:17 #151612 by travis036
ok, i was able to compile the plain LinuxCNC source from the GitHub. so i ran "make clean", and added the folder xhc-whb04b-6 to src/hal/user_comps, from github.com/ctbenergy/linuxcnc/tree/2.7-feature-xhc-whb04b-6 , and recompiled. it gave no errors, but i don't think the folder compiled.
I tried "make ./hal/user_comps/xhc-whb04b-6" but got:
Reading 191/191 dependency files
Done reading dependencies
Reading 206/206 realtime dependency files
Done reading realtime dependencies
make: Nothing to be done for 'hal/user_comps/xhc-whb04b-6'.

so how do i get the folder to compile?

~Travis

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

More
01 Dec 2019 09:04 #151642 by travis036
i got xhc-whb04b-6 to compile! :woohoo:
I added to src/Makefile: hal/user_comps/xhc-whb04b-6 \
and then ran Make again, and it worked (been a long time since i have had to manipulate a Makefile)

now i have only to add the config files, and include it into my ini, and test it.
i did try this:
halrun
halcmd: loadusr xhc-whb04b-6 -h

and i got:
xhc-whb04b-6 version 2.9.0~pre0 Dec  1 2019 03:49:23

SYNOPSIS
    xhc-whb04b-6 [-h | --help] | [-H] [OPTIONS]

NAME
    xhc-whb04b-6 - jog dial HAL component for the XHC-WHB04B-6 device

DESCRIPTION
    xhc-whb04b-6 is a HAL component that receives events from the XHC-WHB04B-6 device and exposes them to HAL via HAL pins.

OPTIONS
 -h, --help
    Prints the synopsis and the most commonly used commands.

 -H
    Run xhc-whb04b-6 in HAL-mode instead of interactive mode. When in HAL mode commands from device will be exposed to HAL's shred memory. Interactive mode is useful for testing device connectivity and debugging.

 -t
    Wait with timeout for USB device then proceed, exit otherwise. Without -t the timeout is implicitly infinite.

 -u, -U
    Show received data from device. With -U received and transmitted data will be printed. Output is prefixed with "usb".

 -p
    Show HAL pins and HAL related messages. Output is prefixed with "hal".

 -e
    Show captured events such as button pressed/released, jog dial, axis rotary button, and feed rotary button event. Output is prefixed with "event".

 -a
    Enable all logging facilities without explicitly specifying each.

 -c
    Enable checksum output which is necessary for debugging the checksum generator function. Do not rely on this feature since it will be removed once the generator is implemented.

 -n
    Force being silent and not printing any output except of errors. This will also inhibit messages prefixed with "init".

EXAMPLES
xhc-whb04b-6 -ue
    Prints incoming USB data transfer and generated key pressed/released events.

xhc-whb04b-6 -p
    Prints hal pin names and events distributed to HAL memory.

xhc-whb04b-6 -Ha
    Start in HAL mode and avoid output, except of errors.

AUTHORS
    This component was started by Raoul Rubien (github.com/rubienr) based on predecessor device's component xhc-hb04.cc. https://github.com/machinekit/machinekit/graphs/contributors gives you a more complete list of contributors.

i am very happy right now! :woohoo: B)

~Travis
The following user(s) said Thank You: tommylight

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

More
01 Dec 2019 11:47 #151649 by tommylight
You are very persistent !
That is a very nice habit to have.
Thank you for reporting on everything, i am sure someone will find it useful.

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

More
01 Dec 2019 12:13 #151653 by andypugh
If you are happy to compile LinuxCNC from source, then you could try RTAI on that new machine too.
linux-image, linux-headers and rtai-modules debs are here: www.linuxcnc.org/temp/

(You could even try the LinuxCNC deb, but that was built on Buster so might not work)

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

More
01 Dec 2019 14:46 #151663 by travis036
the battle isn't won yet ;)
when i run it via halrun: loadusr -W xhc-whb04b-6, it recognises the pendant (Yay! :woohoo: ), but when i run it via linuxcnc, i get errors: (ran in terminal)
linuxcnc /home/tfarmer/linuxcnc/configs/my-mill/my-mill.ini
LINUXCNC - 2.7.14
Machine configuration directory is '/home/tfarmer/linuxcnc/configs/my-mill'
Machine configuration file is 'my-mill.ini'
Starting LinuxCNC...
Found file(REL): ./my-mill.hal
Note: Using POSIX realtime
config string '0 out 1 out'
./my-mill.hal:8: Warning: File contains DOS-style line endings.
Found file(REL): ./custom.hal
./custom.hal:11: Warning: File contains DOS-style line endings.
Found file(REL): ./xhc-whb04b-6.hal
rtapi_shmem_new failed due to shmget(key=0x48414c32): Invalid argument
HAL: ERROR: could not open shared memory

failed to initialize HAL component xhc-whb04b-6
./xhc-whb04b-6.hal:2: waitpid failed xhc-whb04b-6 xhc-whb04b-6
./xhc-whb04b-6.hal:2: xhc-whb04b-6 exited without becoming ready
Shutting down and cleaning up LinuxCNC...
Note: Using POSIX realtime
LinuxCNC terminated with an error.  You can find more information in the log:
    /home/tfarmer/linuxcnc_debug.txt
and
    /home/tfarmer/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal

i have attached linuxcnc_debug.txt, and linuxcnc_print.txt, though i couldn't find anything usefull in either of them.

my thinking is this, i am using the linuxcnc executable from the stretch distro, and i suspect the xhc-whb04b-6 was compiled with a different version (compiled from: github.com/LinuxCNC/linuxcnc which looks like v2.8, rather than 2.7.14). i will attempt a run-in-place of the compiled LinuxCNC executable at some point, as i have stuff to do around the house.

~Travis
Attachments:

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

More
01 Dec 2019 17:55 #151676 by travis036
a quick check, and my source code was 2.9, so i updated from the buildbot, stretch version, and i am still having some sort of issue.

new config files are here: github.com/travisfarmer/my-linuxcnc-conf.../linuxcnc_2.9_strech
linuxcnc /home/tfarmer/linuxcnc/configs/my-mill/my-mill.iniLINUXCNC - 2.9.0-pre0-862-g459047102
Machine configuration directory is '/home/tfarmer/linuxcnc/configs/my-mill'
Machine configuration file is 'my-mill.ini'
Starting LinuxCNC...
application-specific initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: invalid command name "."
    while executing
". configure -borderwidth 0 -highlightthickness 0"
    (file "/usr/lib/tcltk/linuxcnc/bin/popimage" line 35)
Found file(REL): ./my-mill.hal
Note: Using POSIX realtime
config string '0 out 1 out'
./my-mill.hal:9: Warning: File contains DOS-style line endings.
Found file(REL): ./custom.hal
Traceback (most recent call last):
  File "/usr/bin/hal_manualtoolchange", line 62, in <module>
    app = Tkinter.Tk(className="AxisToolChanger")
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1823, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
./custom.hal:11: Warning: File contains DOS-style line endings.
Found file(REL): ./xhc-whb04b-6.hal
pndnt axis   inactive event axis={code=0x00 text='' altText=''} axisButton={{{key={code=0x11 text='X' altText=''}}} isPermitted=TRUE}
pndnt axis   active   event axis={code=0x11 text='X' altText=''} axisButton={{{key={code=0x11 text='X' altText=''}}} isPermitted=TRUE}
pndnt feed   inactive event feed={code=0x00 text='' altText=''} feedButton={{{key={code=0x0d text='0.001' altText='2%'}}} isPermitted=TRUE stepSize=2 stepMode=0x00}
pndnt feed   active   event feed={code=0x0d text='0.001' altText='2%'} feedButton={{{key={code=0x0d text='0.001' altText='2%'}}} isPermitted=TRUE stepSize=2 stepMode=0x00}
pndnt handwheel total counts {counts=0 activeCounter=0 isLeadActive=0}
./xhc-whb04b-6.hal:19: Pin 'whb.halui.@axx@.select' does not exist
Shutting down and cleaning up LinuxCNC...
pndnt handwheel total counts {counts=0 activeCounter=0 isLeadActive=0}
pndnt handwheel total counts {counts=0 activeCounter=0 isLeadActive=0}
Note: Using POSIX realtime
LinuxCNC terminated with an error.  You can find more information in the log:
    /home/tfarmer/linuxcnc_debug.txt
and
    /home/tfarmer/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal

~Travis

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

More
01 Dec 2019 18:04 #151679 by andypugh
'whb.halui.@axx@.select'

This looks like a possible error with the config conversion script.

On line 19 of xhc-whb04b-6.hal
Or possibly something wrong with a whb script, if there is one.
The following user(s) said Thank You: travis036

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

Time to create page: 0.098 seconds
Powered by Kunena Forum