What Are the Most Common G & M Codes for CNC Milling Machines?

What Are the Most Common G & M Codes for CNC Milling Machines?

Computer numerical control (CNC) milling machines are automated cutting tools used in the manufacturing industry. They are programmed using a series of codes known as G and M codes. These codes are used to control the movement of the machine and the cutting tools. In this article, we will discuss the most common G and M codes used in CNC milling machines.

What Are G and M Codes?

G and M codes are a set of instructions used to control the movement of the machine and the cutting tools. G codes are used to control the movement of the machine, while M codes are used to control the cutting tools. G codes are also known as preparatory codes, while M codes are known as miscellaneous codes.

What Are the Most Common G Codes?

The most common G codes used in CNC milling machines are:

  • G00 – Rapid positioning
  • G01 – Linear interpolation
  • G02 – Circular interpolation (clockwise)
  • G03 – Circular interpolation (counterclockwise)
  • G04 – Dwell
  • G17 – XY plane selection
  • G18 – ZX plane selection
  • G19 – YZ plane selection
  • G20 – Inch mode
  • G21 – Millimeter mode
  • G28 – Return to reference point
  • G29 – Return from reference point
  • G40 – Cutter compensation off
  • G41 – Cutter compensation left
  • G42 – Cutter compensation right
  • G43 – Tool length offset
  • G49 – Tool length offset cancel
  • G50 – Scaling off
  • G51 – Scaling on
  • G54 – Work coordinate system 1
  • G55 – Work coordinate system 2
  • G56 – Work coordinate system 3
  • G57 – Work coordinate system 4
  • G59 – Work coordinate system 5
  • G61 – Exact stop check
  • G64 – Continuous path control
  • G80 – Cancel motion mode
  • G90 – Absolute positioning
  • G91 – Incremental positioning
  • G92 – Set origin
  • G94 – Feed rate per minute
  • G95 – Feed rate per revolution

What Are the Most Common M Codes?

The most common M codes used in CNC milling machines are:

  • M00 – Program stop
  • M01 – Optional program stop
  • M02 – Program end
  • M03 – Spindle on (clockwise)
  • M04 – Spindle on (counterclockwise)
  • M05 – Spindle off
  • M06 – Tool change
  • M08 – Coolant on
  • M09 – Coolant off
  • M10 – Pallet clamp on
  • M11 – Pallet clamp off
  • M13 – Spindle on (clockwise) and coolant on
  • M14 – Spindle on (counterclockwise) and coolant on
  • M17 – Spindle on (clockwise) and coolant off
  • M18 – Spindle on (counterclockwise) and coolant off
  • M19 – Orient spindle
  • M30 – Program end and reset
  • M98 – Subprogram call
  • M99 – Subprogram end

FAQs

What is a G code?

A G code is a type of code used to control the movement of the machine and the cutting tools. G codes are also known as preparatory codes.

What is an M code?

An M code is a type of code used to control the cutting tools. M codes are also known as miscellaneous codes.

What are the most common G codes used in CNC milling machines?

The most common G codes used in CNC milling machines are G00, G01, G02, G03, G04, G17, G18, G19, G20, G21, G28, G29, G40, G41, G42, G43, G49, G50, G51, G54, G55, G56, G57, G59, G61, G64, G80, G90, G91, G92, G94, and G95.

What are the most common M codes used in CNC milling machines?

The most common M codes used in CNC milling machines are M00, M01, M02, M03, M04, M05, M06, M08, M09, M10, M11, M13, M14, M17, M18, M19, M30, M98, and M99.

Scroll to Top