
axismd.ai
FANUC Controller
Program/G-code · Intermediate · 5-30 minutes
Fanuc 164 - Illegal axis command
Alarm 164 occurs when the CNC control encounters an axis command that violates programming rules or syntax. This typically happens when an axis letter is used incorrectly, duplicated in the same block, conflicts with the active plane selection, or when an axis command is formatted improperly for the current G-code mode.
Fanuc 164 - Illegal axis command
ILLEGAL AXIS COMMAND
Fanuc PS program alarm 164: ILLEGAL AXIS COMMAND. 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 164 occurs when the CNC control encounters an axis command that violates programming rules or syntax. This typically happens when an axis letter is used incorrectly, duplicated in the same block, conflicts with the active plane selection, or when an axis command is formatted improperly for the current G-code mode.
Safety
Causes and Fixes
Note the alarm line number displayed on the control screen and locate that block in your part program.
Examine the flagged block carefully for any axis letter (X, Y, Z, A, B, C, U, V, W) that appears more than once.
Remove the duplicate axis command or split the movement into two separate blocks if both positions are needed sequentially.
Reset the alarm, return to program start or the appropriate sequence number, and restart the program in single block mode to verify the correction.
Always verify tool position and work offsets before restarting after program modifications.
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.