FANUC codes
FANUCProgram/G-codeIntermediate5-30 minutes

181

Fanuc 181 - Illegal command in tool measurement

ILLEGAL COMMAND IN TOOL MEASUREMENT

Fanuc PS program alarm 181: ILLEGAL COMMAND IN TOOL MEASUREMENT. 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 181 occurs when the control detects an invalid G-code, M-code, or parameter during a tool measurement cycle or skip signal operation. This is most commonly caused by using incompatible commands during G31 skip function, incorrect syntax in measurement macros, or attempting tool measurement operations without proper hardware/parameter configuration.

Safety

  • Verify corrected program or parameters before resuming machining

Causes and Fixes

  1. 1

    Review the program line number shown with the alarm. Identify the active G31 or tool measurement block and the command that triggered the alarm.

  2. 2

    Check for illegal commands within or immediately after G31 blocks: M06, G52, G54-G59, G68, G51, G50.1, or M-codes that affect spindle/coolant during measurement.

  3. 3

    Restructure the program to execute the incompatible command before initiating G31 or after the measurement cycle is complete and cancelled with G80 or G40.

  4. 4

    Verify that G31 is followed by a linear move command (G01 or G00) with appropriate feedrate and that skip signal macro variables are correctly referenced.

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.