G codes and hand jog at the same time.

Moderators: TomKerekes, dynomotion

Post Reply
Alexanders
Posts: 61
Joined: Wed May 03, 2023 12:54 am

G codes and hand jog at the same time.

Post by Alexanders » Sun Sep 07, 2025 11:01 pm

In grinding machines, the workpiece moves cyclically in the XY plane according to the G code program. At this time, the operator moves the Z-axis down using the MPG or on-screen buttons.
There are also coordinate grinding machines where, during program execution, the operator changes the tool radius correction.
Most often, these programs are short and run in the M99 loop. When running G code in a loop, KMotionCNC does not allow manual movements. Changing variables in the emc.var file also has no effect.
My question has two parts:
1. How can I allow manual movement of axes that are not used in the current G code?
2. How to change the current H or D values for the current tool using MPG? (when G43 or G41/42 are active)

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

Re: G codes and hand jog at the same time.

Post by TomKerekes » Mon Sep 08, 2025 4:39 pm

Hi Alexanders,
1. How can I allow manual movement of axes that are not used in the current G code?
If the Z axis is removed from the Coordinate System it can then be moved using independent commands such as Jog/Move etc. However the on-screen Jog buttons will not work for axes not defined in the Coordinate System. An external MPG should work. Or you could create custom buttons for Jogging on-screen.

2. How to change the current H or D values for the current tool using MPG? (when G43 or G41/42 are active)
You can change the Tool Diameter with:

Code: Select all

// Set GCode Tool Table Diameter Persist+1 = Tool Index
//								 Persist+2 = where to get value from KFLOP persist (double offset) 
//     (KFLOP persist -> GCode #Vars) note: vars are transferred as doubles 2 persists each
#define PC_COMM_SET_TOOLTABLE_DIAMETER 31 // Persist+1=#ToolIndex,+2=Source   
But the change wont have an effect until G41/42 is reactivated.
Regards,

Tom Kerekes
Dynomotion, Inc.

Alexanders
Posts: 61
Joined: Wed May 03, 2023 12:54 am

Re: G codes and hand jog at the same time.

Post by Alexanders » Sun Sep 28, 2025 10:19 pm

An external MPG should work. Or you could create custom buttons for Jogging on-screen.
If an axis is removed from the coordinate system, how can I make its value appear and update in the DRO?

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

Re: G codes and hand jog at the same time.

Post by TomKerekes » Tue Sep 30, 2025 12:06 am

The DROs only show the axes that are defined. You might create a User DRO with the Screen Editor.
Regards,

Tom Kerekes
Dynomotion, Inc.

Alexanders
Posts: 61
Joined: Wed May 03, 2023 12:54 am

Re: G codes and hand jog at the same time.

Post by Alexanders » Wed Oct 15, 2025 10:49 pm

You might create a User DRO with the Screen Editor
Creating unnecessary DROs is not the best way to go. If the axis is not declared, is it possible to write values cyclically to its DRO using the available functions?

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

Re: G codes and hand jog at the same time.

Post by TomKerekes » Fri Oct 17, 2025 1:34 pm

No there isn’t.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply