Great thread. Following with interest.
About your tool change you could command a x and y position after you command the z to go up, but before doing the tool change. Basically adding some lines like this (had this saved in a file, did not write this now. I'm not that skilled
)
In the header:
double ToolChangeX = 10; //Tool change X position (all in machine coordinates)
double ToolChangeY = 2.5; //Tool change Y position
double ToolChangeZ = -.01; //Tool change Z position
Down in the macro file:
double XOriginalPos = exec.GetXmachpos(); // Get the current machine coordinates
double YOriginalPos = exec.GetYmachpos(); // Get the current machine coordinates
double ZOriginalPos = exec.GetZpos(); // Get the current machine coordinates
exec.Code ("G53 G00 Z" + ToolChangeZ); //Moves to tool change position
while (exec.IsMoving ()){}
exec.Wait (200);
exec.Code ("G53 G00 X" + ToolChangeX+ " Y" + ToolChangeY); //Moves to tool change position
while (exec.IsMoving ()){}
exec.Wait (200);