XHC-HB04 wireless MPG pendant HAL module

More
15 Jul 2013 17:41 #36664 by tommy
I'm using 2.5.2 version.
Actually I'm not using gatrykins, but 5axiskins, I think they are behaving quite similar?

I found in this topic you mentioned set-world-mode pin which needs to be created for switching between joint/world mode ... could be that temporary solution?

www.linuxcnc.org/index.php/english/forum...-kinematics?start=10

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

More
17 Jul 2013 16:48 - 17 Jul 2013 21:12 #36743 by tommy
Now I installed 2.6.0~pre to implement set-world-mode pin, and it seems that it now works... But it occurred that there is a problem with this wireless pendant compatibility with this version, I'm receiving this when trying to start up Linuxcnc (Run In Place):

xhc-hb04: symbol lookup error: xhc-hb04: undefined symbol: _ZN7IniFile4FindEPKcS1_i
xhc-hb04-world-mode.hal:2: xhc-hb04 exited without becoming ready
Shutting down and cleaning up LinuxCNC...

Any solution for that?
Last edit: 17 Jul 2013 21:12 by tommy.

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

More
19 Jul 2013 01:22 #36784 by f1oat
I run 2.6.0-pre without problem.
Have you tried to recompile the xhc-hb04 module ?
Use
make clean
make
make install

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

More
19 Jul 2013 01:50 #36785 by tommy

make clean
make
make install


I did exactly that on first time error showed up.
For installing Run In Place Linuxcnc I followed this steps ... wiki.linuxcnc.org/cgi-bin/wiki.pl?Instal..._or_8_04_from_source
Or maybe 2.6.0-pre could be installed any other way? Because I also have had to copy kinematics file from "standard" installation to folder where I have run in place "installation" to make it run...


If it helps, here are debug and print files:

linuxcnc_debug.txt

Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
2938
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components


linuxcnc_print.txt

RUN_IN_PLACE=yes
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/home/tomaz/linuxcnc-dev/bin
LINUXCNC_TCL_DIR=/home/tomaz/linuxcnc-dev/tcl
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/home/tomaz/linuxcnc-dev/rtlib
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/home/tomaz/linuxcnc-dev/src/objects
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
INIFILE=/home/tomaz/linuxcnc-dev/configs/univpwmv/univpwm.ini
PARAMETER_FILE=univpwm.var
TASK=milltask
HALUI=halui
DISPLAY=axis
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Killing task linuxcncsvr, PID=2938
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

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

More
19 Jul 2013 01:59 #36786 by f1oat
Try the ldd command to see what lib are used by xhc-hb04.
Here is what it prints on my machine

$ ldd /usr/local/bin/xhc-hb04
linux-gate.so.1 => (0x00355000)
libusb-1.0.so.0 => /lib/libusb-1.0.so.0 (0x00b8b000)
liblinuxcnchal.so.0 => /usr/lib/liblinuxcnchal.so.0 (0x00603000)
liblinuxcncini.so.0 => /usr/lib/liblinuxcncini.so.0 (0x001ff000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00204000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00cf4000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x004d3000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00356000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x0073b000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00110000)
/lib/ld-linux.so.2 (0x008bf000)

I suspect issue with liblinuxcncini.so.0 on your machine.
I do not know how "run in place" works.
I use buildbot packages (buildbot.linuxcnc.org/) but the upgrade from 2.5.2 was painful because of remaining python modules on my setup. May be some mistake during upgrade phase on my side.

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

More
19 Jul 2013 05:38 #36789 by tommy

Try the ldd command to see what lib are used by xhc-hb04.


This is what I get:

$ ldd /usr/local/bin/xhc-hb04
linux-gate.so.1 => (0x0025c000)
libusb-1.0.so.0 => /lib/libusb-1.0.so.0 (0x006f0000)
liblinuxcnchal.so.0 => /home/tomaz/linuxcnc-dev/lib/liblinuxcnchal.so.0 (0x00c5f000)
liblinuxcncini.so.0 => /home/tomaz/linuxcnc-dev/lib/liblinuxcncini.so.0 (0x0084d000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00110000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00c29000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00798000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x0090e000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x00207000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00529000)
/lib/ld-linux.so.2 (0x00e3a000)

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

More
21 Jul 2013 14:48 #36849 by langarod
I would first say, thank you for sharing this component. It was easy to set up and get it to work.
It works very well.
Only two small problems found.

First, if running spindle very slow there is quite big rounding error in rpm on display. Changing code row to
p += xhc_encode_s16((int)60.0 * *(xhc->hal->spindle_rps), p);
solves that problem.

Second problem is, sometimes, DRO can show 1 number off.
For example, zero x-axis and move exact 1mm it still show 0.000. If move 1 more it shows 1.000. This up to 5, there it was correct.
If running in oposite direction, it showed correct.
If moving 1/10mm from zero, it showed correct 0.1, 0.2, 0.3 etc up to 0.9. Then when it is 1.0, dro show 0.0000. 1.1 was OK again.
When looking at hal pin, position wasn't 1.000, it was 0.9999999...
I changed in xhc_encode_float function to this
	unsigned int int_v = round(fabs(v) * 10000.0);
	unsigned short int_part = int_v / 10000;
	unsigned short fract_part = int_v % 10000;
	if (v < 0) fract_part = fract_part | 0x8000;
	*(short *)buf = int_part;
	*((short *)buf+1) = fract_part;
	return 4;
and now it looks like it shows correct values.

One other good thing to now is that some versions of LinuxCNC halui.axis.0.pos-relative dosn't apply tool offset. I had that problem first running on a quite old version of 2.6.0-pre. Pulled latest from git and it worked correct.

I just wanted to share my findings.
Thanks again for sharing this component to us. It helped me a lot!
The following user(s) said Thank You: f1oat

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

More
21 Jul 2013 16:16 #36850 by f1oat
Everything looks ok
if xhc-hb04 runs in test mode (launched from the shell), then there may be something wrong in path used by linuxcnc. You can search in your filesystem if there is another liblinuxcncini and remove it, or fix linuxcnc path.

Try the ldd command to see what lib are used by xhc-hb04.


This is what I get:

$ ldd /usr/local/bin/xhc-hb04
linux-gate.so.1 => (0x0025c000)
libusb-1.0.so.0 => /lib/libusb-1.0.so.0 (0x006f0000)
liblinuxcnchal.so.0 => /home/tomaz/linuxcnc-dev/lib/liblinuxcnchal.so.0 (0x00c5f000)
liblinuxcncini.so.0 => /home/tomaz/linuxcnc-dev/lib/liblinuxcncini.so.0 (0x0084d000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00110000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00c29000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00798000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x0090e000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x00207000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00529000)
/lib/ld-linux.so.2 (0x00e3a000)

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

More
21 Jul 2013 16:20 #36851 by f1oat
@langarod: thank you for the bug fix, I will integrate it in the next release.

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

More
31 Aug 2013 15:29 #38294 by chimeno
Hello,

I have the XHC-HB04 pendant but can not get it to work with LinuxCNC, and downloaded the file and the wiki and saved in the downloads folder, then unzip. Ubuntu open the terminal to begin with make make install but i gives me file not found.
not much recently that started with linux, you can help me?

regards
Albert

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

Time to create page: 0.159 seconds
Powered by Kunena Forum