INTUWIZ                    Intuitive Wizard
   Bookmark and Share  CNC G Codes and CNC M-codes                                                               

CNC G-Code and CNC M-code are instructions to the varius CNC machine tools (CNC Mills, CNC Lathes, CNC Routers etc).

G-code (also RS-274) is used in computer-aided manufacturing (CAM-systems) to control CNC equipment.

G-code and M-codes instructions are provided to a computer numerical control machine controller (pre-read in the interpreter) that controls the stepper motors or servo motors..

These are the common G-codes and M-codes for machining. 

 

 G-codes (Preparatory Functions)

 G00
Rapid positioning.Move in a straight line at rapids speed.
Read more.


 G01
Linear interpolation.Move in a straight line at last speed commanded by a feedrate.
Read more.


 G02
Clockwise circular interpolation.
Read more.


 G03
Counter-clockwise circular interpolation.
Read more.


 G04
Dwell.Stop for a specified period (may be X, U, or P).
Read more.


 G09
Exact Stop.
Read more.


 G12
Circular interpolation clockwise using the current coordinates of the machine as the center of the circle.
Read more.


 G13
Counterclockwise circular interpolation using the current coordinates as the center of the circle.
Read more.


 G17
Set XY plane.
Read more.


 G18
Set XZ plane.
Read more.


 G19
Set YZ plane.
Read more.


 G20
Inch units.
Programming in inches (in)
.
Read more.


 G21
Metric units.
Programming in millimeters (mm).
Read more.


 G28
Home all axes.Return to home position (go to CNC machine zero).
Read more.
 G30
Home all axes(secondary).Return to secondary home position (go to CNC machine zero (secondary)).
 G31
Probe move.
 G33
Single pass threading.
 G40
Tool radius compensation off.
Read more.


 G41
Tool radius compensation left.
Read more.


 G42
Tool radius compensation right.
Read more.


 G43
Tool height offset compensation positive.
Read more.


 G44
Tool height offset compensation negative.
Read more.


 G49
Cancel tool offset.Cancels tool offset set by G43 or G44.
Read more.


 G50
Cancels scaling/mirroiring.
Read more.


 G51
Scaling/Mirroring Mode.
Read more.


 G53
Machine coordinate system.
Move in Machine Coordinates.
Read more.


 G54-G59
Work Coordinate Systems.
 G61
Exact Stop Mode Command.
Read more.


 G68
Coordinate System Rotation.
Read more.


 G69
Coordinate System Rotation Cancel.
Read more.


 G70
Bolt Hole Circle.
Read more.


 G71
Bolt Hole Arc.
Read more.


 G72
Bolt Holes Along an Angle.
Read more.


 G80
Cancel canned cycle (Motion mode cancel ).
 G81
Drilling cycle.
Read more.


 G82
Counter Boring Cycle (Drilling Cycle with dwel).
Read more.


 G83
Drill cycle with peck (full retraction from pecks).
Read more.

 G84
Tapping Cycle.
Read more.


 G85
Boring Cycle.
Read more.


 G86
Boring Cycle for rough holes.
Read more.


 G90
Absolute coordinate (Absolute CNC programming).
 G91
Incremental coordinate (Incremental CNC programming).
 G94
Feedrate per minute (Inches/millimeters per minute).
Read more.


 G95
Feedrate per revolution (Inches/millimeters per revolution).
Read more.


 G97
(G97 S) Set spindle rev/min (rpm).

 

 

M-codes (Miscellaneous Functions)

 M00
Automatic stop (CNC program end).
Read more.


  M01
Optional stop (Sleep).
Read more.


  M02
End of CNC program.
Read more.


  M03
Spindle on clockwise.
Read more.
  M04
Spindle on counterclockwise.
Read more.
  M05
Spindle off.
  M06
Tool change.
  M07
Coolant A on (mist).
  M08
Coolant B on (flood).
  M09
All coolant off.
  M10
Pallet clamp (Vacuum) on.
  M11
Pallet clamp (Vacuum) off.
  M30
End of tape (End of CNC program, with return to CNC program top).
Read more.

 

Useful links:

1. Free online G-code generators for a various geometric shapes.
2. Free online G-code generators for facing.     
3. Free online G-code generators for drilling.    
4. Free online G-code generators for engraving.    
5. Offline Windows program - Intuwiz G-code Generator.

Generate a G-Code toolpath for a various  details

 

Copyright © Intuwiz  Software 2023 All Righs Reserved.
Home | Articles | CNC G Codes (Preparatory Functions) and CNC M-codes (Miscellaneous Functions)