Fanuc M-Code G-Code list

M-CODE

Introduction to G Codes and M Codes

Fanuc M-Code G-Code, G codes (preparatory commands) and M codes (auxiliary commands) are essential instructions used to control machine tools.

  • G codes govern motion, positioning, and machining operations (e.g., linear interpolation, circular movements, tool compensation).
  • M codes manage auxiliary functions (e.g., spindle control, coolant activation, tool changes).

These Fanuc M-Code G-Code vary slightly depending on the machine type (lathe, mill, etc.) and Fanuc control version. Always consult your machine’s manual for specifics.


Common Fanuc G Codes

CodeDescription
G00Rapid positioning (fast traverse)
G01Linear interpolation (straight-line motion)
G02Circular interpolation (clockwise)
G03Circular interpolation (counterclockwise)
G04Dwell (pause)
G05non standard g-code
G17XY plane selection
G18XZ plane selection
G19YZ plane selection
G20Programming in inches
G21Programming in millimeters
G28Return to reference position (home)
G30Return to secondary reference position
G40Cancel tool radius compensation
G41Tool radius compensation left
G42Tool radius compensation right
G43Tool length compensation (positive)
G44Tool length compensation (negative)
G49Cancel tool length compensation
G54–G59Work coordinate system (WCS) selection
G61Exact stop check (precision mode)
G90Absolute programming
G91Incremental programming
G92Set position by programming
G94Per-minute feedrate mode
G95Per-revolution feedrate mode
G100–G199Macro programs (varies by configuration)

Common Fanuc M Codes

CodeDescription
M00Program stop
M01Optional stop
M02Program end
M03Spindle on (clockwise)
M04Spindle on (counterclockwise)
M05Spindle stop
M06Tool change
M07Mist coolant on
M08Flood coolant on
M09Coolant off
M10Chuck close
M11Chuck open
M19Spindle orientation
M20Open tool magazine door
M21Close tool magazine door
M28Enable external data input
M29Disable external data input
M30Program end and return to start
M41–M49Tool changer preparation
M61–M69Tool selection (machine-specific)
M98Subprogram call
M99Subprogram return
M100–M199Customizable codes (user-defined)

Notes

  1. Variations: Codes may differ by machine manufacturer or Fanuc control version.
  2. Documentation: Always refer to your machine’s manual for exact code definitions.
  3. Compatibility: Codes depend on the machine type (e.g., lathe vs. mill).

For exhaustive lists of Fanuc M-Code G-Code, consult Fanuc technical manuals or your machine’s programming guide.


Discover more from digit chain

Subscribe to get the latest posts sent to your email.

Leave a Reply