Couple of XHC-HB04 use questions
- photomankc
- Offline
- Premium Member
- Posts: 96
- Thank you received: 4
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.
No, per the README:1.) Does every button have possible "Synthesized" X,Y,Z,A variations?
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...ME;hb=refs/heads/2.7If 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.
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)
$ halcmd show pin xhc-hb04.
Assuming you are using axis_manualtoolchange.hal or similar, it loads a2.) 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.
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
You can do almost anything with Hal but no standard configuration will meet3.) Is it possible to use the keys in an OR situation with hal inputs and
postgui.hal?
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
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).
Please Log in or Create an account to join the conversation.
- photomankc
- Offline
- Premium Member
- Posts: 96
- Thank you received: 4
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.