Couple of XHC-HB04 use questions

More
23 Dec 2014 00:30 #54225 by photomankc
So I have purchased and setup the XHC-HB04 wired pendant(18 button) and ripped out the old joypad. This thing is awesome by comparison and makes my work a LOT easier setting up. I have a few questions that I didn't see addressed elsewhere.

1.) Does every button have possible "Synthesized" X,Y,Z,A variations? The "=_" keys all have these and that allows me to use "=1/2" for quick offset zeros when using the edge finder and the "=0" button to set absolute zero but there are a few other functions that would be really nice if I could do that with Macro3 or the other Macro keys. Is it just a matter of adding "-x, -y, -z, -a" to the key name for those or is that hardcoded only to the "=_" keys?

2.) Is there a way to have one of the keys press enter for me? When changing TTS tools manually the GUI pops up a dialog and that means I have to walk over to the keyboard, press enter, and walk back to monitor the machine. It would be nice if I could assign a macro key to press enter for me instead so I can do a tool change with just the pendant.

3.) Is it possible to use the keys in an OR situation with hal inputs and postgui.hal? So I want to be able to switch to manual mode with the pendant if the machine gets into MDI sometimes from an operation. I have buttons on my control panel that originally were 'wired' in an OR with the Joypad so that either device could press a button and select manual mode or MDI mode. With the pendant, I had to give it direct control of the hal pins for that and disconnect that from the control panel. I tried using the HAL syntax for one of the OR pins in the macro line for a button in the machine .ini file and while it did not generate an error, it also did not work. I suppose if there is an answer to number 2 then that could also be used for this as well.

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

More
23 Dec 2014 04:18 #54236 by dgarrett

1.) Does every button have possible "Synthesized" X,Y,Z,A variations?

No, per the README:

If the configuration file includes buttons named:
button-zero
button-goto-zero
button-half
then the driver creates additional buttons for these that are active only if
the axis is selected by the rotary switch.

git.linuxcnc.org/gitweb?p=linuxcnc.git;a...ME;hb=refs/heads/2.7
You can see all the pins created from the cmdline (without running LinuxCNC:
$ xhc-hb04 --help  # to see options
$ xhc-hb04         # show pins (without LinuxCNC running)
If LinuxCNC is running, you can see all pins with:
$ halcmd show pin xhc-hb04.

2.) Is there a way to have one of the keys press enter for me? When changing TTS tools manually the GUI pops up a dialog and that means I have to walk over to the keyboard, press enter, and walk back to monitor the machine.

Assuming you are using axis_manualtoolchange.hal or similar, it loads a
user_comp named hal_manualtoolchange. This component has an unconnected pin that can be connected to a button hal_manualtoolchange.change_button):
halcmd show pin hal_manualtoolchange

3.) Is it possible to use the keys in an OR situation with hal inputs and
postgui.hal?

You can do almost anything with Hal but no standard configuration will meet
everyone's wishes.

The xhc-hb04 demo configs use [HAL]HALFILE=xhc-hb04.tcl that 1)reads the ini file for common configuration settings, 2) loadusr the xhc-hb04 user_comp, and 3)hooks up the pendant using the xhc_hb04_util helper component. The helper component is described:
$ man xhc_hb04_util
You can make your own configuration using _just_ the xhc-hb04 userland component and (optionally) the xhc_hb04_util component and add any logic you want _without_ using the xhc-hb04.tcl halfile.

It is instructive to to load your config that uses [HAL]HALFILE=xhc-hb04.tcl
(or a similar sim demo) with the ini file options that you want and then save
the hal configuration with:
$ halcmd show     >hal.show
$ halcmd save all >saveall.hal

The hal.show file shows the entire hal configuration; the saveall.hal file lists all the hal commands (except user land commands like loadusr).

Using these files as a guide, you can make your own hal configuration and add whatever logic you need. Two methods are:

1) Use your existing [HAL]HALFILE= configuration but add new HALFILEs to a) delete some signals and/or unlink some pins (using the hal commands delsig and unlinkp), b) add components and new wiring connections for additional, custom
logic.

2) Make a new set of HALFILEs with the components and logic for your
configuration using the saveall.hal listing as a guide (especially for ordering
addf lines).
The following user(s) said Thank You: photomankc, nkp

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

More
23 Dec 2014 15:14 #54254 by photomankc
Thanks for that. I should have copied the README out of the SIM folder. My Bad on that. I guess I would say number 1 would be a feature request im my mind. Lots of functionality could be added if any button could do different actions on X/Y/Z/A.

hal_manualtoolchange - Perfect.... That will solve my biggest gripe right now. I can live with MDI/Manual being tied to the pendant only. The toolchange input will make a lot of difference for me.

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

Time to create page: 0.074 seconds
Powered by Kunena Forum