FANUC codes
FANUCProgram/G-codeIntermediate5-30 minutes

267

Fanuc 267 - Illegal g code in retrace

ILLEGAL G CODE IN RETRACE

Fanuc PS program alarm 267: ILLEGAL G CODE IN RETRACE. 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 267 occurs when the control detects an illegal G-code during a retrace operation, typically in canned cycles or tool path re-execution. This commonly happens when incompatible motion commands or modal groups are programmed within retract moves, or when the control attempts to retrace a path containing G-codes not allowed during retraction sequences.

Safety

  • Verify corrected program or parameters before resuming machining

Causes and Fixes

  1. 1

    Review the program lines at and immediately after the alarm point. Identify any active canned cycles (G73-G89) and examine the G-codes programmed in the same block or following blocks.

  2. 2

    Check for incompatible G-codes such as G02/G03 (circular interpolation), G41/G42 (cutter compensation), or multiple Group 01 motion commands programmed during the retract sequence.

  3. 3

    Cancel the canned cycle with G80 before programming any conflicting motion commands or tool path changes. Ensure proper modal separation between canned cycle operations and subsequent moves.

  4. 4

    Re-verify program syntax using program check mode or graphical simulation before executing on the machine. Confirm proper G-code sequencing per Fanuc programming manual for your specific control model.

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.