How to recover a CNC job after a power failure
Few things sink a hobby CNC session faster than a job stopping partway through. A flicker on the mains, a nudged USB cable, a controller reset — and a two-hour carve is frozen at line 4,000 of 12,000. The instinct is to write off the workpiece and start over. Often, you don't have to.
This is what run-from-line recovery is for: picking a job back up from where it stopped, instead of from the beginning. Here's how it works on a GRBL machine, and how to do it safely with Gantry.
Why a stopped job is recoverable at all
When a job halts, three things are usually still true:
- The workpiece hasn't moved. It's clamped where it was.
- You know the toolpath. The G-code file is unchanged — every line, every coordinate.
- Your work coordinate system can be restored. As long as you can get the machine back to the same work zero, the file's coordinates still mean the same physical positions.
The missing piece after a power loss is the machine's sense of where it is — GRBL forgets its position on reset and usually comes up in an Alarm state. Recovery is really two tasks: re-establish position, then re-enter the toolpath at the right line.
Step 1 — get the machine's position back
After a power interruption:
- Clear the alarm and home the machine if you have limit switches. Homing gives GRBL a known machine origin again, and because your work offset is defined relative to that, your work zero comes back with it.
- No limit switches? You'll need to restore work zero manually — return to your original X0/Y0 (a repeatable fixture or a dowel-pin/edge reference makes this reliable) and re-zero, and re-establish Z zero the same way you set it originally (touch-plate or paper).
Take your time here. Everything downstream depends on the machine agreeing with the file about where zero is.
Step 2 — find the line to resume from
Look at where the cut actually stopped and find the corresponding point in the file. A good mobile sender helps two ways:
- The 3D toolpath view shows how much of the path has completed, so you can see roughly where in the job you are.
- The sender tracks the current line number as it streams, so if the job stopped live you already know where it was.
Pick a line at a sensible point — ideally the start of a pass or a move, not the middle of a fast plunge.
Step 3 — resume safely (this is the part that matters)
You can't just teleport the spindle to the middle of the stock and resume feeding — that's how you snap a bit or gouge the work. Safe re-entry means approaching the resume point the way the machine would have arrived there:
- Retract Z to a safe height so nothing drags across the workpiece.
- Rapid to the X/Y of the resume line at that safe height.
- Lower to cutting depth at the resume point.
- Resume streaming from that line at feed rate.
In Gantry, this is built into the recovery flow: you enter the line to start from, and the app handles the safe re-entry — retract, position, ease back in — rather than dropping straight into the cut. Its pre-flight checks also flag moves that would go out of bounds or rapid into the stock before you press start, which is exactly the moment you most want a safety net.
Avoiding the scrap pile next time
Recovery is a great safety net, but a few habits make power blips a non-event:
- Use a repeatable work origin. A fixture, dowel pins, or a hard corner stop means you can always return to the same zero — the foundation of any recovery.
- Keep the controller link solid. A good sender will auto-reconnect if the link drops briefly; a solid USB cable or a stable Wi-Fi/Bluetooth connection prevents the drop in the first place.
- Keep the screen awake. A phone that sleeps mid-job can interrupt it — keep-awake (and a charging cable for long runs) avoids self-inflicted stops.
- Consider a small UPS on the controller and PC (if you use one) so a brief mains flicker never reaches the machine.
The takeaway
A stopped job feels like a disaster in the moment, but with a repeatable zero and run-from-line recovery it's usually a five-minute fix, not a ruined workpiece. Being able to do all of it standing right at the machine — restore zero, find the line, re-enter safely — is one of the best reasons to have a CNC controller in your pocket.
Gantry is free on Google Play, with run-from-line recovery, auto-reconnect, keep-awake and pre-flight checks built in — and a simulator so you can practise the recovery flow before you ever need it for real. For the basics of phone control, start with controlling a GRBL router from your phone.
Safety note: re-entering a partially-cut job puts the tool near the workpiece and clamps. Double-check your work zero, keep clear of the machine, and know where your emergency stop is before you resume.
Gantry is free on Google Play with a built-in simulator, so you can test every feature before you plug in.
Free on Google Play