Hello Guest it is December 14, 2019, 01:30:04 PM

Author Topic: Z moves up down up after tool change?  (Read 623 times)

0 Members and 1 Guest are viewing this topic.

Z moves up down up after tool change?
« on: April 10, 2018, 01:56:23 PM »
After I do a Txx M6 tool change (manual)  on my router, the Z axis moves up down and up before continuing with the code. The up down up moves are not in the G code program. This has not been a problem, just a curious move, until....
Now I am cutting a tall part, so that the top of the work is close to the upper Z limit. Top of work is Z0, Z limit (E stop) is .3" above the work, ie: Z.300,  I edited the code so there is no Z move higher than Z.200, and all cutting is done Z-*********.
After a tool change the Z goes up and triggers the E stop. I assume there is a code or macro in the background that causes Mach to do this, but I can't find it. Does anyone know how I can disable these moves?

Offline ger21

*
  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: Z moves up down up after tool change?
« Reply #1 on: April 10, 2018, 02:09:13 PM »
Check the M6Start and M6End macros.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Z moves up down up after tool change?
« Reply #2 on: April 10, 2018, 03:47:09 PM »
Gerry, thank you, I looked at the M6.m1s below,

REM The default script here moves the tool back to m6start if any movement has occured during the tool change..

x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
SafeZ = GetSafeZ()

if  SafeZ  > z then StraightTraverse x, y,SafeZ, a, b, c
 StraightFeed  x, y,  z  , a, b, c

Not being familiar with the macro language (G code I know well ) I just erased it all, leaving the file there just blank, thinking it looked like it was for automatic tool changers, and if it didn't work I could put it back. Being a blank macro now, I didn't expect it to work, but it looks like it did. It seems to have solved my problem. I always edit my G codes and verify Z height move immediately after a tool change, other than that concern, did I do something stupid that will cause problems later?

Offline TPS

*
  •  1,411 1,411
    • View Profile
Re: Z moves up down up after tool change?
« Reply #3 on: April 11, 2018, 01:41:08 AM »
it depends on what you have selected in Config -> General Config -> Tool Change

if you have selected: Stop Spindle Wait for Cycle Start , what would be the right choice for Manual tool Change,

Mach will run the M6Start macro first, and after you have pressed Cycle Start the M6End macro.

So the code of both macros is important for a tool Change.
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Z moves up down up after tool change?
« Reply #4 on: April 12, 2018, 06:36:38 PM »
"it depends on what you have selected in Config -> General Config -> Tool Change

if you have selected: Stop Spindle Wait for Cycle Start , what would be the right choice for Manual tool Change,"

Yes, that is what it is set to, Thanks for the advice. It's working good now.