
axismd.ai
FANUC Controller
Program/G-code · Intermediate · 5-30 minutes
Fanuc 16 - Cannot command m98/m99
Alarm 016 occurs when M98 (subprogram call) or M99 (subprogram return/loop) commands are used incorrectly or in contexts where they cannot be executed. This typically involves formatting errors, missing program numbers, nesting violations, or attempting to use these commands in modes or locations where they are prohibited by the control.
Fanuc 16 - Cannot command m98/m99
CANNOT COMMAND M98/M99
Fanuc PS program alarm 16: CANNOT COMMAND M98/M99. 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 016 occurs when M98 (subprogram call) or M99 (subprogram return/loop) commands are used incorrectly or in contexts where they cannot be executed. This typically involves formatting errors, missing program numbers, nesting violations, or attempting to use these commands in modes or locations where they are prohibited by the control.
Safety
Causes and Fixes
Review the line triggering the alarm and verify M98 includes a P address with valid program number (e.g., M98 P1000).
Confirm the called subprogram (O number) actually exists in memory or on the control's program list.
Check that the P address format matches your control's requirements - some systems use P followed by 4-8 digits, others may require specific formatting.
If using L address for repeat count, verify it's formatted correctly (L1-L9999) and positioned after the P address.
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.