XHC-HB04 wireless MPG pendant HAL module

More
10 years 9 months ago #67742 by ssparko
I'm having a problem with my new xhc hb04. It's a wired unit. Turning the hand wheel clockwise moves as it should, i.e. 0.001 per click. However turning counter clockwise moves roughly 0.300 in the positive direction.

This is on a BBB with machinekit. linuxcnc 2.7.0~pre0

Running the 'xhc-hb04' command line utility gives the following:
Code:
completed but closing the device handle xhc-hb04: waiting for XHC-HB04 device xhc-hb04: found XHC-HB04 device 04 00 00 11 00 00 04 00 00 11 00 0C 04 00 00 11 01 0C delta +1 <-Clockwise click 04 00 00 11 00 0C 04 00 00 11 01 0C delta +1 <-Clockwise click 04 00 00 11 00 0C 04 00 00 11 FF 0C delta +255 <-Counter clockwise click 04 00 00 11 00 0C 04 00 00 11 01 0C delta +1 <-Clockwise click 04 00 00 11 00 0C 04 00 00 11 FF 0C delta +255 <-Counter clockwise click 04 00 00 11 00 0C 04 00 00 11 01 0C delta +1 <-Clockwise click 04 00 00 11 00 0C 04 00 00 11 FF 0C delta +255 <-Counter clockwise click 04 00 00 11 00 0C 04 00 00 11 01 0C delta +1 <-Clockwise click 04 00 00 11 00 0C

It seems to me the counter clockwise click should produce -1 instead of +255

I thought I would apt-get update but there seems to be some trouble with that too:

W: Failed to fetch deb.dovetail-automata.com/dists/wheezy/Release Unable to find expected entry 'main/binary-armel/Packages' in Release file (Wrong sources.list entry or malformed file)

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

  • jepler
  • Administrator
  • Administrator
More
10 years 9 months ago #67752 by jepler
Replied by jepler on topic XHC-HB04 wireless MPG pendant HAL module
ssparko said:

This is on a BBB with machinekit. linuxcnc 2.7.0~pre0

machinekit and linuxcnc diverged quite some time ago, so we may not be able to give you the most accurate advice about your software.

It looks like machinekit has a fix for a bug that could be your bug, back in july 2015. I don't know how you determine the specific git version of your software when using machinekit.
Code:
commit 80f4db00d57a7b4083e49f58374722917d8537d8 Author: marksue <msuevern@googlemail.com> Date: Fri Jul 3 23:26:44 2015 +0000 Fixed incorrect left\rigth jogging diff --git a/src/hal/user_comps/xhc-hb04.cc b/src/hal/user_comps/xhc-hb04.cc old mode 100644 new mode 100755 index c9a5e77..0a6703f --- a/src/hal/user_comps/xhc-hb04.cc +++ b/src/hal/user_comps/xhc-hb04.cc @@ -388,7 +388,7 @@ void cb_response_in(struct libusb_transfer *transfer) xhc.button_code = in_buf[1]; xhc.axis = (xhc_axis_t)in_buf[3]; - *(xhc.hal->jog_counts) += ((char)in_buf[4]); + *(xhc.hal->jog_counts) += ((signed char)in_buf[4]); *(xhc.hal->jog_counts_neg) = - *(xhc.hal->jog_counts); *(xhc.hal->jog_enable_off) = (xhc.axis == axis_off); *(xhc.hal->jog_enable_x) = (xhc.axis == axis_x);
this bug and its fix were not forwarded upstream from machinekit to linuxcnc, so as of today linuxcnc lacks any similar bug fix. I don't have any of the relevant hardware so I can't do any testing regarding this bug.

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

More
10 years 9 months ago #67758 by cncbasher
which build of machinekit are you using on your bbb ,
i would concider grabbing the latest , that fix should be in the latest bbb build

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

More
10 years 8 months ago #70455 by blacksmith99
Hello,

I have a working setup using the 5i25 by itself with the XHC-HB04 pendant. I'm trying to get a configuration going using the parallel port. The parallel port config works fine until I add the lines related to the pendant from the working 5i25 ini file.

