FANUC codes
FANUCProgram/G-codeIntermediate30-60 minutes

1124

Fanuc Alarm 1124 - MISSING DO STATEMENT

SYSTEM ALARM 1124

Fanuc alarm 1124: SYSTEM ALARM 1124. 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

Alarm 1124 occurs when the CNC detects an END instruction without a corresponding DO statement in a custom macro program (G65/G66 or O9xxx series). This is a macro syntax error where the DO-END loop structure is incomplete or improperly nested, preventing proper macro execution.

Causes and Fixes

  1. 1

    Navigate to EDIT mode and display the macro program that generated the alarm. Press SYSTEM > ALARM to confirm the O-number and line number where alarm occurred.

  2. 2

    Search backward from the END statement to locate the corresponding DO statement. Count nested DO-END pairs to ensure proper pairing (each DO must have exactly one END).

  3. 3

    If DO statement is missing, insert the proper DO statement with correct loop counter format: DO#i=#j,#k,#m (where #i=loop variable, #j=start value, #k=end value, #m=increment).

  4. 4

    Reset alarm (RESET key), verify macro syntax using MDI test call (G65 P####), and confirm proper execution with single block and dry run enabled.

DIY Feasiblehigh confidence

Call a technician if:

  • ·Program corruption persists after multiple restore attempts
  • ·Macro variables show unexpected behavior after correction
  • ·Control software appears to have macro processing issues

Prevention

  • Always backup programs before editing macros
  • Use structured programming with proper indentation for DO/END pairs
  • Validate macro syntax using program check function before production
  • Implement version control for custom macro programs

Common Mistakes

  • Deleting DO statements while keeping END statements during editing
  • Copy/paste operations that don't include complete loop structures
  • Improper nesting of multiple DO/END pairs in complex macros
  • Not verifying macro syntax after program transfers or modifications

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.