XHC-HB04 wireless MPG pendant HAL module

More
07 May 2015 22:04 - 07 May 2015 22:26 #58485 by dgarrett
The LinuxCNC 2.6 xhc-hb04.tcl script provide a lowpass filter (README: coefs)

With no filtering (coefs=1 1 1 1), and axis acceleration=20 (inch units),
the velocity and acceleration will have high frequency content: (oops, circled wrong item,
this is with coef=1 (Current = 1)):



With filtering (coefs= 0.01 ...), the velocity is smoothed but the acceleration
will still be very high in frequency.


In LinuxCNC 2.7, xhc-hb04.tcl provides a new option to limit the acceleration
while jogging and the behavior is much improved for machines with high accelerations.



Ref: git.linuxcnc.org/gitweb?p=linuxcnc.git;a...b52bfd9ccedb44f0926b
Attachments:
Last edit: 07 May 2015 22:26 by dgarrett.

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

More
08 May 2015 04:39 #58492 by rythmnbls
I played with the filtering co-efficients, but I couldn't really detect any difference, so my next question is after looking ( very quickly ) at the changes in the 2.7 tcl scripts, is there any reason why I couldn't attempt to backport / hack the mpg_accel stuff into a 2.6 config or does it rely on lower level binary support ?

Regards,

Steve.

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

More
08 May 2015 06:05 #58499 by dgarrett

is there any reason why I couldn't attempt to backport / hack the mpg_accel stuff into a 2.6 config or does it rely on lower level binary support ?


You could try but their are numerous changes and the organization of the
xhc-hb04 demos has changed considerably:
1) The user-space driver (xhc-hb04.cc) has a few changes which
are intended to be backwards compatible.
2) The helper scripts (monitor-xhc-hb04, xhc-hb04-accels (new) were
relocated to /usr/bin/)
3) The xhc-hb04.tcl script was relocated to /usr/share/linuxcnc/hallib/
4) The linuxcnc starting script (linuxcnc) now supports a search using
HALLIB_DIR (/usr/share/linuxcnc/hallib)
5) The xhc-hb04 demo ini files are now separated into multiple parts
using the #INCLUDE directive
6) The pendant helper comp (xhc_hb04_util.so) updated
7) man pages and the .txt files and README file in the demo dir updated

These are what I remember, there may be more. It would probably be much simpler
to become a tester/user of 2.7. (see the README and .txt files in the configs/axis/sim/xhc-hb04
directory for updates on the demo configs)

The 2.7 branch has been through 6 prereleases (beginning with 3f5e5a5 2014-04-07)
and has a number of new features -- see the changelog entries for 2.7.0~pre1-6
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...an/changelog;hb=HEAD

Debs are available from the buildbot, for instructions see:
buildbot.linuxcnc.org/

or get debs directly with wget from: buildbot.linuxcnc.org/dists/

Some info on upgrading from 2.6 to 2.7:
www.linuxcnc.org/docs/2.7/html/getting-s...l#_updating_linuxcnc
See Section 4.2 for some additional information on updating a config

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

More
08 May 2015 06:50 - 08 May 2015 06:52 #58500 by rythmnbls
Thanks for your reply, I tried a quick attempt but I think I'm missing stuff from xhc_hb04_util.comp as it complained about pin muxing on startup.
Specifically in the multiplexer for ini.N.max_acceleration code addition.

I also have to revise my earlier statements, after messing around with the coeffs a bit more, I found that I didn't need to lower the feed override nearly as much to get smooth operation, so it does work quite well on 2.6. For now I'm happy to wait till 2.7 is released. Thanks again for your halscope pics, they were quite enlightening.

Regards.

Steve
Last edit: 08 May 2015 06:52 by rythmnbls. Reason: Spelling

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

More
22 May 2015 05:17 #58927 by julesgf
Hi All

I'm running 2.7.0-pre6 on Ubuntu 12.04 (updated from 10.04) happily. I have a 16 button HB04 which I'm trying to get running.
I've been able to get as far as the jog wheel jogging in LinuxCNC, however, 90% of the jog wheel "jogs" are not being registered by linuxCNC.

