XHC-HB04 wireless MPG pendant HAL module

More
30 May 2014 10:49 #47535 by dgarrett
Several changes and enhancements were made to the xhc-hb04 driver when incorporated from the wiki version into git master (and now 2.6) as mentioned earlier in this thread:

www.linuxcnc.org/index.php/english/forum...dule?start=120#44056

There is now a hal pin named xhc-hb04.stepsize-up which will normally be connected like:
net mysigname xhc-hb04.button-step => xhc-hb04.stepsize-up

Example configurations provided in 2.6 are:

configs/sim/axis/xhc-hb04/xhc-hb04-layout1.ini (16 button)
configs/sim/axis/xhc-hb04/xhc-hb04-layout2.ini (18 button)
configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.ini (18 button)


Please see the README and txt files for more info (these appear when using the linuxcnc configuration picker):

configs/sim/axis/xhc-hb04/README
configs/sim/axis/xhc-hb04/xhc-hb04-layout1.txt
configs/sim/axis/xhc-hb04/xhc-hb04-layout2.txt
configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.txt



If for some reason you want to continue using a version from the wiki with 2.6, you will probably need to rename the module (and hal pins) to avoid a naming conflict. Future bug fixes , improvements etc will be made to the code in the linuxcnc git tree
The following user(s) said Thank You: vgraves

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

More
31 May 2014 21:12 #47576 by vgraves
Thanks for the references. I have manually created the new pin connection in my existing HAL file, so the pendant works as it used to. But I've found the new driver files and will try to incorporate them.

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

More
05 Jun 2014 07:46 #47698 by vgraves
I have tried to follow the instructions given in the 2.6 xhc-hb04 README file:
Copied the two .tcl files and the layout2.cfg file to my configuration folder.
Added the HALFILE references to my .ini file
Added the XHC-HB04_CONFIG, XHC-HB04_BUTTONS, & HALUI stanzas to my .ini file.

LinuxCNC starts up and functions. I've verified via the HAL Meter that the pendant axis selection switch and the jog wheel pins are working, but I am unable to jog.

I assumed the instructions would provide a more-or-less working pendant. Was I supposed to also edit my .hal file to connect some .and2 pins as was needed in the wiki version?

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

More
05 Jun 2014 08:38 #47701 by dgarrett

LinuxCNC starts up and functions. I've verified via the HAL Meter that the
pendant axis selection switch and the jog wheel pins are working, but I am
unable to jog.


What are the _exact_ pin names you are referring to?


First step is to try one of the existing simulator configurations
using one that is appropriate for your pendant layout. If that works,
you may have missed something in your ini file.

I see an ommission in the README, it should mention that you need
[HAL]
HALUI = halui


There might be errors reported at start up, to see these, start
linuxcnc in a terminal:
$ cd your_config_directory
$ source linuxcnc_root/scripts/rip-environment ;# if RIP build
$ linuxcnc name_of_config.ini

and copy and post the output


Post your configuration: ini file and hal files.

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

More
05 Jun 2014 13:13 #47706 by Muzzer
If somebody who knows what they are doing (not me, then) could sit down in front of a vanilla installation and document all the stuff they actually changed/added and where they changed/added it, this would be really helpful. I think we are seeing that age-old problem - that the guys who documented the process knew what they meant and how to do it but it hasn't all quite come out in the words. I know, I know - I've been guilty of that myself in the past.

Initially most LCNC installations are going to look very similar and should be capable of running one of the simulations out of the box (mine is). A generic procedure for implementing the XHC pendant with just one of those would be very helpful. I'm more than qualified to act as your pet idiot if you want to perform an "idiot test" to validate that process. So far I've failed to get my MPG running...

The forum does a fantastic job of spreading the word and helping new adopters to get up and running but there are quite a few hurdles for the inexperienced which cause some serious head scratching. I hope I'm not sounding unreasonably critical! I'd like to help with the process but I'm afraid I'm not in a position (yet) to do so.

I appreciate all the great work and support you guys put in and I'll share my experiences as I implement my system. In the meantime, if somebody could help to identify the full set of changes required I'm sure there would be an appreciative audience and I'll be very happy to test them out!

Murray

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

More
05 Jun 2014 23:05 #47722 by dgarrett
I'm not sure all pendants from all vendors will work but here is demonstration of an 18 button (layout2) pendant with linuxcnc2.6 and the simulator configuration in:

