This is a practical, shop-floor “error encyclopedia” built to help you identify the most common CNC alarm types, the G-code mistakes that trigger them, and the programming patterns that prevent crashes on Fanuc, Haas, and Siemens controls. Exact alarm numbers and wording vary by control generation, options, and machine builder, but the failure modes are remarkably consistent. Use this guide as a universal diagnostic framework: recognize the alarm category, validate the usual root causes, and apply crash-proof programming habits that reduce risk across all machines.
1) The 12 Alarm Families That Cover ~90% of Real Shop Downtime
1) Overtravel / Soft Limit / Stroke Exceeded: Axis commanded beyond travel limits or beyond a user-defined safety envelope. Often triggered by wrong work offset, wrong sign, or bad retract logic.
2) Servo / Following Error: Axis can’t keep up with commanded motion; may be caused by jam/collision, too aggressive acceleration, excessive load, poor lubrication, encoder issues, or parameter mismatch.
3) Spindle (Drive / Orientation / Speed Error): Spindle fails to reach commanded RPM, fails to orient for tool change, or exceeds load limits; often caused by belt/gear issues, drive faults, or incorrect M-codes.
4) Tool Change / Turret / ATC: Carousel not in position, clamp/unclamp failure, pocket mismatch, orientation not achieved, or sequence interrupted (door/interlock).
5) Program / Format / Illegal Address: Unsupported G-code, missing parameters in a canned cycle, invalid character, bad block number, or macro syntax error.
6) Work Coordinate / Offset / Kinematics: Wrong G54–G59, wrong G54.1 P# index, wrong tool length offset (H), wrong cutter comp offset (D), or 5-axis kinematic mismatch (TCP/DWO/TRAORI style features).
7) Feed / Speed / Mode Conflicts: G93/G94/G95 mismatch, feed too high for a mode, rigid tapping sync errors, spindle direction wrong for a thread/tap, or wrong plane selection.
8) Probe / Skip Signal / Measurement: Probe not armed, skip signal always on/off, stylus not calibrated, approach logic wrong, or incorrect macro parameterization.
9) Thermal / Lubrication / Air / Coolant: Low oil, low air pressure, overheat, chiller fault, coolant flow failure—often intermittent and workload dependent.
10) Communication / File / Memory: DNC drip feed interruptions, USB read errors, program not found, buffer overflow, or network latency.
11) Interlock / Safety: Door open, E-stop, axis unclamped, guard not closed, hydraulic not ready. These are “logic alarms” that block motion.
12) Collision / Overload / Abnormal Torque: High spindle load, axis torque spike, tool break, fixture strike. Often appears as a servo alarm or overload alarm after the event.
2) First 5 Minutes: A Crash-Proof Triage Checklist
A) Freeze state: record the exact alarm message, axis positions (machine coordinates if possible), active offsets, and active modal codes.
B) Identify alarm family: overtravel vs servo vs program vs tool change vs kinematics.
C) Confirm coordinate context: absolute/incremental (G90/G91), units (G20/G21), active plane (G17/G18/G19), active offset (G54…G59 or G54.1 P#), and whether rotation/scaling is active (G68/G69, G51 if applicable).
D) Check the last “dangerous motion”: any G00, G28/G30, tool length comp (G43/G49), cutter comp (G41/G42/G40), TCP/DWO features, or canned cycles (G81–G89).
E) Test safely: single-block, feed hold, reduced rapid, dry-run, then step through the exact line that triggered the fault after verifying clearance.
3) The Most Viral G-Code Mistakes (Because Everyone Does Them)
Mistake #1: “G00 is safe because it’s just positioning”
Reality: G00 is the fastest and most dangerous motion in your program. The usual failure isn’t “bad speed” — it’s bad coordinates or wrong offset. A single wrong work offset can turn a safe rapid into a crash.
Crash pattern:
G00 X… Y…
G00 Z-10. (expected above part, but offset is wrong → tool dives into fixture)
Crash-proof pattern:
1) Always retract to a known safe Z before any XY rapid.
2) Use machine coordinate safe Z if your shop standard allows it (safer than part coordinates).
Mistake #2: The “G00 Z-100” / “G00 Z100” confusion (sign + coordinate system)
This is one of the most common real-world crash triggers. Whether Z+ is up depends on machine convention (most mills: Z+ up), but the real killer is not the sign—it’s WHICH coordinate system you’re in.
If you think you are in G54 but you’re actually in G53 (machine coords), or vice versa, Z100 can be extremely different physically.
Safer approach:
- When you intend “go up and away,” make that explicit: move to a verified safe Z before XY.
- If your control supports it and your workflow is consistent, use a machine coordinate retract that is always clear of the part (shop-defined safe Z).
Mistake #3: Using G28 like a normal move
Many crashes happen because G28 uses an intermediate point. If that intermediate point is not safe, the machine can take a surprising path.
Risky:
G28 Z0. (may go through a dangerous intermediate point depending on state)
Safer (classic pattern):
G91 G28 Z0.
G90
Mistake #4: Tool length compensation applied late or incorrectly
G43 with the wrong H number or applying G43 after you’re already near the part is a crash recipe.
Common bad sequence:
G00 X… Y…
G00 Z5.
G43 H12 Z5. (sudden jump if H12 is wrong)
Safer habit:
- Apply tool length compensation immediately after tool change and before approaching the part.
- Standardize: tool number == H number where possible.
Mistake #5: Cutter comp entry without a real lead-in
G41/G42 requires space and a lead-in move. Entering comp on a tiny move or at a sharp corner often alarms or gouges.
Bad:
G01 X… Y…
G41 D… X… Y… (no lead-in room)
Safer:
- Linear lead-in at least > tool radius, with stable feed.
- Cancel comp (G40) on a lead-out, not at a corner.
Mistake #6: Wrong feed mode (G93/G94/G95)
In multi-axis or turning, the wrong mode can produce insane motion. A program that ends in G93 (inverse time) and then does positioning moves later can behave unpredictably.
Crash-proof:
- Establish feed mode in the safe start.
- Re-establish feed mode after subprogram returns.
- End critical sections by restoring shop-default (often G94 for mills).
4) Crash-Proof Programming Patterns (Fanuc / Haas / Siemens Friendly)
Pattern A: Safe Start Block (minimum “state reset”)
Goal: remove unknown modal baggage from previous programs.
Use a consistent “safe start” that sets the modes your shop expects: plane, units, absolute, cancel comps, cancel cycles, feed mode, etc. Then apply the correct offset and tool comp intentionally.
Key principles:
- Cancel modal traps: cutter comp off, length comp off, canned cycles off.
- Set plane + units + absolute early.
- Set the correct work offset explicitly.
Pattern B: Safe Retract Before XY Rapids
Rule: never rapid XY near the part unless Z is known safe.
Sequence:
1) Retract Z to a verified safe height.
2) Rapid XY.
3) Approach Z.
Pattern C: “Tool Change Safety Bubble”
Before M06/tool change (or equivalent):
- Retract to safe Z.
- Move away from clamps/rotaries if needed.
- Ensure spindle stop/orient requirements are met.
Pattern D: Subprogram Hygiene (the silent killer)
Subprograms can inherit dangerous modes (comp, rotation, inverse time feed, etc.).
Best practice:
- Subprogram begins by assuming nothing and re-establishing critical modes, OR it is only called from a master program that guarantees the state.
- Subprogram ends by restoring expected modes (especially: cancel comp, restore feed mode).
Pattern E: Rotation/Transformation Discipline
If you use coordinate rotation (G68) or tilted plane features (5-axis equivalents) you must:
- Apply the transform in a controlled section.
- Cancel it (G69 or equivalent) before rapids, tool changes, or machine-coordinate moves.
- Re-confirm the work offset context after canceling.
5) “If You See This, Suspect That” — A Practical Symptom Map
- Overtravel right after a tool change: wrong work offset active, wrong axis sign in a retract, or G28/G30 intermediate point unsafe.
- Servo alarm immediately after a rapid: collision, wrong offset, excessive acceleration, or axis obstruction.
- Spindle orientation alarm at tool change: spindle not stopped/oriented, belt/encoder/orient sensor issues, or wrong M-code sequence.
- “Illegal address” / “Format error” on one machine but not another: dialect mismatch (control-specific G/M codes), missing parameters, or macro option not installed.
- Tapping issues (broken taps, pitch wrong): wrong spindle direction, wrong feed mode, rigid tapping option mismatch, pitch/feed mismatch, or incorrect canned cycle parameters.
- Probing false triggers: dirty probe, electrical noise, wrong approach direction, skip input stuck, or calibration missing.
6) Realistic, Control-Agnostic “Safety Templates” You Can Reuse
Template 1: Safe approach to a feature
- Establish known modes
- Retract Z safe
- Rapid XY
- Feed Z down to approach plane
- Start cutting
Template 2: Safe exit from a feature
- Cancel cutter comp and canned cycles
- Retract Z safe
- Rapid away
Template 3: Safe tool change sequence
- Retract Z safe
- Move to tool change location
- Stop spindle, coolant off
- Tool change
- Apply tool length comp
- Return to safe approach
7) Final Reality Check (Why This Becomes “Viral” in Shops)
Most crashes and “mystery alarms” are not exotic control failures. They come from predictable, repeatable patterns: wrong offset, wrong mode, unsafe rapid, late compensation, unsafe homing, and messy subprogram state. If you standardize safe start blocks, safe retract logic, transformation discipline, and subprogram hygiene, you eliminate the biggest categories of expensive downtime across Fanuc, Haas, and Siemens—no matter what the exact alarm number says.
Leave a comment