If I run the built in driver at /usr/bin i get:
cnc@cnc-desktop:/usr/local/bin$ /usr/bin/xhc-hb04
Creating pin: xhc-hb04.x.pos-absolute
<snip>
Creating pin: xhc-hb04.jog.minus-a
xhc-hb04: waiting for XHC-HB04 device
xhc-hb04: found XHC-HB04 device
04 00 00 11 01 0C delta +1
04 00 00 11 01 0C delta +1
04 00 00 11 00 0C
.................
it "works" however while it is "working" I can see that it is registering all the button presses but only ~10% of the jogs.

if I run the driver that I've compiled from the v06 driver at /usr/local/bin I get:
cnc@cnc-desktop:/usr/local/bin$ /usr/local/bin/xhc-hb04
Creating pin: xhc-hb04.x.pos-absolute
<snip>
Creating pin: xhc-hb04.jog.minus-a
waiting for XHC-HB04 device
found XHC-HB04 device
Segmentation fault (core dumped)
cnc@cnc-desktop:/usr/local/bin$

I'm well past my understanding of linux here so any ideas would be very much appreciated.

JF

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

More
19 Jun 2015 02:21 #59962 by cahlfors
Thanks to all contributors to this amazing feature!
The pendant as such is very reasonably priced, performs neatly and the sample config works nicely from the start! :)

It took me a while to figure out to copy the relevant sections from the sample files to my own config files and to find the proper documentation here:
/usr/share/doc/linuxcnc/examples/sample-configs/sim/axis/xhc-hb04
The wiki seems outdated and contains conflicting information.
But then, I am especially slow to get it. ;)

Other than that, as soon as there was life, it was fully functional.

My next step is to figure out how to write some code for the macro buttons. I will use them to find centers, edges etc.

Thank you very much! :)

/Chris

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

More
21 Aug 2015 03:32 - 21 Aug 2015 03:33 #61605 by vre
Last edit: 21 Aug 2015 03:33 by vre.

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

More
21 Aug 2015 08:09 #61611 by rythmnbls

Is this compatible with hal component ?
www.ebay.com/itm/Wireless-Mach3-MPG-Pend...-New-Y-/161757167314


It looks just like the pendant I have, which works very well.

I installed 2.7.0 pre7 and tried the mpg_accel settings. I'm very impressed, very smooth acceleration at all feed rates. Another thank you to the developers.

Steve.

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

More
21 Aug 2015 15:12 #61616 by cncbasher

Is this compatible with hal component ?
www.ebay.com/itm/Wireless-Mach3-MPG-Pend...-New-Y-/161757167314


yes it is compatable with linuxcnc all the macros and what you need is all done
it's all shown in the examples under xhc
with all the required files and instructions to use

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

More
14 Sep 2015 21:15 #62563 by tommy
I successfully add all customization for pendant in my fresh 2.7 install, the only issue I still have is regarding halui.program.is-idle pin which is also used for timer needs.

Here is my timer code:
# TIMER
loadrt time 
addf time.0 servo-thread 
addf not.1 servo-thread 
net prog-running not.1.in <= halui.program.is-idle 
net cycle-timer time.0.start <= not.1.out 
net cycle-seconds pyvcp.time-seconds <= time.0.seconds 
net cycle-minutes pyvcp.time-minutes <= time.0.minutes 
net cycle-hours pyvcp.time-hours <= time.0.hours

Debug info:
Debug file information:
xhc-hb04.tcl: using std_start_pause_button
Can not find -sec APPLICATIONS -var DELAY -num 1 
custom.hal:5: Pin 'halui.program.is-idle' was already linked to signal 'pendant:is-idle'
5312
  PID TTY      STAT   TIME COMMAND
5386
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads

What would be the right way to get both working?

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

Time to create page: 0.248 seconds
Powered by Kunena Forum