// Go to XY Zero 



if(!exec.GetLED(56)||!exec.GetLED(57)||!exec.GetLED(58)) // If machine was not homed then it is unsafe to move in machine coordinates, stop here...
{
  MessageBox.Show("The machine was not yet homed, home the machine before run to parking position!");
  exec.Stop();
  return;
}

int originalmodalmode = exec.actualmodal; // remember the modal mode

while(exec.IsMoving()){}

exec.Code("G00 G53 Z-100"); // Move Z up first to 
while(exec.IsMoving()){}

exec.Code("G00 G90 X0" + " Y0"); // Move to XY  
while(exec.IsMoving()){}

exec.Code("G" + originalmodalmode); // Set system back to the original distance mode





