Technician operating CNC control panel for programming and monitoring machining process.

FANUC CNC G Code & M Code Reference

FANUC G and M codes define machine tool operations, motion paths, and auxiliary functions.

FANUC CNC G Code & M Code List

Below you will find reference guides for the most common FANUC G and M codes used on CNC machines.
Cause machining centers and CNC lathes use different control logic, each has its own dedicated code list and explanations.
Click the pages below to explore the code sets for your machine type.

FANUC G Code and M Code List for Machining Centers
G code/M code List This list contains common codes from various builders. Note that all machines are configured differently, and codes—especially those above M79—often vary between manufacturers. Always confirm with your machine tool builder to ensure accuracy. Typical G Command for a machining-center G code Group Function *G00 01 Positioning (rapid traverse) *G01 01 Linear interpolation (cutting feed) G02 01 Circular interpolation CW or helical interpolation CW (clockwise) G03 01 Circular interpolation CCW or helical interpolation CCW(counterclockwise) G04 00 Dwell G05 00 Al contour control (high-precision contour control compatible command G05.1... Read more...
FANUC G Code and M Code List for CNC Lathes
G code/M code List The following list provides common codes used by many manufacturers. Please be aware that machine configurations can vary significantly, so this list may not be an exact match for your specific equipment. In fact, M-Codes above M79 are almost universally customized by the builder. We strongly recommend consulting your machine tool builder's documentation to confirm the correct codes for your application. Typical G Command for a lathe There are three G code system: A, B, and C. Select a G code system using bits 7 (GSC)... Read more...

Tips for Programmers

  • Always check your machine manual before using a new code.
  • Some codes differ slightly depending on the FANUC system version.
  • Keep a backup of your parameter file before modifying program logic.

Related Resources

Explore more technical materials to help you troubleshoot, maintain, and optimize your CNC system.

Related Links List:

Back to Main Technical Support

Close-up of a CNC machine cutting aluminum parts with high precision.

Need Technical Support or Repairs?

We offer repair services for all CNC parts, including systems, drives, motors, encoders, and PCBs. Fast repair, full testing, and REACO CNC warranty included. Contact us for guidance, troubleshooting, parameter support or repair.

Tech Support