
axismd.ai
FANUC Controller
Program/G-code · Intermediate · 5-30 minutes
Fanuc 291 - Illegal command in programmable mirror image
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.
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
Causes and Fixes
Locate the G51.1 command in the program and identify all code between G51.1 and G50.1.
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.
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.
Verify G50.1 is properly programmed to cancel mirror image before any tool change or mode-incompatible command.
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.