GW CALCULATOR 3 PRICING TOUR BLOG 3 LEARN 3
4084253617
HELP ABOUT 3
G-Code and M-Code List for CNC [Easy, With Examples & Tutorials]
Start Here
DON'T DROWN IN THE DETAILS OF GCODE.
GET THE FUNDAMENTALS QUICKLY AND EASILY.
- G-Code Editor and Simulator
- Conversational Wizards for Programming
- Graphical Backplot of Cutting Path Try G-Wizard Editor Now, It's Free!
- Debugger Makes Macro Programming Much Easier
- Translates Cryptic G-Codes to Plain English
Nah! I don't need any GCode Help.
Milling G Code List
Turning G Code List
GCode Simulator
Fanuc Alarm Code List
Complete g code list with m-codes for milling in the Fanuc, LinuxCNC, GRBL, and Haas dialects. We give a quick
de nition for all g code commands along with a link to tutorials and examples of how to use it. Click the g-code link
(if any) to visit a tutorial from our popuplar Online Free G-Code Training that shows examples and teaches how to
program CNC machines using the g-code.
G Codes
Code Category Function Notes
Move in a straight line at rapids
G00 Motion XYZ of endpoint
speed.
Move in a straight line at last
G01 Motion speed commanded by a XYZ of endpoint
(F)eedrate
XYZ of endpoint IJK
Clockwise circular arc at
G02 Motion relative to center R
(F)eedrate
for radius
XYZ of endpoint IJK
Counter-clockwise circular arc
G03 Motion relative to center R
at (F)eedrate
for radius
P for milliseconds X
G04 Motion Dwell: Stop for a speci ed time.
for seconds
G05 Motion FADAL Non-Modal Rapids
G09 Motion Exact stop check
Programmable parameter
G10 Compensation
input
Turn Polar Coordinates OFF,
G15 Coordinate return to Cartesian
Coordinates
G16 Coordinate Turn Polar Coordinates ON
G17 Coordinate Select X-Y plane
G18 Coordinate Select X-Z plane
G19 Coordinate Select Y-Z plane
G20 Coordinate Program coordinates are inches
G21 Coordinate Program coordinates are mm
G27 Motion Reference point return check
G28 Motion Return to home position
Return from the reference
G29 Motion
position
Return to the 2nd, 3rd, and 4th
G30 Motion
reference point
Constant lead threading (like G01
G32 Canned
synchronized with spindle)
Tool cutter compensation o
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
o sets
Machine coordinate system
G53 Coordinate
(cancel work o sets)
Work coordinate system (1st
G54 Coordinate
Workpiece)
Work coordinate system (2nd
G55 Coordinate
Workpiece)
Work coordinate system (3rd
G56 Coordinate
Workpiece)
Work coordinate system (4th
G57 Coordinate
Workpiece)
Work coordinate system (5th
G58 Coordinate
Workpiece)
Work coordinate system (6th
G59 Coordinate
Workpiece)
G61 Other Exact stop check mode
G62 Other Automatic corner override
G63 Other Tapping mode
G64 Other Best speed path
G65 Other Custom macro simple call
G68 Coordinate Coordinate System Rotation
Cancel Coordinate System
G69 Coordinate
Rotation
High speed drilling cycle (small
G73 Canned
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)
G83 Canned Peck drilling cycle (full retract)
G84 Canned Tapping cycle
Boring canned cycle, no dwell,
G85 Canned
feed out
Boring canned cycle, spindle
G86 Canned
stop, rapid out
G87 Canned Back boring canned cycle
Boring canned cycle, spindle stop,
G88 Canned
manual out
Boring canned cycle, dwell, feed
G89 Canned
out
Absolute programming of XYZ
G90 Coordinate
(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)
O set coordinate system and
G92 Coordinate
save parameters
G92
Motion Clamp of maximum spindle speed S
(alternate)
Cancel o set and zero
G92.1 Coordinate
parameters
Cancel o set and retain
G92.2 Coordinate
parameters
O set coordinate system with
G92.3 Coordinate
saved parameters
Inverse Time Feed Mode. For
G93 Motion
use with rotary axes
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 Motion Constant surface speed
G97 Motion Cancel constant surface speed
Return to initial Z plane after
G98 Canned
canned cycle
Return to initial R plane after
G99 Canned
canned cycle
Get a Powerful G-Code Simulator and Editor to Simplify G-Code Work
M Codes
Code Category Function Notes
M00 M-Code Program Stop (non-optional)
M01 M-Code Optional Stop: Operator Selected to Enable
M02 M-Code End of Program
M03 M-Code Spindle ON (CW Rotation)
M04 M-Code Spindle ON (CCW Rotation)
M05 M-Code Spindle Stop
M06 M-Code Tool Change
M07 M-Code Mist Coolant ON
M08 M-Code Flood Coolant ON
M09 M-Code Coolant OFF
M17 M-Code FADAL subroutine return
M29 M-Code Rigid Tapping Mode on Fanuc Controls
M30 M-Code End of Program, Rewind and Reset Modes
M97 M-Code Haas-Style Subprogram Call
M98 M-Code Subprogram Call
M99 M-Code Return from Subprogram
Bonus: Check Out our Other CNC Cookbooks for More In-Depth CNC Information!
If you’re a CNC Beginnner, check out our CNC Beginner’s Cookbook. It’ll get you up to speed with a solid CNC
foundation fast.
We also have Cookbooks for Feeds and Speeds, G-Code Programming, CNC Manufacturing and Shop
Management, DIY CNC, and don’t forget the CNC Cookbook Blog–with over 4 million visitors a year it’s the most
popular CNC blog by far on the web.
More Resources
Mazatrol Training Classes
Fanuc CNC Training Classes
G Code Commands FAQ
How many G codes are there?
There are about 100 g code commands, give or take. There are many dialects of g-code, and some have proprietary
g-codes.
What are G Codes in CNC Machines?
This page lists all the G code commands and tells what they do and also gives a link to tutorials and examples. G
codes are single letter commands that tell the CNC machine what to do. They may command motion (i.e. tell the
machine where to cut) or do things like turn the spindle on or o .
Is learning G-Code hard?
Learning g-code isn’t very hard. We have a complete free online g-code tutorial to teach you as well as a g-code
simulator that makes learning easy.
Why are G Codes used?
G Codes make CNC Machines programmable, which gives them the exible to make almost any part.
What is the di erence between G codes and M codes?
G-Codes are about Geometry while M-Codes are about Machine functions.
Do all CNC machines use G-code?
Not all CNC machine use G-Code. Some may have both g-code and other ways of programming, for example
alternate languages such as Mazak’s Mazatrol or Conversational Programming. Others, may have an alternate
language and no ability to execute g-code at all.
FREEBIE!
Get a Handy Printable GCode Cheat Sheet
Enter your email below to join our newsletter and download the cheat sheet
First name Enter your email GIMME!
Recently updated on April 27th, 2024 at 01:23 pm
Related Posts:
First Blog
G-Wizard G-Wizard G-Wizard
Post: How G-Wizard G-Wizard G-Wizard
Calculator Calculator Calculator
to Become Calculator Calculator Calculator
Feeds and Feeds and Feeds and
a Blogger Feeds and Feeds and Feeds and
Speeds Speeds Speeds G-Wizard
With Easy Speeds Speeds Speeds
Examples Calculator
Examples Examples Examples Examples Examples Examples
for… for… for… Feeds and
for… for… for…
Speeds
Examples
for…
Get Better Feeds and Speeds Instantly
Get Better Tool Life, Surface Finish, and Material Removal Rates Fast.
It's that easy. You can install and get results in a matter of minutes.
Try G-Wizard Now, It's Free!
Nah, I don't need any Feeds & Speeds Help
Help Desk
? How can we
help you today?
Software CNC Programming Feeds & Speeds Learn
/ GCode Free Trial
GW Calc Calculator Blog
GW Editor CNC Programming Free Calculator CNC With Jaime
Courses Contact Us
GW Thread Calc About Information Hubs
G-Code Simulator
All Material © 2023 GW Estimator Media Guide Free CNC Training
CNC Cookbook, Inc. G-Code / M-Code List
Gearotic Privacy Policy Free Calculators
Conversational Sitemap CNC Dictionary
MeshCAM