Hi all,
When doing manual tool changes, I have forgotten to rezero my tool height one too many times !
So I created a M6 macro that forces me to follow the standard procedure each time.
What I'd like to know is how to enable jogging while the Macro waits for me to then continue.
This would save time during the probing as I can zip the tool close to my touchplate rather than crawling down to it.
Cheers,
Andrew
// AW Modified 2017 Toolchange macro M6
// Go to ToolChangePos exec.Callbutton(20521)
// Call Z-TP exec.Callbutton(20523)
// Call Z-Shim exec.Callbutton(21523)
// Call SafeZ exec.Callbutton(21552)
bool DelayStart = AS3.Getcheckboxstate(20302); // Delay end of macro to allow user to start spindle
String Z_Choice = "";
exec.AddStatusmessage("M6 AW Toolchange Script");
// Go to ToolChangePos
exec.AddStatusmessage("M6 Go to Tool Change Pos");
exec.Callbutton(20521);
while(exec.IsMoving()){}
// Tell user to Change Tool
MessageBox.Show (exec.mainform, "Change the Tool now", "Manual Tool Change", MessageBoxButtons.OK, MessageBoxIcon.Error);
// Ask which Z Operation to do
Z_Choice = exec.TextQuestion("Connect TouchProbe\n\nType 1 for Shim or \n Enter for TouchPlate");
// I'd like to be able to jog my machine while waiting for this input
if (Z_Choice == "1")
{
// Call Z-Shim
exec.AddStatusmessage("M6 Shim Zero");
exec.Callbutton(21523);
}
else
{
// Call Z-TP
exec.AddStatusmessage("M6 TP Zero");
exec.Callbutton(20523);
}
if (DelayStart)
{
MessageBox.Show (exec.mainform, "Tool Change has been paused." + "\n" + "Press OK when ready to continue.", "Tool Change Pause", MessageBoxButtons.OK, MessageBoxIcon.None);
}
// End Tool Change macro