Hi,
OK if you are reasonably sure that the code whatever it is and wherever it is adequate to return the machine to the new start point barring the lowering of the Z axis
prior to the <return to zero> thereby causing a tool contact....then by all means add an extra Y movement in the Gcode statements we have already identified.
------ Move Z to home position ------
GCode = ""
mc.mcCntlGcodeExecuteWait(inst, "G00 G90 G53 Z0.0\n
g0 g91 y10\n
g90\n")
As you can see I've added a little extra. The first line remains the same, namely the Z axis moves to the top of travel, but the second line moves the Y axis 10 units
relative to its current X, Y location, that's the meaning of g91, and the last line restores Absolute mode, ie g90.
Note I can'e be sure that you want to move positive 10 units or negative 10 units....you'll have to experiment.....slowly!
Craig