Page 1 of 1

Add Button to perform G Code Command

Posted: Sat Apr 06, 2024 8:42 pm
by neill
I would like to create 2 buttons on the Kmotion CNC Screen.

The first is click a button and the CNC performs a G01 X0Y0 F200 motion to my program's X0Y0.

The second button is the perform a G01 Z0 F200 motion down to the Z0 for the programs Z0.

These would save me having to manually jog the machine to my part origin after a tool change.

My guess is i have to assign a script Action to a button that points to a C program, but I'm not familiar with how to get the C code to act according to G code commands.

Re: Add Button to perform G Code Command

Posted: Sun Apr 07, 2024 12:13 am
by TomKerekes
Hi Neil,

You can assign a GCode file to a button by specifying the Execute Prog Action with a file with an .ngc extension.

Remember to terminate the GCode with M30

Re: Add Button to perform G Code Command

Posted: Sun Apr 07, 2024 4:05 pm
by neill
TomKerekes wrote:
Sun Apr 07, 2024 12:13 am
Hi Neil,

You can assign a GCode file to a button by specifying the Execute Prog Action with a file with an .ngc extension.

Remember to terminate the GCode with M30
How do i assign the G Code file to the button? Which of the subscript actions should i pick to specify the Execute Program action? I'm not having any luck getting this to work.

I figured it out, i had to choose a Motion Button instead of a regular Button Style