<< Click to Display Table of Contents >> Navigation: Background Theory > Exporting Data > CNC > G Codes |
Essential G Codes in CNC Programming
While all G codes have specific uses and functions, a few are used more frequently due to their importance in machining processes. Here are some of the most commonly used G codes:
G00 – Rapid Positioning
G00 quickly moves the machine to a specified location using the shortest possible path. All axes move simultaneously to reach the target coordinates in a straight line, but this movement is not done at a cutting feed rate—it's designed for speed rather than precision cutting.
G01 – Linear Interpolation
G01 directs the machine to move in a straight line at a controlled feed rate, which is set using the F function. Before using G01, define the target X, Y, and Z coordinates to guide the linear motion. The machine then calculates and follows this straight path at the specified feed speed.
G02 – Clockwise Circular Interpolation
G02 commands the machine to move in a clockwise arc. To use it, specify the arc’s center (usually via I and J values) and the endpoint of the arc. The starting point is automatically taken as the end of the previous motion command, ensuring a continuous path.
CNC G Codes list
G01 Linear interpolation using a feed rate
G02 Circular interpolation clockwise
G03 Circular interpolation, counterclockwise
G04 Dwell
G10 Set working datum position
G17 Select X-Y plane
G18 Select Z-X plane
G19 Select Z-Y plane
G20 Imperial units
G21 Metric units
G27 Reference return check
G28 Automatic return through reference point
G29 Move to a location through reference point
G31 Skip function
G32 Thread cutting operation on a Lathe
G33 Thread cutting operation on a Mill
G40 Cancel cutter compensation
G41 Cutter compensation left
G42 Cutter compensation right
G43 Tool length compensation
G44 Tool length compensation
G50 Set coordinate system (Mill) and maximum RPM (Lathe)
G52 Local coordinate system setting
G53 Machine coordinate system setting
G54~G59 Set Datum
G70 Finish cycle (Lathe)
G71 Rough turning cycle (Lathe)
G72 Rough facing cycle (Lathe)
G73 Pattern Repeating Cycle
G74 Left hand tapping Mill
G74 Face grooving cycle
G75 OD groove pecking cycle (Lathe)
G76 Boring cycle
G76 Screw cutting cycle (Lathe)
G80 Cancel cycles
G81 Drill cycle
G82 Drill cycle with dwell
G83 Peck drilling cycle
G84 Tapping cycle
G85 Bore in, bore out
G86 Bore in, rapid out
G87 Back boring cycle
G90 Absolute programming
G91 Incremental programming
G92 Reposition origin point
G92 Screw thread cutting cycle (Lathe)
G94 Per minute feed
G95 Per revolution feed
G96 Constant surface speed (Lathe)
G97 Constant surface speed cancel
G98 Feed per minute (Lathe)
G99 Feed per revolution (Lathe)Enter topic text here.