Fanuc G-Code List
Fanuc G-Code List (Lathe)
G code        Description
G00           Rapid traverse
G01           Linear interpolation
G02           Circular interpolation CW
G03           Circular interpolation CCW
G04           Dwell
G09           Exact stop
G10           Programmable data input
G20           Input in inch
G21           Input in mm
G22           Stored stroke check function on
G23           Stored stroke check function off
G27           Reference position return check
G28           Return to reference position
G32           Thread cutting
G40           Tool nose radius compensation cancel
G41           Tool nose radius compensation left
G42           Tool nose radius compensation right
G70           Finish machining cycle
G71           Turning cycle
G72           Facing cycle
G73           Pattern repeating cycle
G74           Peck drilling cycle
G75           Grooving cycle
G76           Threading cycle
G92           Coordinate system setting or max. spindle speed setting
G94           Feed Per Minute
G95           Feed Per Revolution
G96           Constant surface speed control
G97           Constant surface speed control cancel
Fanuc G-Code List (Mill)
G code      Description
G00         Rapid traverse
G01         Linear interpolation
G02         Circular interpolation CW
G03         Circular interpolation CCW
G04         Dwell
G17         X Y plane selection
G18         Z X plane selection
G19         Y Z plane selection
G28         Return to reference position
G30         2nd, 3rd and 4th reference position return
G40         Cutter compensation cancel
G41         Cutter compensation left
G42         Cutter compensation right
G43         Tool length compensation + direction
G44         Tool length compensation – direction
G49         Tool length compensation cancel
G53         Machine coordinate system selection
G54         Workpiece coordinate system 1 selection
G55         Workpiece coordinate system 2 selection
G56         Workpiece coordinate system 3 selection
G57         Workpiece coordinate system 4 selection
G58         Workpiece coordinate system 5 selection
G59         Workpiece coordinate system 6 selection
G68         Coordinate rotation
G69         Coordinate rotation cancel
G73         Peck drilling cycle
G74         Left-spiral cutting circle
G76         Fine boring cycle
G80         Canned cycle cancel
G81         Drilling cycle, spot boring cycle
G82         Drilling cycle or counter boring cycle
    G83            Peck drilling cycle
    G84            Tapping cycle
    G85            Boring cycle
    G86            Boring cycle
    G87            Back boring cycle
    G88            Boring cycle
    G89            Boring cycle
    G90            Absolute command
    G91            Increment command
    G92            Setting for work coordinate system or clamp at maximum spindle speed
    G98            Return to initial point in canned cycle
    G99            Return to R point in canned cycle
Fanuc CNC Controls
Following list of g codes applies to following cnc controls as well.
o     Fanuc Series 30i/300i/300is-MODEL A
o     Fanuc Series 31i/310i/310is-MODEL A5
o     Fanuc Series 31i/310i/310is-MODEL A
o     Fanuc Series 32i/320i/320is-MODEL A
Fanuc 31i G Codes
    G Code              Description
    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
    G02.2, G03.2        Involute interpolation CW/CCW
    G02.3, G03.3        Exponential interpolation CW/CCW
    G02.4, G03.4        Three-dimensional coordinate conversion CW/CCW
    G04                 Dwell
    G05                 AI contour control (high-precision contour control compatible command)
G05.1          AI contour control / Nano smoothing / Smooth interpolation
G05.4          HRV3,4 on/off
G06.2          NURBS interpolation
G07            Hypothetical axis interpolation
G07.1 (G107)   Cylindrical interpolation
G08            AI contour control (advanced preview control compatible command)
G09            Exact stop
G10            Programmable data input
G10.6          Tool retract and recover
G10.9          Programmable switching of diameter/radius specification
G11            Programmable data input mode cancel
G12.1          Polar coordinate interpolation mode
G13.1          Polar coordinate interpolation cancel mode
G15            Polar coordinates command cancel
G16            Polar coordinates command
G17            XY plane selection
G18            ZX plane selection
G19            YZ plane selection
G20 (G70)      Input in inch
G21 (G71)      Input in mm
G22            Stored stroke check function on
G23            Stored stroke check function off
G25            Spindle speed fluctuation detection off
G26     Spindle speed fluctuation detection on
G27     Reference position return check
G28     Automatic return to reference position
G29     Movement from reference position
G30     2nd, 3rd and 4th reference position return
G30.1   Floating reference position return
G31     Skip function
G31.8   EGB-axis skip
G33     Threading
G34     Variable lead threading
G35     Circular threading CW
G36     Circular threading CCW
G37     Automatic tool length measurement
G38     Cutter or tool nose radius compensation : preserve vector
G39     Cutter or tool nose radius compensation : corner circular interpolation
        Cutter or tool nose radius compensation : cancel
G40     Three-dimensional cutter compensation : cancel
        Cutter or tool nose radius compensation : left
