FANUC codes
FANUCProgram/G-codeIntermediate5-30 minutes

291

Fanuc 291 - Illegal command in programmable mirror image

ILLEGAL COMMAND IN PROGRAMMABLE MIRROR IMAGE

Fanuc PS program alarm 291: ILLEGAL COMMAND IN PROGRAMMABLE MIRROR IMAGE. 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 291 occurs when the control detects an incompatible or illegal G-code command while programmable mirror image (G51.1) is active. Certain commands like tool changes, subprogram calls, canned cycles, or coordinate system commands cannot be executed during mirror image mode and must be placed outside the G51.1/G50.1 block.

Safety

  • Verify corrected program or parameters before resuming machining

Causes and Fixes

  1. 1

    Locate the G51.1 command in the program and identify all code between G51.1 and G50.1.

  2. 2

    Review for tool changes (T codes, M06), subprogram calls (M98, M99), macro calls (G65, G66), or work offset changes (G54-G59) within the mirror image block.

  3. 3

    Move any prohibited commands outside the G51.1/G50.1 block, executing them before G51.1 or after G50.1.

    Tool changes must always occur outside mirror image mode to prevent coordinate system conflicts.

  4. 4

    Verify G50.1 is properly programmed to cancel mirror image before any tool change or mode-incompatible command.

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.