FANUC codes
FANUCProgram/G-codeIntermediate5-30 minutes

164

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

  • Verify corrected program or parameters before resuming machining

Causes and Fixes

  1. 1

    Note the alarm line number displayed on the control screen and locate that block in your part program.

  2. 2

    Examine the flagged block carefully for any axis letter (X, Y, Z, A, B, C, U, V, W) that appears more than once.

  3. 3

    Remove the duplicate axis command or split the movement into two separate blocks if both positions are needed sequentially.

  4. 4

    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.

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.