G-codes are also called preparatory codes (preparatory functions).
Contents
- Complete G Code List
- G00 Positioning (Rapid traverse)
- G01 Linear interpolation (Cutting feed)
- G02 Circular interpolation CW or helical interpolation CW
- G03 Circular interpolation CCW or helical interpolation CCW
- G04 Dwell
- G10 Programmable data input
- G20 Input in inch
- G21 Input in mm
- G32 Thread cutting
- G33 Thread Cutting
- G70 Finishing cycle
- G71 Stock removal in turning
- G72 Stock removal in facing
- G73 Pattern repeating
- G74 End face peck drilling
- G75 Outer diameter/internal diameter drilling
- G76 Multiple threading cycle
- G92 Thread cutting cycle
- G94 Facing Cycle (Endface turning cycle)
- G94 Feed Per Minute / G98 Feed Per Minute
- G95 Feed Per Revolution / G99 Feed Per Revolution
Complete G Code List
List of G-codes commonly found on Fanuc and similarly designed CNC controls
G Code | Group | Function | ||
A | B | C | ||
G00 | G00 | G00 | 01 | Positioning (Rapid traverse) |
G01 | G01 | G01 | Linear interpolation (Cutting feed) | |
G02 | G02 | G02 | Circular interpolation CW or helical interpolation CW | |
G03 | G03 | G03 | Circular interpolation CCW or helical interpolation CCW | |
G04 | G04 | G04 | 00 | Dwell |
G07.1(G107) | G07.1(G107) | G07.1(G107) | Cylindrical interpolation | |
G08 | G08 | G08 | Advanced preview control | |
G10 | G10 | G10 | Programmable data input | |
G11 | G11 | G11 | Programmable data input cancel | |
G12.1(G112) | G12.1(G112) | G12.1(G112) | 21 | Polar coordinate interpolation mode |
G13.1(G113) | G13.1(G113) | G13.1(G113) | Polar coordinate interpolation cancel mode | |
G17 | G17 | G17 | 16 | X Y plane selection |
G18 | G18 | G18 | Z X plane selection | |
G19 | G19 | G19 | Y Z plane selection | |
G20 | G20 | G70 | 06 | Input in inch |
G21 | G21 | G71 | Input in mm | |
G22 | G22 | G22 | 09 | Stored stroke check function on |
G23 | G23 | G23 | Stored stroke check function off | |
G25 | G25 | G25 | 08 | Spindle speed fluctuation detection off |
G26 | G26 | G26 | Spindle speed fluctuation detection on | |
G27 | G27 | G27 | 00 | Reference position return check |
G28 | G28 | G28 | Return to reference position | |
G30 | G30 | G30 | 2nd, 3rd and 4th reference position return | |
G31 | G31 | G31 | Skip function | |
G32 | G33 | G33 | 01 | Thread cutting |
G34 | G34 | G34 | Variable—lead thread cutting | |
G36 | G36 | G36 | 00 | Automatic tool compensation X |
G37 | G37 | G37 | Automatic tool compensation Z | |
G40 | G40 | G40 | 07 | Tool nose radius compensation cancel |
G41 | G41 | G41 | Tool nose radius compensation left | |
G42 | G42 | G42 | Tool nose radius compensation right | |
G50 | G92 | G92 | 00 | Coordinate system setting or max. spindle speed setting |
G50.3 | G92.1 | G92.1 | Workpiece coordinate system preset | |
G50.2(G250) | G50.2(G250) | G50.2(G250) | 20 | Polygonal turning cancel |
G51.2(G251) | G51.2(G251) | G51.2(G251) | Polygonal turning | |
G52 | G52 | G52 | 00 | Local coordinate system setting |
G53 | G53 | G53 | Machine coordinate system setting | |
G54 | G54 | G54 | 14 | Workpiece coordinate system 1 selection |
G55 | G55 | G55 | Workpiece coordinate system 2 selection | |
G56 | G56 | G56 | Workpiece coordinate system 3 selection | |
G57 | G57 | G57 | Workpiece coordinate system 4 selection | |
G58 | G58 | G58 | Workpiece coordinate system 5 selection | |
G59 | G59 | G59 | Workpiece coordinate system 6 selection | |
G65 | G65 | G65 | 00 | Macro calling |
G66 | G66 | G66 | 12 | Macro modal call |
G67 | G67 | G67 | Macro modal call cancel | |
G68 | G68 | G68 | 04 | Mirror image for double turrets ON |
G69 | G69 | G69 | Mirror image for double turrets OFF | |
G70 | G70 | G72 | 00 | Finishing cycle |
G71 | G71 | G73 | Stock removal in turning | |
G72 | G72 | G74 | Stock removal in facing | |
G73 | G73 | G75 | Pattern repeating | |
G74 | G74 | G76 | End face peck drilling | |
G75 | G75 | G77 | Outer diameter/internal diameter drilling | |
G76 | G76 | G78 | Multiple threading cycle | |
G80 | G80 | G80 | 10 | Canned cycle for drilling cancel |
G83 | G83 | G83 | Cycle for face drilling | |
G84 | G84 | G84 | Cycle for face tapping | |
G86 | G86 | G86 | Cycle for face boring | |
G87 | G87 | G87 | Cycle for side drilling | |
G88 | G88 | G88 | Cycle for side tapping | |
G89 | G89 | G89 | Cycle for side boring | |
G90 | G77 | G20 | 01 | Outer diameter/internal diameter cutting cycle |
G92 | G78 | G21 | Thread cutting cycle | |
G94 | G79 | G24 | Endface turning cycle | |
G96 | G96 | G96 | 02 | Constant surface speed control |
G97 | G97 | G97 | Constant surface speed control cancel | |
G98 | G94 | G94 | 05 | Per minute feed |
G99 | G95 | G95 | Per revolution feed | |
– | G90 | G90 | 03 | Absolute programming |
– | G91 | G91 | Incremental programming | |
– | G98 | G98 | 11 | Return to initial level |
– | G99 | G99 | Return to R point level |
G00 Positioning (Rapid traverse)
G01 Linear interpolation (Cutting feed)
- CNC G Code Introduction for CNC Programmers
- CNC Programming for Beginners a Simple CNC Programming Example
- Lathe CNC Programming Example
G02 Circular interpolation CW or helical interpolation CW
- CNC Programming for Beginners a CNC Programming Example
- CNC Lathe Programming Example
- CNC Circular Interpolation Tutorial G02 G03
G03 Circular interpolation CCW or helical interpolation CCW
G04 Dwell
G10 Programmable data input
G20 Input in inch
G21 Input in mm
G32 Thread cutting
G32 Taper Threading
G33 Thread Cutting
G70 Finishing cycle
- CNC Programming Example with Fanuc G71 Rough Turning Cycle and G70
- Fanuc G70 G71 Rough and Finish Turning Cycle Program Example
G71 Stock removal in turning
- CNC Fanuc G71 Turning Cycle or Stock Removal Canned Cycle
- G71 Rough Turning Cycle One-line Format
- CNC Programming Example with Fanuc G71 Rough Turning Cycle and G70
- Fanuc G70 G71 Rough and Finish Turning Cycle Program Example
G72 Stock removal in facing
G73 Pattern repeating
G74 End face peck drilling
Peck drilling in Z axis.
G74 Peck Drilling Cycle
G74 Face Grooving
G75 Outer diameter/internal diameter drilling
Grooving in X axis.
- CNC Fanuc G75 Grooving Cycle
- Fanuc G75 Grooving Cycle CNC Program Example
- G75 Canned Cycle Grooving CNC Programming Example
G76 Multiple threading cycle
Thread cutting cycle, G76 threading cycle, Fanuc G76 threading cycle, G76 thread cycle.
G76 Threading Cycle One Line Format
G76 Taper Threading
G76 Multi Start Threading
G76 Thread Infeed
G92 Thread cutting cycle
CNC Fanuc G92 Threading Cycle, G92 thread cutting cycle.