If you run CNC machines long enough, you will eventually see every kind of error: overtravel alarms, servo faults, tool-length crashes, weird macro bugs, and programs that run perfectly in simulation but fail immediately on the real machine. This guide collects the most common CNC alarm situations and programming mistakes that real shops face every day, with practical solutions and prevention strategies. It focuses mainly on Fanuc-style controls and Haas mills/lathes, but the logic applies to almost any modern CNC.
1. Overtravel and Soft Limit Alarms (Machine Tries to Go Too Far)
SYMPTOMS
- Alarm messages mentioning “OVERTRAVEL”, “SOFT LIMIT”, “+X”, “-Z”, “STROKE LIMIT”, or “TRAVEL EXCEEDED”.
- Machine stops as soon as you press cycle start or when a rapid move executes.
- Often occurs right after tool changes, G28/G53 moves, fixture changes, or wrong work offset use.
ROOT CAUSES
- Wrong work offset (G54–G59, G54.1, etc.).
- Programming in the wrong units (inch vs mm).
- Using G90 absolute when code was intended for G91 incremental.
- Unsafe G28 moves written incorrectly (e.g.
G28 Z0.in absolute mode in a dangerous position). - Incorrect Z-safe height for long tools or tall fixtures.
FIX
- Check which work offset is active (e.g. G54 vs G55).
- Verify machine coordinates (G53 display) and compare with part setup.
- Use the safe G28 pattern:
G91 G28 Z0.followed byG90. - Raise the R-plane or clearance planes in drilling cycles.
- Reduce rapid moves to feed (single block + rapid override) when testing.
PREVENTION
- Always retract Z to a safe height before X/Y rapid moves.
- Standardize a “safe retract macro” at the top of every post-processor.
- Never trust CAM blindly; simulate + dry-run above the part.
2. G43 / Tool Length Compensation Errors (Z Crashes)
SYMPTOMS
- Tool dives into the part or into the table immediately after feed move.
- Z depth is wrong by the exact amount of tool length.
- Alarms mentioning “Tool length comp not set”, “H code missing”, or Z-limit overtravel.
ROOT CAUSES
- G43 used with the wrong H value (wrong tool length offset).
- G43 forgotten entirely (no length compensation applied).
- Old H value from previous tool accidentally reused.
- Tool measured but stored in wrong offset slot.
- G49 (cancel tool length) used at the wrong time.
FIX
- Verify that tool number, length offset number (H), and T-call are consistent (e.g. T12 uses H12).
- Check actual length data in the tool offset page.
- Re-probe or re-measure the suspect tool.
- Check if your post is always outputting
G43 H#right after tool change.
PREVENTION
- Enforce “T = H” policy in the shop (Tool 7 always uses H7).
- Add a standard safe line in every toolchange block:
G43 H# Z[safe]. - For 5-axis machines, combine G43.4/G234 with correct H usage.
3. G90 vs G91 Confusion (Absolute vs Incremental Nightmares)
SYMPTOMS
- Machine suddenly rapids in a crazy direction.
- Repeated cycle calls drift further away each repetition.
- Peck drills or roughing macros produce incorrect geometry.
ROOT CAUSES
- Using incremental (G91) inside code but forgetting to return to G90.
- CAM posts internal subroutines using G91, programmer assumes G90.
- Manual edits that mix both modes in the same block.
FIX
- Search the program for G90 and G91 and check mode changes.
- Put comments or clear sections around any deliberate G91 usage.
- Test suspect sections in single-block with feed override.
PREVENTION
- Use G91 only in very controlled blocks (like safe G28 retracts).
- Immediately follow any G91 block with a
G90reset line. - Never mix G91 and complex canned cycles unless you really understand the sequence.
4. G20 / G21 Unit Mismatch (Inch vs Millimeter Disasters)
SYMPTOMS
- Tool moves 25× too far (inch program run in mm, or opposite).
- Holes drilled way too deep or shallow.
- Overtravel as soon as program starts.
ROOT CAUSES
- Running an inch program (G20) on a mill set up for metric tooling.
- CAM post outputting G21 but machine default is inch.
- Operator loading the wrong version of the program.
FIX
- Confirm which unit mode your program uses (G20 or G21 at the top).
- Standardize units in your shop (ideally all-mm internally).
- Put a big, obvious comment in the program header about units.
PREVENTION
- Enforce “always output G20 or G21 on line 1” rule.
- Color-code inch vs metric setups in documentation.
- Never allow “silent” unit mode; make it explicit in all posts.
5. Cutter Compensation Problems (G41/G42 Entry/Exit Mistakes)
SYMPTOMS
- Profile dimension off by full tool radius.
- Alarm when trying to turn compensation on or off.
- Tool suddenly takes a strange path on lead-in or lead-out.
ROOT CAUSES
- Lead-in move too short for G41/G42 to engage.
- Wrong D-offset value (tool radius wrong or zero).
- Turning comp on/off in the middle of sharp geometry.
- Using compensation with 3D or high-speed CAM-generated paths.
FIX
- Make sure lead-in length is at least 1× tool radius (prefer 1.5–2×).
- Check D offset table for correct radius or wear value.
- Use simple, straight lead-in and lead-out moves.
- Avoid G41/G42 on complex 3D surfaces; apply comp inside CAM instead.
PREVENTION
- Build standard contour templates with safe entry/exit moves.
- Train programmers to think in “part geometry vs tool centerline” terms.
- Use separate finishing operations with cutter comp—never mix roughing + comp.
6. Common Canned Cycle Mistakes (G81–G89 Family)
SYMPTOMS
- Drills stop above the part or crash into the table.
- Peck depth wrong, program drills through fixtures.
- Machine returns to the wrong Z plane.
ROOT CAUSES
- Misused R-plane (too low or too high).
- Mixing G98 and G99 without understanding the difference.
- Wrong Z depth sign (positive vs negative).
- Canned cycle not cancelled with G80.
FIX
- Verify R-plane is above the part surface.
- Remember: G98 returns to initial Z; G99 returns to R-plane.
- Check if your machine uses work offset plus tool length consistently for Z logic.
- Always add
G80after the last hole in a group.
PREVENTION
- Use templates for drilling cycles and only edit coordinates.
- Simulate canned cycles visually in CAM or in a backplotter.
- For dangerous setups, test with an air cut 50–100 mm above the part.
7. Spindle and Servo Alarms (Drive, Overload, Following)
SYMPTOMS
- Messages including “SERVO ALARM”, “SPINDLE ALARM”, “FOLLOWING ERROR”, “OVERLOAD”.
- Strong vibration or strange noise before alarm.
- Axis fails to home or move smoothly.
ROOT CAUSES
- Mechanical binding (chips packed in way covers, crashed axis, bent ballscrew).
- Over-aggressive G00 or feed rates with heavy tables.
- Incorrect servo parameters after a service visit.
- Damaged encoders or feedback cables.
FIX
- Jog axis slowly and feel for rough or tight spots.
- Reduce rapid rate override to 25% and test again.
- Inspect for physical damage on couplings, ballscrews, and way covers.
- Involve maintenance or OEM service for repeated servo errors.
PREVENTION
- Keep way covers clean, especially on Z and Y axes.
- Avoid slamming large tables at full rapid into stroke limits.
- Enable stroke limits (G22 or parameter-based soft limits) to protect travel.
8. Memory / Buffer / Program Load Problems
SYMPTOMS
- Alarms about “MEMORY FULL”, “BUFFER OVERFLOW”, or “TOO MANY NESTED SUBPROGRAMS”.
- Program stops at the same line every time.
- DNC drip-feeding drops connection mid-cut.
ROOT CAUSES
- Program too large for internal memory.
- Excessive subprogram nesting depth.
- Corrupted or partial file transfer.
- Baud rate / handshake mismatch in serial link or network.
FIX
- Split large programs into subprograms or sections.
- Use DNC/drip-feed with proper settings and tested cable length.
- Remove unnecessary comments and unused toolpaths.
- Check file size limits for your specific control model.
PREVENTION
- Post “clean” code without excessive comments or redundant moves.
- Archive old programs regularly and free up machine memory.
- Use networked storage and proven DNC solutions for very large 3D jobs.
9. Hidden Macro Bugs (Unexpected Jumps, Wrong Offsets, Crashes)
SYMPTOMS
- Machine jumps to random positions or uses wrong work offset.
- Same program works some days and fails on others.
- Advanced cycles work fine in single block but fail at full speed.
ROOT CAUSES
- Macro variables (#100+, #500+, etc.) not cleared before use.
- Reusing the same variable for multiple purposes.
- Forgetting that some variables are permanent across power cycles (500+ range).
- Mysterious interaction between probing macros and user macros.
FIX
- Explicitly initialize all macro variables at the top of the program.
- Reserve variable ranges for specific purposes (e.g. #100–#149: local, #500–#549: calibration).
- Read the machine’s macro variable map if provided by OEM or probing vendor.
PREVENTION
- Document every macro you write as if someone else will use it.
- Never “borrow” random variables without tracking them.
- Use comments around every G65 and macro call.
10. Operator vs Programmer Miscommunication (The Silent Killer)
SYMPTOMS
- Program is correct in CAM but wrong on machine.
- Operator blames programmer; programmer blames operator.
- Setup sheets do not match actual fixtures or tools.
ROOT CAUSES
- Tool numbers in CAM not matching tool pockets in the machine.
- Setup sheet not updated after last engineering change.
- Metric prints with inch cutting tools (or vice versa).
- Wrong post-processor used for a different machine model.
FIX
- Enforce a standard tool library and pocket assignment.
- Update a digital setup sheet that is tied to program revision.
- Include tooling and offset tables in the job traveler or ERP system.
- Label fixtures and pallets clearly with their intended work offset.
PREVENTION
- Use QR codes or job IDs that link program, setup sheet, and inspection plan.
- Train both programmers and operators on the same terminology.
- Run a “first article checklist” for every new job.
11. Quick Checklist Before You Press Cycle Start
Use this fast checklist to avoid most of the alarms and mistakes above:
- Is the correct work offset active (G54/G55/…)?
- Is G20/G21 explicit and correct for this program?
- Is the correct tool + H offset loaded?
- Is Z-safe height high enough for the longest tool and tallest clamp?
- Are G90/G91, G94/G95, and any cutter comp (G41/G42) modes set intentionally?
- Are canned cycles cancelled with G80 at the right point?
- Is the program simulated / backplotted and dry-run above the part?
If you discipline your shop around these checks and understand the failure patterns in this guide, you will eliminate most “random” CNC crashes, dramatically reduce alarm downtime, and turn frustrating machine faults into predictable, manageable events that you can fix in minutes instead of hours.
Leave a comment