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)

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

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

Clockwise circular interpolation.
Read more.

Counter-clockwise circular interpolation.
Read more.

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

Exact Stop.
Read more.

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

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

Set XY plane.
Read more.

Set XZ plane.
Read more.

Set YZ plane.
Read more.

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

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

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

Tool radius compensation left.
Read more.

Tool radius compensation right.
Read more.

Tool height offset compensation positive.
Read more.

Tool height offset compensation negative.
Read more.

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

Cancels scaling/mirroiring.
Read more.

Scaling/Mirroring Mode.
Read more.

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

Work Coordinate Systems.
Exact Stop Mode Command.
Read more.

Coordinate System Rotation.
Read more.

Coordinate System Rotation Cancel.
Read more.

Bolt Hole Circle.
Read more.

Bolt Hole Arc.
Read more.

Bolt Holes Along an Angle.
Read more.

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

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

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

Tapping Cycle.
Read more.

Boring Cycle.
Read more.

Boring Cycle for rough holes.
Read more.

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

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

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



M-codes (Miscellaneous Functions)

Automatic stop (CNC program end).
Read more.

Optional stop (Sleep).
Read more.

End of CNC program.
Read more.

Spindle on clockwise.
Read more.
Spindle on counterclockwise.
Read more.
Spindle off.
Tool change.
Coolant A on (mist).
Coolant B on (flood).
All coolant off.
Pallet clamp (Vacuum) on.
Pallet clamp (Vacuum) off.
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)