Hi ticica,
You might do that in GCode. Or from C Code you can call the Move() function. The units of the Move function are in counts or steps.Go to a certain point on Z axis (equivalent of a rapid move, if possible) and pause. I would then change the tool.
Jogging is not normally allowed while GCode is executing. How do you intend to move? Using the KMotionCNC Jog Buttons? External buttons or MPG? Probe Motion? You might consider displaying a Message in the GCode and then stopping with M0. After the tool change and positioning the tool tip to a surface you could then press cycle start to resume. Otherwise if you wish to allow KMotionCNC to Jog while running GCode there are new KFLOP to KMotionCNC commands in the later Test Versions to allow this (see in PC_DSP.h):Allow me to move the Z axis to account for a any tool length difference.
#define PC_COMM_ENABLE_JOG_KEYS 37 // Allow User to Push Jog Buttons while JOB is running
#define PC_COMM_DISABLE_JOG_KEYS 38 // Disable allowing User to Push Jog Buttons while Job is Running
This can be done either by waiting for an external Input, or if GCode is stopped the external I/O can invoke Cycle Start with a normal External Button approach.Resume the program after I push a button (preferably a physical button connected to an IO)
Yes it is possible but there are some restrictions. #1 Programs invoked from the GUI (User Buttons not GCode) can not use the GUI such as to display messages. #2 Programs invoked from GCode can not invoke other GCode. These cases currently result in a deadlock.Is calling a KmotionCNC with DoPC() possible from such a handler? (I had the program freeze)?
The GCode Interpreter maintains a current position. Any commanded movements will assume this is the starting point of the motion. Any C Program that moves anything should request a resync after the movement in order for the Interpreter to update its internal state. Otherwise there may be a discontinuity in the next motion path.What does "resync interpreter positions" mean in "Execute a C Program in the KMotion Control Board + wait for it to terminate + resync Interpreter positions"?
HTH
Regards