Ger21, thanks for the suggestion.
I've looked at my macros and unless I'm missing something I can't figure out how the tool offset is getting turned off when tool 0 is selected manually and the Autozero button is used on it, here's the macros I'm using:
Auto Tool Zero Macro:
' Macro to set tool offset for currently selected tool
' Assumes tool has been touched down on reference height
' Note tool zero has no offset, used to set zero height.
' All offsets are thus calculated relative to length of tool zero.
Tool_Num = GetDRO (24)
GaugeBlockThick = GetOEMDRO(1002)
XDRO = 0
YDRO = 1
ZDRO = 2
While IsMoving ()
Wend
If Tool_Num <> 0 Then
Z_Offset = GetOEMDRO ( 49 )
Axis_Pos = GetOEMDRO(85)
Tool_Offset = Axis_Pos - Z_Offset - GaugeBlockThick
Call setOEMDRO(42, Tool_Offset)
Else
' G92.2 cancels any applied offset mode
Code "G92.2"
Call SetDRO(ZDRO, GaugeBlockThick)
End if
m6Start.m1s
'Macro for changing tools, this one runs first, M6End.m1s then runs after button tool change button push.
'
'User DRO range from OEM codes 1000 to 1245, grid precision uses 1100, change locs use 1200,1201,1202
'This macro moves the machine to the machine coordinate change location first in Z and then in X.
'Dim Msg1, Msg2
tool = GetSelectedTool()
'Msg1 = "Selected Tool = " & Str(tool)
'MsgBox Msg1
currenttool = GetCurrentTool()
'Msg2 = "Current Tool = " & Str(currenttool)
'MsgBox Msg2
If currenttool = tool Then Stop
xorig = GetToolChangeStart( 0 )
yorig = GetToolChangeStart( 1 )
zorig = GetToolChangeStart( 2 )
xchange = GetUserDRO(1200)
ychange = GetUserDRO(1201)
zchange = GetUserDRO(1202)
MoveYonToolChangeLed = 1104
Code "G00 G53 Z" & zchange
While IsMoving ()
Sleep(10)
Wend
' X move taken out for now
' Code "G00 G53 X" & xchange
' Y move
If GetOEMLED (MoveYonToolChangeLed) Then
Code "G00 G53 Y" & ychange
End If
While IsMoving ()
Sleep(10)
Wend
SetCurrentTool( tool )
m6End.m1s
'Macro for changing tools, this is second M6End.m1s one that runs after button tool change button push.
'
'User DRO range from OEM codes 1000 to 1245, grid precision uses 1100, change locs use 1200,1201,1202
'This macro moves the x and y of the table back to the original position.
xorig = GetToolChangeStart( 0 )
yorig = GetToolChangeStart( 1 )
zorig = GetToolChangeStart( 2 )
MoveYonToolChangeLed = 1104
' X move taken out for now
' Code "G00 X" & xorig
' Y move
If GetOEMLED (MoveYonToolChangeLed) Then
Code "G00 Y" & yorig
End If
While IsMoving ()
Sleep(10)
Wend