FANUC codes
FANUCProgram/G-codeIntermediate5-30 minutes

016

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

  • Verify corrected program or parameters before resuming machining

Causes and Fixes

  1. 1

    Review the line triggering the alarm and verify M98 includes a P address with valid program number (e.g., M98 P1000).

  2. 2

    Confirm the called subprogram (O number) actually exists in memory or on the control's program list.

  3. 3

    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.

  4. 4

    If using L address for repeat count, verify it's formatted correctly (L1-L9999) and positioned after the P address.

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.