This document lists common G and M codes used in CNC machining. It includes codes for linear and circular interpolation, tool compensation, work coordinate systems, drilling cycles, spindle and coolant control, and input/output logic levels. Some key codes are G00 for rapid positioning, G01 for linear interpolation, G40/41/42 for tool radius compensation, G90/91 for absolute and incremental programming, M03/04 for spindle control, and T, S, F for tool, speed, and feed functions.
This document lists common G and M codes used in CNC machining. It includes codes for linear and circular interpolation, tool compensation, work coordinate systems, drilling cycles, spindle and coolant control, and input/output logic levels. Some key codes are G00 for rapid positioning, G01 for linear interpolation, G40/41/42 for tool radius compensation, G90/91 for absolute and incremental programming, M03/04 for spindle control, and T, S, F for tool, speed, and feed functions.
This document lists common G and M codes used in CNC machining. It includes codes for linear and circular interpolation, tool compensation, work coordinate systems, drilling cycles, spindle and coolant control, and input/output logic levels. Some key codes are G00 for rapid positioning, G01 for linear interpolation, G40/41/42 for tool radius compensation, G90/91 for absolute and incremental programming, M03/04 for spindle control, and T, S, F for tool, speed, and feed functions.
Supported G code list G00 Rapid positioning G01 Linear interpolation G02 Circular interpolation CW G03 Circular interpolation CCW G04 Dwell (Unit: millisecond) G17 Selection of XY coordinate plane G18 Selection of ZX coordinate plane G19 Selection of YZ coordinate plane G20 Input in inch G21 Input in metric G28 Auto back to reference point G30 Back to secondary reference point G40 Cancel tool radius compensation G41 Left tool compensation(the tool offsets radius distance on the left side of tool moving direction) G42 Right tool compensation(the tool offsets radius distance on the right side of tool moving direction) G43 Tool length compensation (compensation along positive direction) G44 Tool length compensation (compensation along negative direction) G49 Cancel tool length compensation G54 Work coordinate system 1 G55 Work coordinate system 2 G56 Work coordinate system 3 G57 Work coordinate system 4 G58 Work coordinate system 5 G59 Work coordinate system 6 G73 High-speed peck drilling cycle for deep holes G80 Canned cycle cancel G81 Drilling cycle G82 Drilling cycle of dwell at bottom of hole G83 Peck drilling cycle for deep holes G90 Absolute programming G91 Incremental programming G98 Return to initial point G99 Return to point R M03 Spindle on(CW rotation) M04 Spindle on(CCW rotation) M05 Spindle stop M08 Coolant on (Flood) M09 Coolant off M30 End of program, and return to program top M208 Cycle machining M210 Set output logic low level M211 Set output logic high level M214 Run the next line of G code after waiting for the specified input signal logic low M215 Run the next line of G code after waiting for the specified input signal logic high M216 Run the next line of G code after waiting until all the specified input signal logic high M217 Run the next line of G code after waiting until anyone of all the specified input signal logic high M220 Set Y1 logic low level M221 Set Y1 logic high level M222 Set Y2 logic low level M223 Set Y2 logic high level M224 Set Y3 logic low level M225 Set Y3 logic high level M226 Set Y4 logic low level M227 Set Y4 logic high level M350 Set the extension output logic low level M351 Set the extension output logic high level T Tool function S Spindle speed F Feed rate H Tool length offset