- General
- General LinuxCNC Questions
- looking for syntax for .axisrc file to bind a key to run O code (.ngc file)
looking for syntax for .axisrc file to bind a key to run O code (.ngc file)
05 Apr 2020 13:21 #162766
by Muscats
I am looking for the correct syntax to use in an .axisrc file to bind a key to run O code (.ngc file)?
I have been googling this for the past couple of days and cannot get anything that works. I am using LinuxCNC2.8.
I have setup Z touch off by following this 7xcnc.com/software/probing/z-touch-plate/
I currently have the following line in my .axisrc file, which does not work
root_window.bind("<XF86HomePage>", c.mdi("o100 call"))
If I manually run o100 call in MDI it works
I have a PYVCP button in AXIS and clicking on that works too.
I just can't get it to launch of keypress on my wireless keyboard/pendant
I tested the key binding using this
root_window.bind("<XF86HomePage>", "destroy .") and the key bind works,
I just need to get the key bind to launch the o100 file, all suggestions greatly excepted
I have been googling this for the past couple of days and cannot get anything that works. I am using LinuxCNC2.8.
I have setup Z touch off by following this 7xcnc.com/software/probing/z-touch-plate/
I currently have the following line in my .axisrc file, which does not work
root_window.bind("<XF86HomePage>", c.mdi("o100 call"))
If I manually run o100 call in MDI it works
I have a PYVCP button in AXIS and clicking on that works too.
I just can't get it to launch of keypress on my wireless keyboard/pendant
I tested the key binding using this
root_window.bind("<XF86HomePage>", "destroy .") and the key bind works,
I just need to get the key bind to launch the o100 file, all suggestions greatly excepted
Please Log in or Create an account to join the conversation.
05 Apr 2020 13:45 #162768
by MaHa
Replied by MaHa on topic looking for syntax for .axisrc file to bind a key to run O code (.ngc file)
Maybe this helps, i think it worked for this member.
forum.linuxcnc.org/38-general-linuxcnc-q...xcnc?start=10#146464
forum.linuxcnc.org/38-general-linuxcnc-q...xcnc?start=10#146464
Please Log in or Create an account to join the conversation.
06 Apr 2020 03:00 - 06 Apr 2020 03:01 #162835
by phillc54
Replied by phillc54 on topic looking for syntax for .axisrc file to bind a key to run O code (.ngc file)
You may need to call a function then put your commands in the function, something like:
def my_button_function(event):
ensure_mode(linuxcnc.MODE_MDI)
c.mdi("o100 call")
root_window.bind("<XF86HomePage>", my_button_function)
Last edit: 06 Apr 2020 03:01 by phillc54. Reason: change button name
The following user(s) said Thank You: Muscats
Please Log in or Create an account to join the conversation.
06 Apr 2020 03:04 #162836
by Muscats
does all of that go in the .axisrc file?
Replied by Muscats on topic looking for syntax for .axisrc file to bind a key to run O code (.ngc file)
You may need to call a function then put your commands in the function, something like:
def my_button_function(event): ensure_mode(linuxcnc.MODE_MDI) c.mdi("o100 call") root_window.bind("<XF86HomePage>", my_button_function)
does all of that go in the .axisrc file?
Please Log in or Create an account to join the conversation.
06 Apr 2020 03:05 #162837
by phillc54
Replied by phillc54 on topic looking for syntax for .axisrc file to bind a key to run O code (.ngc file)
Yes and in that order.
Please Log in or Create an account to join the conversation.
06 Apr 2020 03:09 #162838
by Muscats
Replied by Muscats on topic looking for syntax for .axisrc file to bind a key to run O code (.ngc file)
Please Log in or Create an account to join the conversation.
06 Apr 2020 04:14 #162844
by Muscats
this worked perfectly, thank you
Replied by Muscats on topic looking for syntax for .axisrc file to bind a key to run O code (.ngc file)
You may need to call a function then put your commands in the function, something like:
def my_button_function(event): ensure_mode(linuxcnc.MODE_MDI) c.mdi("o100 call") root_window.bind("<XF86HomePage>", my_button_function)
this worked perfectly, thank you
Please Log in or Create an account to join the conversation.
- General
- General LinuxCNC Questions
- looking for syntax for .axisrc file to bind a key to run O code (.ngc file)
Time to create page: 0.097 seconds