G80 cancels any active canned cycle on your CNC machine. Think of it as the off switch for drilling, tapping, and boring cycles.
Once a canned cycle is active, the machine will repeat that operation at every new position you program. G80 tells the controller to stop.
Key Takeaways
- G80 cancels all active canned cycles
- Without G80, the machine will keep drilling (or tapping) at every new move
- G80 is commonly included in safety lines at the start of a program
- G00, G01, G02, and G03 also cancel canned cycles — but relying on them for that is bad practice
- Always cancel your canned cycle explicitly with G80 when you’re done
| G80 – At A Glance | |
|---|---|
| Function | Canned Cycle Cancel |
| Type | Modal (Group 9) |
| Cancels | G73, G74, G76, G81, G82, G83, G84, G85, G86, G89 |
What are canned cycles?
Canned cycles — also called fixed cycles — are G-codes that automate common hole-making operations. Instead of programming every move individually, a single line of code handles the whole sequence.
Tasks like drilling, peck drilling, tapping, and boring all have their own canned cycle codes. A good example is peck drilling with G83.

Without a canned cycle, you’d need dozens of lines to move the drill up and down through a deep hole. With G83, one line handles it all.
Here’s the complete list of canned cycles G80 can cancel:
When to use G80
Use G80 any time you’re done running a canned cycle and need to move the machine without triggering another operation.
The most common situation: you’ve drilled a pattern of holes and now need to move on — to a tool change, a facing pass, or a repositioning move. Without G80, the machine will try to execute the active cycle at whatever coordinates you move to next.
G80 is also standard in program safety lines. Many shops include it at the top of every program alongside G40 and G49. This ensures no canned cycle was accidentally left active from a previous run.
Here’s what a typical safety line block looks like:
G40 G49 G80 (Cancel cutter comp, tool length comp, canned cycles)
If you ever restart a program mid-cycle — to re-run a section, for example — G80 in the safety lines guarantees the machine starts clean.
G80 Code Example
Here’s a practical example showing G80 used correctly after a drilling cycle:
T01 M06 (Tool change — drill)
G90 G54 G00 X1.0 Y1.0 (Rapid to first hole)
G43 H01 Z1.0 M03 S1200 (Tool length comp, spindle on)
G99 G81 Z-0.75 R0.1 F8.0 (Drill first hole, return to R-plane)
X2.0 (Drill second hole)
X3.0 (Drill third hole)
G80 (Cancel canned cycle)
G00 Z5.0 M05 (Retract, spindle off)
After the last hole at X3.0, G80 cancels the cycle. The G00 Z5.0 that follows is a safe retract — not another drilling operation.
COMMON MISTAKE – Skipping G80 After A Canned Cycle
If you forget it and then program a rapid move to a tool change position, the machine may try to drill there. On a Fanuc control you’ll usually get an alarm. On older machines, it could cause a crash.
Always close out canned cycles explicitly with G80.
What other codes cancel canned cycles?
G00, G01, G02, and G03 will also cancel an active canned cycle — but you should never rely on this.
Using a motion code to cancel a canned cycle is implicit. Someone reading your program later won’t necessarily realize the cycle is being cancelled there. It makes programs harder to follow and harder to debug.
Use G80. It’s one extra line, it’s explicit, and it can prevent a serious mistake.
FAQS
Does G80 turn off the spindle?
No. G80 only cancels the active canned cycle. The spindle stays on. You need M05 to stop the spindle separately.
Do I need G80 before a tool change?
Yes — it’s good practice. A T__ M06 command will cancel the canned cycle on most Fanuc controls, but don’t rely on that side effect. Call G80 explicitly before any major program transition.
What happens if I program G80 with no canned cycle active?
Nothing harmful. The controller ignores it. That’s exactly why it’s safe to include in your safety lines at the top of every program — it won’t cause problems whether or not a cycle is active.
Does G80 work the same on all CNC controls?
On virtually all Fanuc-compatible controls and most common systems (Haas, Siemens, Mitsubishi), G80 means canned cycle cancel. It’s one of the most consistent G-codes across different controllers.