
axismd.ai
FANUC Controller
Program/G-code · Basic · 5-15 minutes
Fanuc Alarm 038 - Return Without Call
Fanuc Alarm 038 occurs when an M99 (subprogram return) command is executed in the main program without a corresponding M98 (subprogram call) or when M99 is encountered outside of a subprogram context. This is a program logic error where the control expects M99 only within a called subprogram to return control to the calling program.
Fanuc Alarm 038 - Return Without Call
Subprogram Return
Fanuc program alarm 038: Subprogram Return. The part program contains an error or illegal condition that the Fanuc control cannot execute. Correct the program to clear this alarm.
Root Cause Summary
Fanuc Alarm 038 occurs when an M99 (subprogram return) command is executed in the main program without a corresponding M98 (subprogram call) or when M99 is encountered outside of a subprogram context. This is a program logic error where the control expects M99 only within a called subprogram to return control to the calling program.
Safety
Causes and Fixes
Press RESET to clear the alarm. Navigate to EDIT mode and review the current program where the alarm occurred.
Search for M99 commands in the program using the search function. Verify each M99 is within a subprogram (not the main O-number program being executed).
If M99 is found in the main program, either remove it or replace it with M30 (program end) or M02 (program end without reset) as appropriate for main program termination.
If the intent was to create a repeating loop in the main program, use M99 P[line_number] to jump to a specific line, or restructure the program to use proper subprogram calls with M98.
M99 P___ for looping in main programs may not be supported on all Fanuc control versions. Verify compatibility with parameter 3404 bit 5 (M99 loop enable) if available on your series.
Call a technician if:
Prevention
Common Mistakes
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.