FANUC codes
FANUCProgram/G-codeIntermediate5-30 minutes

268

Fanuc 268 - Retrace stack full

RETRACE STACK FULL

Fanuc PS program alarm 268: RETRACE STACK FULL. This alarm is triggered by an illegal or incorrectly formatted command in the part program, or a programming condition that the Fanuc control cannot execute.

Root Cause Summary

Alarm 268 RETRACE STACK FULL occurs when the CNC control's retrace stack memory has exceeded its capacity during program execution. This typically happens when there are too many nested subroutine calls (M98/M99), excessive looping structures, or when using retracing functions without properly clearing the stack. The control uses this stack to store return addresses for subroutines and program position tracking.

Safety

  • Verify corrected program or parameters before resuming machining

Causes and Fixes

  1. 1

    Review the part program for nested M98 subroutine calls and count the maximum nesting depth (subroutines calling other subroutines).

  2. 2

    Verify each M98 call has a corresponding M99 return statement in the called subroutine program.

  3. 3

    Reduce nesting levels by restructuring the program logic - combine subroutines or eliminate unnecessary nesting layers to stay within 4 levels maximum.

  4. 4

    Check parameter 3107 (if available on your control) which defines the subroutine nesting level limit and verify your program stays within this value.

Service Recommended confidence

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.