G Codes

Fanuc CNC G-Codes List

Fanuc CNC – Complete G-Codes List (English)

G-Code Function Description
G00Rapid positioningMoves the tool quickly between positions without cutting
G01Linear interpolationStraight-line cutting movement
G02Circular interpolation (CW)Circular movement in clockwise direction
G03Circular interpolation (CCW)Circular movement in counterclockwise direction
G04DwellPauses for a specified time (P = time)
G05High-precision contour controlUsed for fine contouring and high-accuracy profiles
G09Exact stopStops exactly at the end of block before next move
G10Programmable data inputUsed to input offsets or settings via program
G17Select XY planeUsed in milling – selects XY plane
G18Select ZX planeUsed in turning – selects ZX plane
G19Select YZ planeUsed in milling – selects YZ plane
G20Programming in inchesSets units to inches
G21Programming in millimetersSets units to millimeters
G28Return to machine zeroMoves tool to machine home position
G30Return to secondary home positionGoes to second home position if configured
G31Skip functionUsed in probing – skips when signal is triggered
G32Thread cutting (manual)Manual threading in turning
G33Thread cutting cycleAutomatic threading cycle
G40Cancel cutter compensationTurns off G41/G42 cutter radius compensation
G41Cutter compensation leftTool compensates to the left of programmed path
G42Cutter compensation rightTool compensates to the right of programmed path
G43Tool length compensation (positive)Positive tool length offset using H register
G44Tool length compensation (negative)Negative tool length offset
G49Cancel tool length compensationCancels tool length offset
G50Cancel CSS / Set spindle speed limitCancels constant surface speed mode (turning)
G52Local coordinate system shiftTemporary shift in coordinate system
G53Machine coordinate positioningMove using machine’s fixed coordinate system
G54–G59Work coordinate systemsUsed for setting different part zero positions
G61Exact stop modeStops precisely at end point of each block
G64Default cutting modeContinuous cutting mode (default for smooth tool motion)
G70Finishing cycleFinal finishing cut (turning)
G71Rough turning cycleRemoves large amounts of material (turning)
G72Finishing cycleFinal pass over profile (turning)
G73High-speed peck drillingFast peck drilling (milling)
G74Face grooving / Left tappingPeck face grooving (turning)
G75Peck grooving cycle (backward)Groove cycle in reverse direction (turning)
G76Fine threading cycleAutomatic multi-pass threading
G80Cancel canned cycleCancels G81–G89 cycles
G81Drilling cycleSimple drilling operation
G82Drilling with dwellDrill and pause at bottom of hole
G83Peck drilling cycleUsed for deep holes – drills, backs off, continues
G84Right-hand tappingTapping cycle for right-hand threads
G85Boring cycleBasic boring cycle without dwell or peck
G86–G89Advanced boring/tapping cyclesBoring with stop, retract, or dwell features
G90Absolute programmingAll coordinates are from fixed reference (zero point)
G91Incremental programmingCoordinates based on previous point (relative)
G92Position register / Thread limitSet current position to a specific value / Threading limit (lathe)
G94Feed per minuteFeedrate is in mm/min or inch/min
G95Feed per revolutionFeedrate is in mm/rev or inch/rev
G96Constant surface speed (CSS)Adjusts spindle speed to maintain surface speed
G97Cancel CSS (use RPM)Sets spindle to fixed RPM
G98Return to initial point in cycleAfter canned cycle, returns to start position
G99Return to R-point in cycleAfter canned cycle, returns to R level