code "G49" code "G0 G53 Z00." code "G53 X1.1014 Y4.825" DoOEMButton(179) Tool_Number = GetDRO(24) code "G31 z-6 f20." While (IsMoving()) Sleep 30 Wend PRP= (GetVar(2002)+.2) code "G0 z" & PRP code "G31 z-6. f3." While (IsMoving()) Sleep 10 Wend If Tool_Number =0 Then z= GetOEMDRO(85) Call SetOEMDRO(49,z) Else code "G49" Height = GetDRO(2) Call SetDRO(24,Tool_Number) 'Turn the tool Back on so the offset will go to the Call SetoemDRO(42,Height) 'Set the Tool Height offset code "G43H" & Tool_Number code "G10L1P" & Tool_Number & "Z" & ToolLength End If DoOEMButton(181) Code "G0 G90 G53 Z0.0" Code "G43" While (IsMoving()) Sleep 10 Wend