1
General Mach Discussion / Re: Feed rate after tool change problem
« on: September 24, 2008, 04:56:57 PM »
This modification to the M6 End macro seems to work fine for me. If no moves were made during the tool change stop, the macro does nothing. If a move WAS made, the macro runs as originally intended.
REM The default script here moves the tool back To m6start If Any movement has occured during the tool change..
REM Changes made by Ted G. to stop this from running if no moves were made by user during tool change stop..
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
CurX = GetDro(0)
CurY = GetDro(1)
CurZ = GetDro(2)
CurA = GetDro(3)
CurB = GetDro(4)
CurC = GetDro(5)
Moved = 0
if CurX <> x then Moved = 1
if CurY <> y then Moved = 1
if CurZ <> z then Moved = 1
if CurA <> a then Moved = 1
if CurB <> b then Moved = 1
if CurC <> c then Moved = 1
if Moved = 1 then
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
end if
REM The default script here moves the tool back To m6start If Any movement has occured during the tool change..
REM Changes made by Ted G. to stop this from running if no moves were made by user during tool change stop..
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
CurX = GetDro(0)
CurY = GetDro(1)
CurZ = GetDro(2)
CurA = GetDro(3)
CurB = GetDro(4)
CurC = GetDro(5)
Moved = 0
if CurX <> x then Moved = 1
if CurY <> y then Moved = 1
if CurZ <> z then Moved = 1
if CurA <> a then Moved = 1
if CurB <> b then Moved = 1
if CurC <> c then Moved = 1
if Moved = 1 then
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
end if