Hello Guest it is July 19, 2019, 11:47:05 PM

Author Topic: Tool probe macro  (Read 5387 times)

0 Members and 1 Guest are viewing this topic.

Offline MarkC

*
  •  94 94
    • View Profile
Re: Tool probe macro
« Reply #10 on: December 17, 2009, 08:16:16 PM »
OK,
here is my finished script for tool length offset setting with a permantly installed probe:

If IsSuchSignal (22) Then
Code "G49"
Code "G0 G53 Z00." 'Home Z
code "G53 X0 Y3.125" 'Move into Probe Pos ***EDIT HERE***
DoOEMButton(179) ' machine coordinates
Tool_Number = GetDRO(24)
code "G91 g31 z-9. f20."
While (IsMoving())
  Sleep 30
Wend

code " g0 z.2"

code "G91 g31 z-9. f3."
While (IsMoving())
  Sleep 10
Wend

If Tool_Number = 0 Then 'Master tool Cal
z = GetOEMDRO(85) 'get Machine ZPos
Call SetOEMDRO(49,z) 'Set fixture offset
Else

Call SetDRO(24,0) 'Turn off the tool offset by loading tool #0
Height = GetDRO(2) 'Get the pos of the Z axis without the Tool comp on
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
End If

DoOEMButton(181) back to program coordinates
code "G0 G90 G53 Z0.0"
code "G43"
While (IsMoving())
  Sleep 10
Wend
End If

Mark
Mark