G- & M-code Charts

G-codes
code description
G00 Rapid repositioning
G01 Linear interpolation
G02 Clockwise circular/helical interpolation
G03 Counterclockwise circular/helical interpolation
G04 Dwell
G10 Coordinate system origin setting
G12 Clockwise circular pocket
G13 Counterclockwise circular pocket
G15 Switch to Cartesian coordinates
G16 Switch to polar coordinates
G17 XY plane selection
G18 ZX plane selection
G19 YZ plane selection
G20 Programming in inches
G21 Programming in millimeters
G28 Return to home position (machine zero)
G28.1 Reference axes
G30 Return to secondary home position (machine zero)
G31 Straight probe
G40 Cancel cutter radius compensation
G41 Start cutter radius compensation left
G42 Start cutter radius compensation right
G43 Apply tool length offset
G49 Cancel tool length offset
G50 Reset all scale factors to 1.0
G51 Set axis data input scale factors
G52 Temporary coordinate system offsets
G53 Move in absolute machine coordinate system
G54 Use fixture offset 1
G55 Use fixture offset 2
G56 Use fixture offset 3
G57 Use fixture offset 4
G58 Use fixture offset 5
G59 Use fixture offset 6/use general fixture number
G61 Exact stop mode
G64 Constant velocity mode
G68 Rotate coordinate system
G69 Turn off coordinate system rotation
G73 Canned cycle - peck drilling (high-speed)
G80 Cancel canned cycle
G81 Canned cycle - drilling
G82 Canned cycle - drilling with dwell
G83 Canned cycle - peck drilling (full retraction)
G85 Canned cycle - boring (no dwell, feed out)
G86 Canned cycle - boring (spindle stop, rapid out)
G88 Canned cycle - boring (spindle stop, manual out)
G89 Canned cycle - boring (dwell, feed out)
G90 Absolute distance mode
G91 Incremental distance mode
G92 Offset coordinates and set parameters
G92.x Cancel G92 etc.
G93 Inverse time feed mode
G94 Feed per minute mode
G95 Feed per revolution mode
G98 Initial level return after canned cycle
G99 R-point level return after canned cycle
M-codes
code description
M00 Program stop
M01 Optional program stop
M02 Program end
M03 Rotate spindle clockwise
M04 Rotate spindle counterclockwise
M05 Stop spindle
M06 Tool change (by two macros)
M07 Coolant on (mist)
M08 Coolant on (flood)
M09 Coolant off
M30 Program end and rewind
M47 Repeat program from first line
M48 Enable speed and feed override
M49 Disable speed and feed override
M98 Call subroutine
M99 Return from subroutine/repeat
M871 Tapping cycle 1
M872 Tapping cycle 2
M873 Tapping cycle 3
M9981 Move to tool change position