CNC Error Code Quick Reference
Common G-code, M-code, and alarm errors with solutions
About CNC Error Codes
CNC error codes vary by controller manufacturer (Fanuc, Siemens, Haas, Mazak, etc.), but many errors follow similar patterns. This guide covers the most common errors across all platforms.
⚠️ Safety First:
- Always press Emergency Stop if unsure
- Consult machine manual for controller-specific error codes
- Contact manufacturer support for persistent issues
Error Troubleshooting Flowchart
Is it a G-code/M-code error?
YES →
Check program syntax
NO →
Check hardware/system
Program Fixes:
- ✓ Review G-code line
- ✓ Check tool offsets
- ✓ Verify work coordinates
- ✓ Re-upload program
Hardware Checks:
- ✓ Check limit switches
- ✓ Verify servo/spindle
- ✓ Inspect sensors
- ✓ Reset machine
Error Resolved?
📞 Contact Support
Provide: Error code, machine model, what you were doing
Pro Tip:
Take a photo of the error screen and note what you did before the error. This helps troubleshooting significantly.
G-Code Programming Errors
Feed Rate Not Set
G01 linear interpolation requires feed rate (F) command.
Solution:
❌ G01 X10.0 Y20.0 (missing F)
✓ G01 X10.0 Y20.0 F500
Arc Specification Error
Circular interpolation requires radius (R) or center (I, J, K).
Solution:
Option 1: G02 X20.0 Y10.0 R15.0 F300
Option 2: G02 X20.0 Y10.0 I10.0 J0 F300
Tool Radius Compensation Error
Cutter comp activated/cancelled incorrectly or offset not set.
Common Causes:
- • Tool offset D value not defined in offset table
- • G41/G42 called without movement (requires G01/G02/G03)
- • G40 (cancel) not called before tool change
Tool Length Offset Not Set
H offset value missing or zero in tool offset table.
Fix:
- Go to Offset screen → Geometry
- Enter tool length in H column (e.g., H01 = 150.523)
- Re-run program: G43 H01 Z50.0
M-Code Function Errors
Spindle Start Error
Spindle won't start or alarms immediately.
Troubleshooting Steps:
- Check if spindle speed (S) is programmed: M03 S1200
- Verify spindle RPM within machine limits (e.g., S50-S6000)
- Check spindle override is not at 0%
- Inspect spindle thermal relay/overload (may need reset)
- Verify VFD (Variable Frequency Drive) has no faults
Tool Change Failure
ATC (Automatic Tool Changer) error or timeout.
Common Causes & Fixes:
| Tool not found | Check tool number exists in magazine (T01-T24 typical) |
| Arm stuck | Clean/lubricate ATC arm, check air pressure (6-8 bar) |
| Tool won't release | Check draw bar pressure, clean spindle taper |
| Timeout error | Increase M06 timeout parameter (default 5-10 sec) |
Coolant Control Error
Coolant won't turn on/off or low flow alarm.
Quick Checks:
- ✓ Coolant tank level sufficient (above minimum mark)
- ✓ Coolant pump running (listen for motor noise)
- ✓ Coolant lines not kinked or clogged
- ✓ Nozzles aimed correctly and not blocked
- ✓ Flow switch functioning (if equipped)
Common Alarm Conditions
| Alarm Type | Typical Code | Cause | Solution |
|---|---|---|---|
| Servo Overload | 400-499 | Excessive load on axis motor | Check for crashes, reduce feed rate, inspect ball screw |
| Overtravel (Soft Limit) | 500-509 | Axis exceeded software limit | Jog back within limits, check work offset (G54-G59) |
| Overtravel (Hard Limit) | 510-519 | Hit physical limit switch | Override + jog back, re-home machine, check program |
| Emergency Stop | 000-099 | E-stop button pressed or safety circuit open | Release E-stop, check all guards closed, reset alarm |
| Servo Not Ready | 200-299 | Servo amp fault or disconnected | Check servo amp LED, verify encoder cable, power cycle |
| Low Battery | 900-910 | Encoder backup battery <3.0V | Replace battery soon (CNC will lose position if powered off) |
| Parameter Write Protected | 070-079 | Trying to edit locked parameter | Enable parameter write (key switch or setting), edit, re-lock |
General Troubleshooting Workflow
Read the Alarm Message
Write down exact error number and text. Press ALARM or DIAG button to view details.
Check Controller Manual
Look up error code in Maintenance/Alarm section. Most manuals have full alarm list with descriptions.
Clear Alarm (if safe)
Press RESET or ALARM CLEAR. Some alarms auto-clear when condition is fixed, others require manual reset.
Test in Single Block
If program error, run in Single Block mode (one line at a time) to identify problem line.
Document & Prevent
Log error in maintenance records. Identify root cause and implement preventive measure.
Manufacturer-Specific Alarm References
Fanuc Controls:
- • 0i-F Series: Alarm codes 000-999, servo 400s, spindle 300s
- • Operator's Manual B-64484EN has complete list
Siemens (Sinumerik):
- • 840D: Alarms 1-99999, NCK alarms 10000+
- • Diagnostics Manual lists all codes by category
Haas Machines:
- • Alarm codes 100-999, servo 2xx, spindle 3xx
- • Online alarm lookup: haascnc.com/service
Mazak (Mazatrol):
- • Matrix controls: Alarm No. 1-9999
- • SmoothX: Enhanced diagnostic screens
When to Call for Service
Contact qualified service technician immediately if you experience:
- • Repeated alarms that won't clear
- • Smoke, burning smell, or unusual loud noises
- • Servo/spindle motor overheating (>80°C)
- • Loss of positional accuracy (>0.05mm deviation)
- • Hydraulic/pneumatic system failures
- • Any crash or collision event
Safety first: Do not attempt repairs beyond your skill level. Improper troubleshooting can cause injury or further damage.
Related Resources
Reduce downtime with preventive maintenance: