
axismd.ai
FANUC Controller
Program/G-code · Intermediate · 5-30 minutes
Fanuc 268 - Retrace stack full
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.
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
Causes and Fixes
Review the part program for nested M98 subroutine calls and count the maximum nesting depth (subroutines calling other subroutines).
Verify each M98 call has a corresponding M99 return statement in the called subroutine program.
Reduce nesting levels by restructuring the program logic - combine subroutines or eliminate unnecessary nesting layers to stay within 4 levels maximum.
Check parameter 3107 (if available on your control) which defines the subroutine nesting level limit and verify your program stays within this value.
Seeing Multiple Alarms?
Seeing another alarm with this one? Enter the code.
AxisMD logs alarms against your actual machines, tracks patterns, and gives AI context your manual doesn't have.
Start freeWas this guide helpful?
Always verify with your machine manual or a certified technician before performing service procedures.