
axismd.ai
FANUC Controller
Program/G-code · Intermediate · 15-30 minutes
Fanuc Alarm PS051 - Subprogram Nesting Exceeded
Fanuc PS051 alarm occurs when subprogram call nesting exceeds the system's maximum allowable depth, typically 4 levels on older controls (0i/16i/18i) and up to 15 levels on newer systems (30i/31i/32i). This is caused by excessive M98 subprogram calls within subprograms, recursive calling patterns, or incorrect program structure that creates deeper nesting than the control parameter allows.
Fanuc Alarm PS051 - Subprogram Nesting Exceeded
MISSING MOVE AFTER CNR/CHF
Fanuc PS051: A chamfering or corner rounding command (CHF/CNR) was programmed but the following block does not contain a linear or circular move. A move command must follow CHF/CNR.
Root Cause Summary
Fanuc PS051 alarm occurs when subprogram call nesting exceeds the system's maximum allowable depth, typically 4 levels on older controls (0i/16i/18i) and up to 15 levels on newer systems (30i/31i/32i). This is caused by excessive M98 subprogram calls within subprograms, recursive calling patterns, or incorrect program structure that creates deeper nesting than the control parameter allows.
Safety
Causes and Fixes
Review the active part program structure and trace all M98 subprogram calls. Count the maximum nesting depth from main program through each subprogram level (Main > O1000 > O2000 > O3000 = 3 levels).
Check parameter 3107 (Subprogram Nesting Level) in SYSTEM > PARAM > search [#3107]. Note the maximum allowable nesting value. On 0i/16i series this is typically fixed at 4 levels; on 30i/31i/32i it may be adjustable.
Restructure the part program to reduce nesting depth by consolidating subprograms, eliminating unnecessary intermediate subprogram calls, or using macro variables (G65) with local subprograms instead of deeply nested M98 calls.
Test the modified program in single block mode (SINGLE BLOCK key ON) while monitoring the program stack in CURRENT screen > PROGRAM > STATUS to verify nesting depth remains within limits.
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.