CNC Programming G-Code and M-Code Cheat Sheet
Common G-Codes:
G00 - Rapid positioning
G01 - Linear interpolation (cut in a straight line)
G02 - Clockwise circular interpolation
G03 - Counterclockwise circular interpolation
G04 - Dwell (pause for a specified time)
G17 - XY plane selection
G18 - XZ plane selection
G19 - YZ plane selection
G20 - Inch unit selection
G21 - Metric unit selection
G28 - Return to machine home
G40 - Cancel cutter radius compensation
G41 - Cutter radius compensation left
G42 - Cutter radius compensation right
G43 - Tool length offset (positive)
G49 - Cancel tool length offset
G54-G59 - Work coordinate system selection
G80 - Cancel canned cycle
G81 - Drilling cycle
G82 - Drilling cycle with dwell
G83 - Peck drilling cycle
G90 - Absolute positioning mode
G91 - Incremental positioning mode
G92 - Set work coordinate system
Common M-Codes:
M00 - Program stop
M01 - Optional stop
M02 - End of program
M03 - Spindle on (clockwise rotation)
M04 - Spindle on (counterclockwise rotation)
M05 - Spindle stop
M06 - Tool change
M07 - Coolant on (mist)
M08 - Coolant on (flood)
M09 - Coolant off
M30 - Program end and reset
M47 - Program repeat
M98 - Call subprogram
M99 - End subprogram
Laguna CNC Router G-Code and M-Code Cheat Sheet
Laguna CNC Router G-Codes:
G00 - Rapid movement to a specified position
G01 - Linear feed motion (cutting in a straight line)
G02 - Clockwise circular interpolation
G03 - Counterclockwise circular interpolation
G04 - Dwell (pause)
G17 - Select XY plane (for circular motions)
G18 - Select XZ plane
G19 - Select YZ plane
G20 - Use inch units
G21 - Use metric units
G28 - Return to machine home
G40 - Cancel cutter compensation
G41 - Cutter compensation left
G42 - Cutter compensation right
G43 - Tool length offset (positive)
G49 - Cancel tool length offset
G54 - Work coordinate system #1 (WCS)
G55-G59 - Alternate work coordinate systems
G80 - Cancel canned cycle
G81 - Drilling cycle
G82 - Drilling with dwell
G83 - Peck drilling cycle
G90 - Absolute programming mode
G91 - Incremental programming mode
G92 - Set work coordinate system origin
G94 - Feedrate per minute
G95 - Feedrate per revolution
G98 - Return to the initial point after canned cycle
G99 - Return to R point after canned cycle
Laguna CNC Router M-Codes:
M00 - Program stop
M01 - Optional stop
M02 - End of program
M03 - Spindle on (clockwise)
M04 - Spindle on (counterclockwise)
M05 - Spindle stop
M06 - Tool change
M07 - Coolant on (mist)
M08 - Coolant on (flood)
M09 - Coolant off
M30 - Program end and reset
M98 - Call subprogram
M99 - End subprogram
M48 - Feedrate override on
M49 - Feedrate override off
M47 - Program repeat