Anda di halaman 1dari 5

PRODUCTS ABOUT BLOG COOKBOOKS DIY CNC PROJECTS QUESTIONX

Free Trials HELP

G-Code and M-Code Reference List


for Milling
GCode Tools Milling Turning Fanuc Alarm Codes

These are the common g-codes and m-codes for milling that G-Wizard Editor supports for Mills. Code
categories are the groupings for the g-code Wizard (type Ctrl+G for the Wizard). Function tells what the g-
code does, Notes gives a little more information such as the parameters, and Tutorial is a link (if any) to a
tutorial from our Online G-Code Tutorial that uses G-Wizard Editor to teach how to program the g-code.

Pssst! Hey, if you're here looking up g-codes, maybe you'd like to find an easier way.
What could be better than software that tells you exactly what each g-code does in plain
English?

That's what G-Wizard Editor is like.


GCode is complicated.
G-Wizard Editor makes it easy.

Try It Free!

Code Category Function Notes Tutorials

G00 and MDI.


Move in a straight line at rapids XYZ of
G00 Motion Linear Motion: G00 and
speed. endpoint
G01

G01 and MDI.


Move in a straight line at last speed XYZ of
G01 Motion Linear Motion: G00 and
commanded by a (F)eedrate endpoint
G01

XYZ of
endpoint
G02 / G03 Tutorial and
G02 Motion Clockwise circular arc at (F)eedrate IJK relative to
Examples
center

R for radius

G03 Motion Counter-clockwise circular arc at G02 / G03 Tutorial and


(F)eedrate XYZ of Examples
endpoint
IJK relative to
center

R for radius

P for
Precise Timing and Speed:
G04 Motion Dwell: Stop for a specified time. milliseconds Dwell, Exact Stop,
X for seconds Backlash Compensation

G05 Motion FADAL Non-Modal Rapids


Precise Timing and Speed:
G09 Motion Exact stop check Dwell, Exact Stop,
Backlash Compensation

G10 Compensation Programmable parameter input

Turn Polar Coordinates OFF, return G15/G16 Polar


G15 Coordinate
to Cartesian Coordinates Coordinates

G15/G16 Polar
Coordinates
G16 Coordinate Turn Polar Coordinates ON
Polar Coordinate
Calculator

G17 Coordinate Select X-Y plane CNC G-Code Coordinates


G18 Coordinate Select X-Z plane CNC G-Code Coordinates
G19 Coordinate Select Y-Z plane CNC G-Code Coordinates
G20 and G21: Unit
G20 Coordinate Program coordinates are inches
Conversion
G20 and G21: Unit
G21 Coordinate Program coordinates are mm
Conversion
G28: Return to Reference
G27 Motion Reference point return check
Point
G28: Return to Reference
G28 Motion Return to home position
Point
G28: Return to Reference
G29 Motion Return from the reference position
Point
Return to the 2nd, 3rd, and 4th G28: Return to Reference
G30 Motion
reference point Point
Constant lead threading (like G01
G32 Canned
synchronized with spindle)
Tool cutter compensation off (radius
G40 Compensation
comp.)
Tool cutter compensation left (radius
G41 Compensation
comp.)
Tool cutter compensation right
G42 Compensation
(radius comp.)
Apply tool length compensation
G43 Compensation
(plus)
Apply tool length compensation
G44 Compensation
(minus)
G49 Compensation Tool length compensation cancel
G50 Compensation Reset all scale factors to 1.0
G51 Compensation Turn on scale factors
Local workshift for all coordinate
G52 Coordinate
systems: add XYZ offsets
G53 Coordinate Machine coordinate system (cancel
work offsets)
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)
Precise Timing and Speed:
G61 Other Exact stop check mode Dwell, Exact Stop,
Backlash Compensation
G62 Other Automatic corner override
G63 Other Tapping mode
G64 Other Best speed path
G65 Other Custom macro simple call Subprograms and Macros
G68 and G69 Tutorial and
G68 Coordinate Coordinate System Rotation
Examples
G68 and G69 Tutorial and
G69 Coordinate Cancel Coordinate System Rotation
Examples
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, feed
G85 Canned
out
Boring canned cycle, spindle stop,
G86 Canned
rapid out
G87 Canned Back boring canned cycle
Boring canned cycle, spindle stop,
G88 Canned
manual out
G89 Canned Boring canned cycle, dwell, feed out
Absolute programming of XYZ (type
G90 Coordinate
B and C systems)
Absolute programming IJK (type B
G90.1 Coordinate
and C systems)
Incremental programming of XYZ
G91 Coordinate
(type B and C systems)
Incremental programming IJK (type
G91.1 Coordinate
B and C systems)
Offset coordinate system and save
G92 Coordinate
parameters
G92
Motion Clamp of maximum spindle speed S
(alternate)
G92.1 Coordinate Cancel offset and zero parameters
G92.2 Coordinate Cancel offset and retain parameters
Offset coordinate system with saved
G92.3 Coordinate
parameters
G94 Motion Units per minute feed mode. Units in
inches or mm.
Units per revolution feed mode. Units
G95 Motion
in inches or mm.
G96: Constant Surface
G96 Motion Constant surface speed
Speed
G96: Constant Surface
G97 Motion Cancel constant surface speed
Speed
G98 Feeds andReturn
Canned Speedsto initial Z plane after
Calculator: canned
START YOUR FREE TRIAL NOW!
cycle
Return to initial R plane after canned
G99 Canned
cycle

M-Codes
Code Category Function Notes Tutorials

M00 M-Code Program Stop (non-optional)


Optional Stop: Operator Selected to
M01 M-Code
Enable
M02 M-Code End of Program
M03 M-Code Spindle ON (CW Rotation) M03 and MDI.
M04 M-Code Spindle ON (CCW Rotation)
M05 M-Code Spindle Stop M05 and MDI.
M06 M-Code Tool Change
M07 M-Code Mist Coolant ON M07 and MDI.
M08 M-Code Flood Coolant ON M08 and MDI.
M09 M-Code Coolant OFF M09 and MDI.

M17 M-Code FADAL subroutine return


Rigid Tapping Mode on Fanuc
M29 M-Code
Controls
End of Program, Rewind and Reset
M30 M-Code
Modes

M97 M-Code Haas-Style Subprogram Call Subprograms and Macros


M98 M-Code Subprogram Call Subprograms and Macros
M99 M-Code Return from Subprogram Subprograms and Macros

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

Anda mungkin juga menyukai