G41     Three-dimensional cutter compensation : left
G41.2   Cutter compensation for 5-axis machining : left (type 1)
G41.3   Cutter compensation for 5-axis machining : (leading edge offset)
G41.4   Cutter compensation for 5-axis machining : left (type 1) (FS16i-compatible command)
G41.5   Cutter compensation for 5-axis machining : left (type 1) (FS16i-compatible command)
G41.6         Cutter compensation for 5-axis machining : left (type 2)
              Cutter or tool nose radius compensation : right
G42           Three-dimensional cutter compensation : right
G42.2         Cutter compensation for 5-axis machining : right (type 1)
G42.4         Cutter compensation for 5-axis machining : right (type 1) (FS16i-compatible command)
G42.5         Cutter compensation for 5-axis machining : right (type 1) (FS16i-compatible command)
G42.6         Cutter compensation for 5-axis machining : right (type 2)
G40.1         Normal direction control cancel mode
G41.1         Normal direction control on : right
G42.1         Normal direction control on : left
G43           Tool length compensation +
G44           Tool length compensation –
G43.1         Tool length compensation in tool axis direction
G43.4         Tool center point control (type 1)
G43.5         Tool center point control (type 2)
G45           Tool offset increase
G46           Tool offset decrease
G47           Tool offset double increase
G48           Tool offset double decrease
G49 (G49.1)   Tool length compensation cancel
G50           Scaling cancel
G51           Scaling
G50.1         Programmable mirror image cancel
G51.1         Programmable mirror image
G50.2         Polygon turning cancel
G51.2         Polygon turning
G52           Local coordinate system setting
G53           Machine coordinate system setting
G53.1         Tool axis direction control
G54 (G54.1)   Workpiece coordinate system 1 selection
G55           Workpiece coordinate system 2 selection
G56           Workpiece coordinate system 3 selection
G57           Workpiece coordinate system 4 selection
G58           Workpiece coordinate system 5 selection
G59           Workpiece coordinate system 6 selection
G60           Single direction positioning
G61           Exact stop mode
G62           Automatic corner override
G63           Tapping mode
G64           Cutting mode
G65           Macro call
G66           Macro modal call A
G66.1         Macro modal call B
G67           Macro modal call A/B cancel
G68           Coordinate system rotation start or 3-dimensional coordinate conversion mode on
G69     Coordinate system rotation cancel or 3-dimensional coordinate conversion mode off
G68.2   Feature coordinate system selection
G72.1   Figure copy (rotation copy)
G72.2   Figure copy (linear copy)
G73     Peck drilling cycle
G74     Left-handed tapping cycle
G76     Fine boring cycle
G80     Canned cycle cancel
G80.5   Electronic gear box 2 pair: synchronization cancellation
G80.8   Electronic gear box: synchronization cancellation
G81     Drilling cycle or spot boring cycle
G81.1   Chopping
G81.5   Electronic gear box 2 pair: synchronization start
G81.8   Electronic gear box: synchronization start
G82     Drilling cycle or counter boring cycle
G83     Peck drilling cycle
G84     Tapping cycle
G84.2   Rigid tapping cycle (FS15 format)
G84.3   Left-handed rigid tapping cycle (FS15 format)
G85     Boring cycle
G86     Boring cycle
G87     Back boring cycle
G88             Boring cycle
G89             Boring cycle
G90             Absolute programming
G91             Incremental programming
G91.1           Checking the maximum incremental amount specified
G92             Setting for workpiece coordinate system or clamp at maximum spindle speed
G92.1           Workpiece coordinate system preset
G93             Inverse time feed
G94             Feed per minute
G95             Feed per revolution
G96             Constant surface speed control
G97             Constant surface speed control cancel
G98             Canned cycle : return to initial level
G99             Canned cycle : return to R point level
G107            Cylindrical interpolation
G112            Polar coordinate interpolation mode
G113            Polar coordinate interpolation mode cancel
Fanuc M-Code List
Fanuc M-Code List (Lathe)
M code                         Description
M00                            Program stop
M01                            Optional program stop
M02                            End of program
M03                            Spindle start forward CW
M04                            Spindle start reverse CCW
M05                            Spindle stop
M08                            Coolant on
M09                            Coolant off
M29                            Rigid tap mode
M30                            End of program reset
M40                            Spindle gear at middle
M41                            Low Gear Select
M42                            High Gear Select
M68                            Hydraulic chuck close
M69                            Hydraulic chuck open
M78                            Tailstock advancing
M79                            Tailstock reversing
M94                            Mirrorimage cancel
M95                            Mirrorimage of X axis
M98                            Subprogram call
M99                            End of subprogram
Fanuc M-Code List (Mill)
M code           Description
M00              Program stop
M01   Optional program stop
M02   End of program
M03   Spindle start forward CW
M04   Spindle start reverse CCW
M05   Spindle stop
M06   Tool change
M07   Coolant ON – Mist coolant/Coolant thru spindle
M08   Coolant ON – Flood coolant
M09   Coolant OFF
M19   Spindle orientation
M28   Return to origin
M29   Rigid tap
M30   End of program (Reset)
M41   Low gear select
M42   High gear select
M94   Cancel mirrorimage
M95   Mirrorimage of X axis
M96   Mirrorimage of Y axis
M98   Subprogram call
M99   End of subprogram