0% found this document useful (0 votes)
112 views

Gcode & M Code

The document contains a table listing various G-codes used in CNC machining. The G-codes are categorized and each provides a brief description of its function and related notes or tutorials. Some key G-codes include G00 for rapid linear motion, G01 for linear motion at a programmed feedrate, G02 and G03 for clockwise and counter-clockwise circular arcs, and G28 for returning to the machine's home position.

Uploaded by

jayanth.rao
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views

Gcode & M Code

The document contains a table listing various G-codes used in CNC machining. The G-codes are categorized and each provides a brief description of its function and related notes or tutorials. Some key G-codes include G00 for rapid linear motion, G01 for linear motion at a programmed feedrate, G02 and G03 for clockwise and counter-clockwise circular arcs, and G28 for returning to the machine's home position.

Uploaded by

jayanth.rao
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Code Category Function Notes Tutorials  

G00 and MDI.


Move in a straight line at XYZ of
  G00 Motion  
rapids speed. endpoint Linear Motion: G00
and G01
G01 and MDI.
Move in a straight line at last
XYZ of
  G01 Motion speed commanded by a  
endpoint Linear Motion: G00
(F)eedrate
and G01
XYZ of
endpoint
Clockwise circular arc at G02 / G03 Tutorial
  G02 Motion IJK relative  
(F)eedrate and Examples
to center

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  

  M00 M-Code Program Stop (non-optional)      


Optional Stop: Operator
  M01 M-Code      
Selected to 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
  M30 M-Code      
Reset Modes
           
Subprograms and
  M97 M-Code Haas-Style Subprogram Call    
Macros
Subprograms and
  M98 M-Code Subprogram Call    
Macros
Subprograms and
  M99 M-Code Return from Subprogram  
Macros

You might also like