Machsupport Forum
G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: MNskier on June 17, 2012, 09:21:33 PM
-
Hello All,
I'm retrofitting a Boxford Duet CNC lathe and I'm running into some challenges for how to set up the tool changer in Mach3 Turn.
I was hoping to use regular tool offsets but the tool changer for the Duet moves in the Y axis for the lathe, actual cutting of course still takes place in X-Z plane.
Is there a way to make Mach3 Turn display and record different Y-values for tool offsets or should I go about this with a Macro with info stored for each tool position?
I've added a link to a photo of the tool changer as well.
https://plus.google.com/u/0/photos/107441108435856955101/albums/5732712470253004977/5732712564851878018 (https://plus.google.com/u/0/photos/107441108435856955101/albums/5732712470253004977/5732712564851878018)
Any guidance is greatly appreciated!
Thank you, Nathan
-
Hi,
the link is not working.
use the Additional option to add a jpeg image and then we will be able to help you.
Graham
-
Here is a photo of the tool changer. It has 3 tool positions in front and 3 in the rear. Moving to each tool requires a linear vertical move that is not in the X-Z plane.
-
M6 Start Code Below
toolpos1 = GetOemdro(1001)
toolpos2 = GetOemdro(1002)
toolpos3 = GetOemdro(1003)
toolpos4 = GetOemdro(1004)
toolpos5 = GetOemdro(1005)
toolpos6 = GetOemdro(1006)
toolnew = GetSelectedTool()
toolold = GetOemdro(824)
If (toolnew = 0)Or(toolnew = 0 ) Then
MsgBox (" invalid tool number !!!")
message(" invalid tool number !!!")
Call Code("M30")
end
End If
If (toolnew = toolold) Then
message("tool in use!")
end
end If
If (toolnew < 1)Or(toolnew >6 ) Then
SetCurrentTool(toolold)
MsgBox (" invalid tool number !!!")
message(" invalid tool number !!!")
Call Code("M30")
end
End If
message(" toolchange running !!")
If (toolnew = 1)then
Call Code("G0 G53 X105 Y4.5"&(toolpos1))
While ismoving()
Sleep 100
Wend
End If
If (toolnew = 2)then
Call Code("G0 G53 X105 Y34.5"&(toolpos2))
While ismoving()
Sleep 100
Wend
End If
If (toolnew = 3)then
Call Code("G0 G53 X105 Y64.5"&(toolpos3))
While ismoving()
Sleep 100
Wend
End If
If (toolnew = 4)then
Call Code("G0 G53 X15 Y64.5"&(toolpos4))
While ismoving()
Sleep 100
Wend
End If
If (toolnew = 5)then
Call Code("G0 G53 X15 Y34.5"&(toolpos5))
While ismoving()
Sleep 100
Wend
End If
If (toolnew = 6)then
Call Code("G0 G53 X15 Y4.5"&(toolpos6))
While ismoving()
Sleep 100
Wend
End If
SetCurrentTool( toolnew )
message("toolchange finished !")
end
M6 End Code Below
REM The default script here moves the tool back to m6start if any movement has occurred during the tool change..
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
if(IsSafeZ() = 1) Then
SafeZ = GetSafeZ()
if SafeZ > z then StraightTraverse x, y,SafeZ, a, b, c
StraightFeed x, y, z , a, b, c
else
Code"G00 X" & x & "Y" & y
end if
Here's the code I modified to run a Boxford Duet....It requires homing switches and I added a homing button on the lathe screenset for the Y axis.
It's an old topic but the code will no doubt help someone who google's for a Boxford Duet toolchange macro as it hurt my head a little fudging bit's of code from all over to get this working.
-
M6 Start Code Below
toolpos1 = GetOemdro(1001)
toolpos2 = GetOemdro(1002)
toolpos3 = GetOemdro(1003)
toolpos4 = GetOemdro(1004)
toolpos5 = GetOemdro(1005)
toolpos6 = GetOemdro(1006)
toolnew = GetSelectedTool()
toolold = GetOemdro(824)
If (toolnew = 0)Or(toolnew = 0 ) Then
MsgBox (" invalid tool number !!!")
message(" invalid tool number !!!")
Call Code("M30")
end
End If
If (toolnew = toolold) Then
message("tool in use!")
end
end If
If (toolnew < 1)Or(toolnew >6 ) Then
SetCurrentTool(toolold)
MsgBox (" invalid tool number !!!")
message(" invalid tool number !!!")
Call Code("M30")
end
End If
message(" toolchange running !!")
If (toolnew = 1)then
Call Code("G0 G53 X105 Y4.5"&(toolpos1))
While ismoving()
Sleep 100
Wend
End If
If (toolnew = 2)then
Call Code("G0 G53 X105 Y34.5"&(toolpos2))
While ismoving()
Sleep 100
Wend
End If
If (toolnew = 3)then
Call Code("G0 G53 X105 Y64.5"&(toolpos3))
While ismoving()
Sleep 100
Wend
End If
If (toolnew = 4)then
Call Code("G0 G53 X15 Y64.5"&(toolpos4))
While ismoving()
Sleep 100
Wend
End If
If (toolnew = 5)then
Call Code("G0 G53 X15 Y34.5"&(toolpos5))
While ismoving()
Sleep 100
Wend
End If
If (toolnew = 6)then
Call Code("G0 G53 X15 Y4.5"&(toolpos6))
While ismoving()
Sleep 100
Wend
End If
SetCurrentTool( toolnew )
message("toolchange finished !")
end
M6 End Code Below
REM The default script here moves the tool back to m6start if any movement has occurred during the tool change..
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
if(IsSafeZ() = 1) Then
SafeZ = GetSafeZ()
if SafeZ > z then StraightTraverse x, y,SafeZ, a, b, c
StraightFeed x, y, z , a, b, c
else
Code"G00 X" & x & "Y" & y
end if
Here's the code I modified to run a Boxford Duet....It requires homing switches and I added a homing button on the lathe screenset for the Y axis.
It's an old topic but the code will no doubt help someone who google's for a Boxford Duet toolchange macro as it hurt my head a little fudging bit's of code from all over to get this working.
Hi Kipper, I've just bought a Duet (collecting this weekend) but have very limited experience with Mach3 yet. Are you still around on the forum? I hope so. Will return once I've had a good look round the Duet.