// this macro releases tool from spindle if(AS3.GetLED(50) == true || AS3.GetLED(51) == true) // Spindle is still active, so we need to stop here... { MessageBox.Show("The Spindle is still active"); exec.Stop(); return; } exec.Clroutpin(5,8); // Deactivate resistor exec.Wait(1000); // Wait one 1000msec AS3.Setfield(0,230); // set b axis dro to zero AS3.Validatefield(230); exec.Code("G01 F100 B-3 M07"); // rotate b axis negative XX turns exec.Setoutpin(5,7); // lower drawbar slide exec.Wait(1000); // Wait one 1000msec exec.Code("G00 B-100"); // rotate b axis negative XX turns while(exec.IsMoving()){} // End macro