Pausing A CNC Machining Operation With Mach3


Gcode step and coordinates marked

Mach3, which I use to run my CNC router, is a great program.  Even better now that I’ve figured out how to pause a program and come back to it later.  This came in especially handy when making a model based on a topo map of Ross Island off of Antartica (post on this soon).  It was almost 200,000 lines of Gcode, so I had to pause and come back a couple of times.  Here’s how I did it:

Prepare to Shutdown

  1. Press the spacebar to pause your machining.  Preferably in an area where you’re not cutting anything at the moment.  Do not jog anything
  2. Record your X, Y, and Z coordinates as well as the Gcode line that you’re currently on
  3. Shut down Mach3, go away, and do whatever you have to do

Restore Your Machining Operation

  1. Load your g-code again
  2. Hit “reset” then enter the X, Y, and Z coordinates from “prepare” step 2.  Left mouse click on each axis then just enter the numbers.  If you don’t jog anything, this should be the position you’re currently in
  3. Enter the line number that you need to start running from the previous step 2 and hit enter
  4. Click on “Set next line”
  5. Click on “Run from here”
  6. Hit the start button on Mach3 and let your code run.  Repeat as necessary.
Mach3 CNC machining cycle pause

Buttons used on Mach3 to restore your machining cycle

There may be a better way to do this (let me know in the comments!), but this is what I did.  You can, of course, just hit the spacebar and walk away, but that makes me nervous if you have to leave with Mach3 running.  The computer won’t go into sleep mode in this case.

When you are starting your cycle again, if you do somehow get your coordinates off before you can correlate the new axes, try to find a known point and program in the coordinates from there.  An edge can work by bumping the cutter against it then programming the coordinates based on adding or subtracting half the tool diameter.  Not as good as putting in the recorded values, but it may be acceptable depending on the situation.

Some of this information I found on the Mach forum here.  As for some explanation on the hot foam cutter that I marked the coordinates and Gcode step on, check out these posts.


  1. A CNC-Made 3D Topo Map | JCOPRO.NET - pingback on May 13, 2012 at 6:39 pm
  2. Thank your for sharing this one, I have a hard time to find this information. It’s my first time to use this tool.

  3. I can’t write number with point exemple : x= 12.555
    Please can you help me

  4. It works, but you will lose your precise position at power off the drivers! Because there is half-movement, 1/4 movement of the micro-pass of the stepmotor. (motor is 200 pulses every revolution and the driver broke it into more steps).

    If you can install a HOME Switches at the X, Y and Z axis you can use: “REF ALL HOME” to calibrate every axis.

    • Yes, I suppose you are correct. That being said, how precise are home switches generally? I’d have to guess that the microswitches generally used can vary by at least a few thousandths.

      • yeap… i use home switchs at mine… if power off or the energy goes down, you can REF ALL HOME and continue your job.

Trackbacks and Pingbacks: