FANUC codes
FANUCProgram/G-codeIntermediate15-30 minutes

321

Fanuc Alarm 321 - ILLEGAL REPEATED TIME IN PATTERN REPEATING CYCLE

SYSTEM ALARM 321

Fanuc alarm 321: SYSTEM ALARM 321. This alarm indicates a fault condition detected by the Fanuc control. Refer to the alarm number and name to identify the specific system or function involved.

Root Cause Summary

Fanuc Alarm 321 occurs when the high-speed peck drilling cycle G73 is programmed with an invalid number of repetitions (Q value). The Q parameter must be a positive integer value; specifying zero, a negative number, or omitting the Q value when required will trigger this alarm.

Causes and Fixes

  1. 1

    Review the G73 block in the active program. Verify the Q value is present and positive (e.g., G73 X_ Y_ Z_ R_ Q5.0 F_). The Q value represents the peck depth increment in millimeters or inches.

  2. 2

    Check parameter 5101#0 (Q code for peck drilling) in SYSTEM > PARAM. If set to 1, Q is mandatory and must be specified. If set to 0, Q uses a default value but explicit zero or negative values still cause alarm 321.

  3. 3

    Correct the G73 line by specifying a positive Q value appropriate for your tool and material (typical range Q0.5 to Q10.0). For example, change 'G73 Z-50. R2. Q0 F100' to 'G73 Z-50. R2. Q2.0 F100'.

  4. 4

    Reset the alarm using the RESET key, return to program start if necessary, and restart the cycle. Verify in MDI mode first if uncertain about the corrected values.

DIY Feasiblehigh confidence

Call a technician if:

  • ·Parameter modifications required
  • ·Persistent alarm after program corrections
  • ·Multiple related canned cycle alarms

Prevention

  • Always validate Q parameter values are positive integers
  • Use macro variable bounds checking in programs
  • Test canned cycles with simple values before complex implementations

Common Mistakes

  • Using Q0 thinking it means infinite repetitions
  • Forgetting to initialize macro variables
  • Copy-pasting G73 blocks without updating Q parameters

Related Alarms

Seeing Multiple Alarms?

Seeing another alarm with this one? Enter the code.

Get machine-aware diagnosis

AxisMD logs alarms against your actual machines, tracks patterns, and gives AI context your manual doesn't have.

Start free

Was this guide helpful?

Always verify with your machine manual or a certified technician before performing service procedures.