Gcode & M Code
Gcode & M Code
R for radius
XYZ of
endpoint
Counter-clockwise circular arc G02 / G03 Tutorial
G03 Motion IJK relative
at (F)eedrate and Examples
to center
R for radius
P for
Precise Timing and
milliseconds
Dwell: Stop for a specified Speed: Dwell, Exact
G04 Motion
time. Stop, Backlash
X for
Compensation
seconds
G05 Motion FADAL Non-Modal Rapids
Precise Timing and
Speed: Dwell, Exact
G09 Motion Exact stop check
Stop, Backlash
Compensation
Programmable parameter
G10 Compensation
input
Turn Polar Coordinates OFF,
G15/G16 Polar
G15 Coordinate return to Cartesian
Coordinates
Coordinates
G15/G16 Polar
G16 Coordinate Turn Polar Coordinates ON
Coordinates
CNC G-Code
G17 Coordinate Select X-Y plane
Coordinates
G18 Coordinate Select X-Z plane CNC G-Code
Coordinates
CNC G-Code
G19 Coordinate Select Y-Z plane
Coordinates
Program coordinates are G20 and G21: Unit
G20 Coordinate
inches Conversion
G20 and G21: Unit
G21 Coordinate Program coordinates are mm
Conversion
G28: Return to
G27 Motion Reference point return check
Reference Point
G28: Return to
G28 Motion Return to home position
Reference Point
Return from the reference G28: Return to
G29 Motion
position Reference Point
Return to the 2nd, 3rd, and 4th G28: Return to
G30 Motion
reference point Reference Point
Constant lead threading (like
G32 Canned G01 synchronized with
spindle)
Tool cutter compensation off
G40 Compensation
(radius comp.)
Tool cutter compensation left
G41 Compensation
(radius comp.)
Tool cutter compensation right
G42 Compensation
(radius comp.)
Apply tool length
G43 Compensation
compensation (plus)
Apply tool length
G44 Compensation
compensation (minus)
Tool length compensation
G49 Compensation
cancel
G50 Compensation Reset all scale factors to 1.0
G51 Compensation Turn on scale factors
Local workshift for all
G52 Coordinate coordinate systems: add XYZ
offsets
Machine coordinate system
G53 Coordinate
(cancel work offsets)
Work coordinate system (1st
G54 Coordinate
Workpiece)
Work coordinate system (2nd
G55 Coordinate
Workpiece)
Work coordinate system (3rd
G56 Coordinate
Workpiece)
G57 Coordinate Work coordinate system (4th
Workpiece)
Work coordinate system (5th
G58 Coordinate
Workpiece)
Work coordinate system (6th
G59 Coordinate
Workpiece)
Precise Timing and
Speed: Dwell, Exact
G61 Other Exact stop check mode
Stop, Backlash
Compensation
G62 Other Automatic corner override
G63 Other Tapping mode
G64 Other Best speed path
Subprograms and
G65 Other Custom macro simple call
Macros
G68 and G69
G68 Coordinate Coordinate System Rotation Tutorial and
Examples
G68 and G69
Cancel Coordinate System
G69 Coordinate Tutorial and
Rotation
Examples
High speed drilling cycle
G73 Canned
(small retract)
G74 Canned Left hand tapping cycle
G76 Canned Fine boring cyle
G80 Canned Cancel canned cycle
G81 Canned Simple drilling cycle
Drilling cycle with dwell
G82 Canned
(counterboring)
Peck drilling cycle (full
G83 Canned
retract)
G84 Canned Tapping cycle
Boring canned cycle, no
G85 Canned
dwell, feed out
Boring canned cycle, spindle
G86 Canned
stop, rapid out
G87 Canned Back boring canned cycle
Boring canned cycle, spindle
G88 Canned
stop, manual out
Boring canned cycle, dwell,
G89 Canned
feed out
Absolute programming of
G90 Coordinate
XYZ (type B and C systems)
Absolute programming IJK
G90.1 Coordinate
(type B and C systems)
Incremental programming of
G91 Coordinate
XYZ (type B and C systems)
Incremental programming IJK
G91.1 Coordinate
(type B and C systems)
Offset coordinate system and
G92 Coordinate
save parameters
G92 Clamp of maximum spindle
Motion S
(alternate) speed
Cancel offset and zero
G92.1 Coordinate
parameters
Cancel offset and retain
G92.2 Coordinate
parameters
Offset coordinate system with
G92.3 Coordinate
saved parameters
Units per minute feed mode.
G94 Motion
Units in inches or mm.
Units per revolution feed
G95 Motion
mode. Units in inches or mm.
G96: Constant
G96 Motion Constant surface speed
Surface Speed
G96: Constant
G97 Motion Cancel constant surface speed
Surface Speed
Return to initial Z plane after
G98 Canned
canned cycle
Return to initial R plane after
G99 Canned
canned cycle
M-Codes
Code Category Function Notes Tutorials