Page 1 of 1

G codes and hand jog at the same time.

Posted: Sun Sep 07, 2025 11:01 pm
by Alexanders
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)

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

Posted: Mon Sep 08, 2025 4:39 pm
by TomKerekes
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.

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

Posted: Sun Sep 28, 2025 10:19 pm
by Alexanders
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?

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

Posted: Tue Sep 30, 2025 12:06 am
by TomKerekes
The DROs only show the axes that are defined. You might create a User DRO with the Screen Editor.

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

Posted: Wed Oct 15, 2025 10:49 pm
by Alexanders
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?

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

Posted: Fri Oct 17, 2025 1:34 pm
by TomKerekes
No there isn’t.