'tool = GetSelectedTool()
'SetCurrentTool( tool )
' OldTool = GetOEMDRO (1224)
' Speak ("Presss xxxxx" )
'Tool Change Macro For Manual tool change 09/14 CNC4XR7
OldTool = GetOEMDRO (1224) 'Tool In spindle DRO You must add this to your settings screen
'x = GetToolChangeStart( 0 ) ' Get x tool change start position
'y = GetToolChangeStart( 1 ) ' Get y tool change start position
'z = GetToolChangeStart( 2 ) ' Get z tool change start position
Code "G53 G0 X-175Y-200-50Z-15" ' Move z to tool change position in Machine cord.
While IsMoving ' wait for z to move
Wend
tool = GetSelectedTool() ' tool to be changed to
NewTool = tool
Call SetUserDRO (1224,NewTool)
SetCurrentTool( NewTool ) ' input new tool into tool in spindle dro
'Code "G43 H" & tool ' Call tool offsets for new tool
' Tell the user to load the requested tool
Speak("Please insertAA tool number " & " ( " & GetCurrentTool() & " ) " & " " & GetToolDesc(GetCurrentTool) & " ) click ok When Ready")
Code "M00"
' Verify Tool Change Complete message box
Dim Msg, Style, Title, Help, Ctxt, Response,MyString
Msg = "Luften takimı takiniz BB " & " ( " & GetCurrentTool() & " ) " & " " & GetToolDesc(GetCurrentTool)
'Msg = "Please Insert ToolCC Number " & " ( " & GetSelectedTool() & " ) " & " " & GetToolDesc(Tool) ' Define message
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons
Style = 0 + 48 + 0 ' Define buttons.
Title = "Takim degistirme talebi" ' Define title
Help = "DEMO.HLP" ' Define Help file
Ctxt = 1000 ' Define topic
'context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbOk Then ' User chose Ok
MyString = "Ok" ' Perform some action
End If
' Tell the user to load the requested tool
Speak("Atool number " & " ( " & GetCurrentTool() & " ) " & " ) Installed Returning to Tool Change Start position")
Code "M00"
'Show user the current tool description
Message "BTool # " & GetCurrentTool() & " : " & GetToolDesc(GetCurrentTool) & " Installed " & " Returning to Tool Change Start Position"
Code "G53 G0 X-100Y-100" 'Proble için x ve y konumuna git
Code "G53 Z-50 F500" 'Probe yaklasirken hizli git
Code "G31Z-55 F25" 'Probe cok yaklastik yavasca probe'u ara ! Sorun burada Z-55 makina koordinatı değil. Benim 0 ladığım noktadan -55 hesaplıyor
While IsMoving()
Wend
'Code "G4 P0.25" 'Buradaki P deðeri sýfýrlama iþlemi bittikten sonra Z ekseninin alt satýra yazacaðýmýz deðere kalkarak ne kadar süreyle beklemede kalacaðýdýr.
'Call SetDro (2, -55.00)
' Tell the user to Press cycle start
Speak("Takim degistirme tamamlandi")
Code "M00"
Speak("Devam etmek icin Cycle Start'a basiniz")
Code "M00"
End