Hello Guest it is March 28, 2024, 02:27:02 PM

Author Topic: Old Stuff: Mach 3 Tool Number DRO  (Read 1899 times)

0 Members and 1 Guest are viewing this topic.

Old Stuff: Mach 3 Tool Number DRO
« on: November 22, 2019, 07:14:55 PM »
I recently set up one of my machines tool tables with tool lengths. 

When I execute a tool change it updates the tool length offset and Z DRO, but the tool number DRO still reads zero. 

My typical tool change command is T(x) M6 G43 H(x) where (x) is the tool number.

I can manually enter a tool number into the DRO and it applies the tool offset from the tool table if it is not already applied from a command like the one above.   

I run into this same issue on both the machine where I have implemented the tool table, and on the test installation on my design computer.  I spent over an hour looking for a solution by searching the forum, but was unable to find anything. 

Is there some setting in Mach configuration I am missing or do I need to add something to my tool change macros or both? 


Re: Old Stuff: Mach 3 Tool Number DRO
« Reply #1 on: November 22, 2019, 07:41:20 PM »
I found somebody's tool change macro that has what I need in it. 

Quote
'Tool Change Macro For Manual tool change 09/14 CNC4XR7
'###############################################################
DoSpinStop()                     ' Make sure the spindle is OFF
Code"M09"                        ' Make sure the coolant is OFF
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
tool = GetSelectedTool() ' tool to be changed to
NewTool = tool
If NewTool = OldTool Then 
        Exit Sub   
End If
Code "G53 G0 Z-1.0" ' Move z to tool change position in Machine cord.
While IsMoving ' wait for z to move
Wend
Call SetUserDRO (1224,NewTool)
SetCurrentTool( NewTool )  ' input new tool into tool in spindle dro
Code "G43 H" & tool        ' Call tool offsets for new tool
' Verify Tool Change Complete message box
Dim Msg, Style, Title, Help, Ctxt, Response,MyString
Msg = "Please Insert Tool  : " & "   (   "  & GetSelectedTool( ) & "   )   " & " " &  GetToolDesc(NewTool)
'Msg = "Please Insert Tool  Number " & " ( "  & GetSelectedTool() & " ) " & "    " & GetToolDesc(Tool) ' Define message
Style = vbYesNo + vbCritical + vbDefaultButton2   ' Define buttons
Style = 0 + 48 + 0   ' Define buttons.
Title = "Tool Change Requested"   ' 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
'Show user the current tool description
Message "Tool  #   " & GetCurrentTool() & " :  " & GetToolDesc(GetCurrentTool) & "  Installed  " & "   Returning to Tool Change Start Position"
Code "G00 Z.25"
'Code "G00 X" & x  & "Y" & y & "Z" & z 'Move back to where the tool change was prompted
While IsMoving
Wend
End                         

His video is here: 
https://www.youtube.com/watch?v=26_N4uwRWmQ

He has a link in the description to a drop box with a screen set and the macro at dropbox.  I edited the my screenset instead.