Here is the error log. I can see that it's trying to link two pins to the same signal. I'm not sure what to do about it as it all works in the other configuration.

Any ideas?

Log Follows.

Thanks!


LINUXCNC - 2.7.4
Machine configuration directory is '/home/blacksmith99/linuxcnc/configs/SX3-Parallel_HB04'
Machine configuration file is 'SX3-Parallel_HB04.ini'
Starting LinuxCNC...
.
Found file(REL): ./SX3-Parallel_HB04.hal
Found file(REL): ./custom.hal
Found file(LIB): /usr/share/linuxcnc/hallib/xhc-hb04.tcl
xhc-hb04: waiting for XHC-HB04 device
xhc-hb04: found XHC-HB04 device
xhc-hb04.tcl: using std_start_pause_button
Pin 'motion.spindle-speed-out-rps-abs' was already linked to signal 'spindle-cmd-rps-abs'
while executing
"hal net pendant:spindle-rps <= motion.spindle-speed-out-rps-abs => xhc-hb04.spindle-rps"
("eval" body line 1)
invoked from within
"eval hal net $args"
(procedure "net" line 1)
invoked from within
"net pendant:spindle-rps <= motion.spindle-speed-out-rps-abs => xhc-hb04.spindle-rps"
(procedure "wheel_setup" line 199)
invoked from within
"wheel_setup $::XHC_HB04_CONFIG(jogmode)"
invoked from within
"if { ![namespace exists ::tp] || ([::tp::passnumber] != 0) } {
connect_pins ;# per ini file items: [XHC_HB04_BUTTONS]buttonname=pin
wheel_setup..."
(file "/usr/share/linuxcnc/hallib/xhc-hb04.tcl" line 529)
invoked from within
"source $filename"
invoked from within
"set result [source $filename]"
(file "/usr/bin/haltcl" line 55)
Shutting down and cleaning up LinuxCNC...
xhc-hb04: connection lost, cleaning up
[timestamp] [threadID] facility level [function call] <message>
[ 0.000000] [00001a2d] libusbx: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know
[ 0.000597] [00001a2d] libusbx: warning [do_close] A cancellation for an in-flight transfer hasn't completed but closing the device handle
LinuxCNC terminated with an error. You can find more information in the log:
/home/blacksmith99/linuxcnc_debug.txt
and
/home/blacksmith99/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
blacksmith99@linuxcnc:~$

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

More
10 years 8 months ago #70460 by dgarrett
The problem is indicated by:

Pin 'motion.spindle-speed-out-rps-abs' was already linked to signal 'spindle-cmd-rps-abs'


You likely used pncconf (or stepconf) which create numerous signals that are
connected to a source but not to a destination -- e.g,, it creates signals
which are not used.

So, in your config directory, find the hal file created by pncconf (or
stepconf) and look for a line like:
Code:
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs

Remove that line or comment it out with a leading '#' character and try again

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

More
10 years 8 months ago #70481 by blacksmith99
dgarrett,

Thank you very much. I will try that. I knew there something going on with the pins. I don't have enough experience with this to know what can safely be deleted and what can't. I went back and forth between the ini and hal files trying to see a connection as to where they are different.

As far as I can tell the hal files are indentical. That is what confuses me. One of them was indeed setup by stepconf as I wanted to use the paralell port. The 5i25 hal file was put together with help from andypugh and pcw. There is a thread here where I posted my hal file which works perfectly with the G540 and the 5i25. Smooth as silk. I realize that the 5i25 is overkilll for the G540, the paralell port is more than fast enough. I had already purchased the 5i25 before I understood that. I'm wanting to add probing routines to my mill and I thought that it would be simple matter to change over to the paralell port while I developed that capability.

It might be more effective to just make changes to the 5i25 file and work from there.

I don't spend enough time time working with the hal files to fully understand them. I have delved into them in the past but as soon as I get it working I don't work with the hal files enough to handle new problems.

I appreciate the time and effort you and the other folks here put into helping folks.

Regards,

Matt

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

Time to create page: 0.143 seconds
Powered by Kunena Forum