This document provides information on common G and M codes used in CNC machining. G codes are used to control axis movement and machining operations, such as linear interpolation, circular interpolation, and dwell time. M codes are used to control auxiliary functions like spindle control, coolant, tool changes, and program stops. Some examples include G00 for rapid positioning, G01 for linear interpolation, M03 for spindle start in clockwise direction, and M30 to end the program and reset.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
67%(3)67% found this document useful (3 votes)
3K views2 pages
CNC Code
This document provides information on common G and M codes used in CNC machining. G codes are used to control axis movement and machining operations, such as linear interpolation, circular interpolation, and dwell time. M codes are used to control auxiliary functions like spindle control, coolant, tool changes, and program stops. Some examples include G00 for rapid positioning, G01 for linear interpolation, M03 for spindle start in clockwise direction, and M30 to end the program and reset.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
CNC Machine G and M Codes
G Codes Functions Of G Code M-Code Function of M Code
G00 Positioning / Rapid traverse M00 Program stop G01 Linear Interpolation M01 Optional program stop G02 Circular Interpolation CW M02 End of the program G03 Circular Interpolation CCW M03 Spindle start in CW direction G04 Dwell time M04 Spindle start in CCW direction G10 Data setting M05 Spindle stop G11 Data setting mode cancel M06 Tool change G17 XY Plane selection M07 Flush coolant on G18 XZ Plane selection M08 Flush coolant off G19 YZ Plane selection M09 Coolant on G20 Inches input M10 Coolant off G21 Metric input M11 Clamp G22 Stored stroke check function on M12 Unclamp G23 Stored stroke check function off M13 Spindle start in clockwise direction and Coolant on G25 Spindle speed fluctuation detection on M14 Spindle start in clockwise direction and Coolant off G26 Spindle speed fluctuation detection off M15 Motion +ve G27 Reference position return check M16 Motion -ve G28 Return to reference position M19 Oriented spindle stop G30 2nd ,3rd and 4th Reference position return M20 Spindle orientation command cancel G31 Ksip function M30 End of the program and reset G32 Constant Lead Thread cutting M31 Interlock by-pass G37 Automatic tool length compensation M32 TO Constant cutting speed (For Lathe) G40 Cutter / Tool nose radius compensation cancel M35 G41 Cutter / Tool nose radius compensation left M36 Feed range 1 G42 Cutter / Tool nose radius compensation right M37 Feed range 2 G50 Setting of co-ordinate system M38 Spindle speed range 1 G51 Clamp on maximum spindle speed M39 Spindle speed range 2 G52 Local co-ordinate system setting M40 TO Gear change G53 Machine co-ordinate system setting M45 G54 TO Work piece co-ordinate system 1 to 6 selection M48 Spindle override G59 M49 Bypass override G68 Mirror Image for double turrets on M52 Tool length offset measurement G69 Mirror Image for double turrets off M53 Tool length offset exclusion G96 Constant Surface speed control M54 Tool length offset cancel G97 Constant Surface speed control cancel M60 Work piece change G98 Feed in mm/min M68 Clamp work piece G99 Feed in mm/revolution M69 Unclamp work piece M78 Slide or steady rest unclamp M79 Slide or steady rest clamp M90 Pallet change (For Milling) M98 Sub program call M99 End of sub program