configs/sim/axis/xhc-hb04/xhc-hb04-layout2.ini




The demo was made with a fresh install of linuxcnc2.6 from the buildbot
(buildbot.linuxcnc.org) on ubuntu 13.10 (precise)

So, a good procedure is:
1) test pendant using one of the provided simulator configurations
2) if it works in simulator, follow README instructions to
adapt to a different configuration and adapt to your machine
3) if it doesn't work with any of the provided simulator configurations,
start in terminal and post all output
The following user(s) said Thank You: Muzzer

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

More
06 Jun 2014 05:50 #47734 by Muzzer
Thanks Dewey

My initial installation was created by running an image that (I think) contained both Ubuntu 10.04(?) and LinuxCNC 2.4 (possibly 2.3). There is note on the front page of linuxcnc.org that says "Note: Do Not upgrade Ubuntu from the installed version as it will prevent LinuxCNC from working.", so I was wary of upgrading to v12. Similarly, I didn't upgrade to the latest version of LinuxCNC..

However, I upgraded to 12.04 and 2.6.0 and the pendant worked immediately. This wasn't a step-by-step methodical approach, so I could only speculate what the differences are that allow the pendant to work. Presumably a variety of updates have been incorporated along the way and it may also be cleaner ie without any unauthorised changes from me.

Thanks again!

Murray

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

More
06 Jun 2014 07:52 #47740 by vgraves
Dewey,

I was able to successfully run the layout2 simulation...pendant worked correctly.

When I start my configuration from a terminal, I get these messages:

xhc-hb04.tcl: !!! <hal.mdi-command-00> target pin does not exist, continuing
xhc-hb04.tcl: using std_start_pause_button

I also noticed that the XYZ positions in AXIS did not update when actually jogging the machine with the keyboard. But the pendant did not work either.

I've attached my ini and hal files. Any help you could provide would be appreciated.

Van
Attachments:

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

More
06 Jun 2014 23:18 - 06 Jun 2014 23:20 #47760 by dgarrett

xhc-hb04.tcl: !!! <hal.mdi-command-00> target pin does not exist, continuing

typo: hal.mdi-command-00 should be halui.mdi-command-00

I've attached my ini and hal files. Any help you could provide would be appreciated.


Your configuration uses non-trivkins kinematics (gantrykins).
It is not clear to me which jogging features actually work for non-trivkin configurations in linuxcnc2.6 and earlier releases (and current git master). Maybe it will get better with a joints-axis branch that folks are working on -- I have not investigated.

You should probably use the halui plus-minus jogmode -- I think you will be able to use the pendant to jog at variable rates but without exact step increments.

README

jogmodes:
normal: postion mode, the axis will move exactly regardless of how long it takes. Beware: the machine may keep moving after you stop rotating the jog wheel.

vnormal: velocity mode, the axis will stop when the wheel stops. Beware: the amount moved per wheel detent may be less than specified if the machine velocity and acceleration cannot accomplish the move in time.

plus-minus: halui plus-minus jogging (may be useful for world-mode jogging in non-trivkins machines).


To set up plus-minus jogmode in the ini file:
#jogmode = vnormal
jogmode = plus-minus
Last edit: 06 Jun 2014 23:20 by dgarrett.
The following user(s) said Thank You: vgraves

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

More
07 Jun 2014 21:14 #47772 by vgraves
The change to using plus-minus jogmode worked -- thanks for that tip! However, changing the values in the step sequence parameter did not affect the jogging speed or the scale values displayed on the pendant, nor did changing the scale factors in the ini file. What did work was changing from inch mode to mm mode. This gave me the same scale values on the pendant that I saw before - 1, 10, 100, 1000.

I notice the coordinate positions don't continuously update in the pendant while a program is running. If I change the axis switch during the program, the pendant display resets, and the values update for about 5 seconds, then they freeze. Is this the expected behavior since a pendant isn't usually needed while running a part program?

Now that the basic jog functionality is working, I'm curious as to how to change the behavior of the pendant. For instance, the GOTO-ZERO button run is configured to run an MDI command to move to 0,0,0. I'd like that to be axis-specific, depending on the position of the axis switch (i.e., only move one axis at a time to its zero). I'd also like the ZERO button to set the selected axis' current position to 0.

Would this have to be done in the tcl files, or are there things I would do in the ini/hal files?

Thanks.

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

Time to create page: 0.181 seconds
Powered by Kunena Forum