Mach3 PDB Manual Tool Change simplified!

Описание к видео Mach3 PDB Manual Tool Change simplified!

The PDB is complete along with a Tool Change macro for Mach3 That prompts me to change the tool and gives a tool description.
The dialog box allows me plenty of time to change the tool.
The program is paused until the user selects " OK".
Cycle start restarts the program back at the original location and offsets the new tool. This is the best way I could come up with to manually change the tool using a PDB without being Automatic. Please Note Mach3 Always defaults to tool 0 at start up there is no tool 0 in the tool table offsets. Make sure you Zero Z to the tool you currently have in the spindle to avoid crashes. another choice is to have tool 1 as a index tool that all tools are set from ( this should be longer than your longest tool.)
You Need to add a "Tool in Spindle" DRO to the settings tab I used oem # 1224
I have put a semicolon ' in front of the lines I do not use like the X Y Z start position.
It seems to work great. If anyone's interested in the M6 Macro Copy and Paste the one below and leave a comment. Thanks For watching, Please Subscribe!

M6Macro

'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 Z-2.0" ' 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
' Verify Tool Change Complete
Dim Msg, Style, Title, Help, Ctxt, Response,MyString
Msg = "Please Insert Tool Number " & " ( " & GetSelectedTool() & " ) " & " " & GetToolDesc(NewTool) ' 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
Message "Tool # " & GetCurrentTool() & " : " & GetToolDesc(GetCurrentTool()) & " Installed " & " Returning to Tool Change Start Position"
'Code "G00 X" & x & "Y" & y & "Z" & z 'Move back to where the tool change was prompted
Code "G00 Z .25" 'Move Z back to .25" above zero in work cord.
While IsMoving
Wend
End Visit the website at www.cnc4xr7.com

Комментарии

Информация по комментариям в разработке