Add Button to perform G Code Command

Moderators: TomKerekes, dynomotion

Post Reply
neill
Posts: 2
Joined: Sat Apr 06, 2024 8:34 pm

Add Button to perform G Code Command

Post by neill » Sat Apr 06, 2024 8:42 pm

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.

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Add Button to perform G Code Command

Post by TomKerekes » 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
Regards,

Tom Kerekes
Dynomotion, Inc.

neill
Posts: 2
Joined: Sat Apr 06, 2024 8:34 pm

Re: Add Button to perform G Code Command

Post by neill » Sun Apr 07, 2024 4:05 pm

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

Post Reply