Tool Change Produces Random movement once program is resumed

I’ve got an odd one that I can’t sort out. I’m having trouble resuming my program after a tool change.

I am using Fusion 360 to generate g-code. Here is a reference of what Fusion kicks out for a tool change:

(BORE1 4)
T2 M6
S18000 M3
G0 X6.0585 Y2.8643
G43 Z0.6 H2

I used the Tool Change tab to change the current tool number, then I use the Auto Z Height to measure the tool length, then I use the “Resume G-Code” button in the tool change tab to resume the program…

About 1 out of 10 tool changes results in the machine moving way right on the x axis or moving a large distance in the Y+ direction before resuming the program. This usually results in the soft limits or hard limits being tripped and the program comes to a stop. The odd thing is that the machine coordinates read out correctly. It’s not losing its work offsets.

I’m trying to sort out if this is an avid issues (screen set) or if this is a mach 4 issue. I’ve ruined a number of pieces lately because I have a lot of tool changes.

I upgraded to the newest version of Mach4 with no improvement… In fact, it actually caused the spindle to not restart after a good tool change! I need to sort that out too, but I’ll cover that ground later.

Any help would be much appreciated!


Hi Greg, welcome to the forum.

You can use the Cycle Start G-code button instead. The “Resume G-Code” button has some extra options and will execute “safe” moves if selected. No idea if this is causing your problem, but if my spindle is already in a safe position, I don’t use the “Resume G-Code” button.

The only other thing I can think of right now is if you’re accidentally switching work offsets.

Because a lot of G-code commands are modal, it might help us if you post more of your program. Maybe a whole program with most of the cut commands snipped out.

I second what @Stephen said. For the spindle not starting, it is probably one of the macros. From my notes:

  • IMPORTANT: Delete all the corresponding *.mcc files in your Macros folder. These are the compiled files. Deleting them will force Mach 4 to recompile them from the *.mcs files. You must do this to get Mach to use the new macros. You only have to delete the .mcc files for the corresponding .mcs files listed above.

If you still have issues, examine the m3 macro.

Stephen and Corbin -

THANK YOU for taking the time to respond. I will give both items a try and post the results in case someone else encounters the same issue.



I see an m30 macro, but not an m3… I may be missing something. I’ll take a peek at the Avid installer again and see if something was accidentally erased.


I got the issue sorted… I updated the software, cleared out macros, etc and was still having this issue. I figured it was either the “Auto-Z” operation or something in the tool change. I noticed the soft limits were turned off every time it “crashed”. I also noticed the soft limits get turned off when the Auto-Z routine starts, then the soft limits get turned back on when the routine finishes… I was unknowingly closing the Auto-Z window before the routine completed all the functions and that was causing the machine to have the issue.

Man, it feels good to have this in the rear view. Now I want to sort out how I can edit some of the buttons to include multiple commands… For example, I’d like to have the Auto-Z function open after the “Move to MTC Location” button is hit. There are a few little things like this that would save a little time during every tool change. Is this something I need to do in LUA or is it something you can edit in the Screen Editor? Hopefully I just need a small push in the right direction.

Thanks again for the help and suggestions.


1 Like