Key Board Shortcut for "One Button Touch Off"?

More
27 Feb 2014 09:51 #44220 by Regnar
So after a lot of reading and going back and forth I was able to get my machine to work with the One Button touch off for the Z axis. I love this feature and it does make setup nice. What would make this even better is if I could use my pendant to initiate the zero cycle. My pendant uses a keyboard emulator with buttons so it is not a joystick. If someone could point me in the right direction or give me directions on how to incorporate this feature I would be grateful.

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

More
27 Feb 2014 15:41 - 27 Feb 2014 18:58 #44228 by ArcEye
Hi

You can change keyboard bindings in Axis manually or use my KeyChoice bindings editor
www.linuxcnc.org/index.php/english/forum...s-key-binding-editor
(you also now need libhiredis-dev package)

However rather depends what you did with your 'button' solution to touch off, as to whether that is directly translatable.

The other factor may be what keys your pendant can emulate. Just straight keys, or can it do modifiers too? (Ctrl Alt Shift)

regards
Last edit: 27 Feb 2014 18:58 by ArcEye.

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

More
28 Feb 2014 04:56 #44241 by Regnar
ArcEye, I used this method. 7xcnc.com/software/probing/

Im a newbie in the whole modifying thing but I believe it is a button on the CustomPanel.xml

I will read through the link tonight and see if I can make it on my own. Thanks.

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

More
28 Feb 2014 17:33 #44255 by ArcEye

ArcEye, I used this method. 7xcnc.com/software/probing/


OK thats a bit clearer, it uses a HALUI MDI command to run a sub which probes by gcode.

What this requires ideally, are programmable 'hot keys' for executing user defined commands (not present in Axis) or
accelerator keys being able to be defined for pyvcp button widgets (also currently not present).

As it stands there is no easy way I can think of, of initiating a probe sequence using the existing method, simply by emulating a key stroke
( unless you leave the MDI window open, with o100 call on the commandline and execute an Enter key! )

I will give the accelerator keys for pyvcp a bit of thought as I have been playing with that recently

regards

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

More
28 Feb 2014 20:04 #44259 by andypugh

As it stands there is no easy way I can think of, of initiating a probe sequence using the existing method, simply by emulating a key strokes


I wrote a HAL module to do the inverse, ie to send keystrokes when a HAL pin toggled, but that doesn't help.

This is the problem with keyboard-emulating pendants, they link into rather the wrong thing, into the Linux OS rather than into LinuxCNC and HAL.

A bit of googling indicates that you can map commands to keystrokes with xbindkeys
wiki.archlinux.org/index.php/Xbindkeys
So, I think you just need to link your required key combination to the command "halcmd setp halui.mdi-command-00 1"

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

More
28 Feb 2014 21:09 #44261 by ArcEye
Andy Pugh wrote:

This is the problem with keyboard-emulating pendants, they link into rather the wrong thing, into the Linux OS rather than into LinuxCNC and HAL.

A bit of googling indicates that you can map commands to keystrokes with xbindkeys
wiki.archlinux.org/index.php/Xbindkeys
So, I think you just need to link your required key combination to the command "halcmd setp halui.mdi-command-00 1"


I think that might as good a way as any, to achieve what you want.

As Andy says, the pendant approach is backwards really, you would not want to be linking to the keyboard if possible, rather directly executing system commands or activating HAL pins.

Having thought about pyvcp, I decided it is fraught with dangers.
It would be fairly easy to build in accelerator keys with the user having an underscore before the letter to be used, but there are so many keyboard bindings in Axis, there are actually very few free keys to use.
Since you can't control what it is used for by the end user, there is large scope for havoc with existing keys being hijacked or worse being activated unintentionally.

Given the paucity of free keys, if I were in your place, I would comment out the links to keys 0 - 9 in Axis and use those.
They are wasted to my mind, the axis selection can already be done by letter keys and there is a slider for feed rate decrease / increase.

Good Luck

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

More
01 Mar 2014 02:38 #44267 by Regnar
From what it sounds like is this might be a really bad ideal.

What about a physical button. I can wire another input into the breakout board. Would that be any easier do you think?

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

More
01 Mar 2014 15:22 - 05 Mar 2014 23:47 #44284 by ArcEye
Hi

A physical button is simplicity itself, just treat the same as the pyvcp button and net it to a halui mdi command.

You would just have to use another halui.mdi-command number and duplicate the command if you are keeping your pyvcp button, as you won't be able to net two OUT pins to the same signal
(well you could through some logic components but you have 32 MDI commands so just using another is easiest)

regards

PS

Now see this thread for an Axis 'hot key' option
www.linuxcnc.org/index.php/english/forum...r-defined-keys#44444
Last edit: 05 Mar 2014 23:47 by ArcEye.

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

Time to create page: 0.074 seconds
Powered by Kunena Forum