GHaas G-Code Field Guide Get the book

Haas Mill reference

Haas Mill G-Codes List

The G-codes you will actually meet on a Haas VF, VM, Mini Mill, UMC or Toolroom mill. Tap a highlighted code for its format, an example program and the mistake that scraps parts.

CodeDescriptionDetails
G00Rapid motion positioningDetails →
G01Linear interpolation motionDetails →
G02Circular interpolation CWDetails →
G03Circular interpolation CCWDetails →
G04DwellDetails →
G09Exact stop (non-modal)
G10Set offsetsDetails →
G12Circular pocket milling CWDetails →
G13Circular pocket milling CCW
G17XY plane selectionDetails →
G18XZ plane selection
G19YZ plane selection
G20Inch mode
G21Metric mode
G28Return to machine zeroDetails →
G29Return from reference point
G31Feed until skip (probing)
G35Automatic tool diameter measurement
G36Automatic work offset measurement
G37Automatic tool length measurement
G40Cutter compensation cancel
G41Cutter compensation leftDetails →
G42Cutter compensation rightDetails →
G43Tool length compensation +Details →
G44Tool length compensation −
G47Text engravingDetails →
G49Tool length compensation cancel
G50Cancel scaling
G51Scaling
G52Local coordinate system
G53Machine coordinate moveDetails →
G54Work offset #1 (G54–G59)Details →
G61Exact stop (modal)
G64Exact stop cancel
G65Macro subroutine call
G68Coordinate rotation
G69Rotation cancel
G70Bolt hole circle
G71Bolt hole arc
G72Bolt holes along an angle
G73High-speed peck drillingDetails →
G74Reverse tapping
G76Fine boringDetails →
G77Back bore
G80Canned cycle cancelDetails →
G81Drill canned cycleDetails →
G82Spot drill / counterboreDetails →
G83Normal peck drillingDetails →
G84TappingDetails →
G85Boring (bore in, bore out)
G86Bore and stop
G89Bore in, dwell, bore out
G90Absolute positioningDetails →
G91Incremental positioning
G92Set work coordinate shift
G93Inverse time feed
G94Feed per minute
G95Feed per revolution
G98Canned cycle initial point returnDetails →
G99Canned cycle R plane return
G100Cancel mirror image
G101Enable mirror image
G103Limit block lookahead
G150General purpose pocket milling
G154Extended work offsets P1–P99
G187Smoothness controlDetails →

Most-looked-up Haas mill codes

G00Rapid PositioningMoves the axes at rapid traverse to a position. Used for every non-cutting move: approaches, retracts and repositioning between features.G01Linear Interpolation (Feed Move)Cuts in a straight line at the programmed feed rate F. The workhorse code for profiling, facing and plunging.G02Circular Interpolation ClockwiseCuts a clockwise arc. Define it with an R radius or with I, J, K distances from the start point to the arc centre.G03Circular Interpolation Counter-ClockwiseCuts a counter-clockwise arc using R or I, J, K. The mirror image of G02.G04DwellPauses axis motion for a set time with P. Used to clean up the bottom of a hole or let coolant or a spindle catch up.G10Set Offsets from the ProgramWrites work offsets, tool lengths or diameters into the offset tables directly from a program line.G12Circular Pocket Milling ClockwiseA Haas canned cycle that mills a round pocket from the centre out. G12 cuts clockwise, G13 counter-clockwise.G17XY Plane SelectionSelects the XY plane for arcs, cutter comp and canned cycles. The default on a mill.G28Return to Machine ZeroSends axes to machine home. Most commonly used as G91 G28 Z0. to retract Z before a tool change or at program end.G41Cutter Compensation LeftOffsets the tool to the left of the programmed path by the radius in the D register. Climb milling with a right-hand tool.G42Cutter Compensation RightOffsets the tool to the right of the programmed path by the D value. Conventional milling with a right-hand cutter.G43Tool Length Compensation +Applies the tool length offset stored in register H so Z positions are measured from the tool tip.G47Text EngravingEngraves text or an auto-incrementing serial number from a single program line.G53Machine Coordinate MoveA one-line move in machine coordinates, ignoring work offsets. G53 Z0 is a clean, direct retract.G54Work Coordinate System #1Selects work offset #1 so program zero is where you set it on the part. G54–G59, then G154 P1–P99 for more.G73High-Speed Peck Drilling CyclePecks with a small retract to break the chip instead of pulling out of the hole. Faster than G83 for moderate depths.G76Fine Boring CycleBores to depth, orients the spindle, shifts the tool off the wall and retracts so the bore is not scored.G80Canned Cycle CancelTurns off any active drilling, tapping or boring cycle. Put it after every cycle and in the safe-start line.G81Drill Canned CycleFeeds to depth and rapids out. The simplest drilling cycle for spot drills, shallow holes and centre drilling.G82Spot Drill / Counterbore CycleLike G81 but dwells at the bottom for P seconds. Gives clean, consistent spot-drill and counterbore floors.G83Normal Peck Drilling CyclePecks by Q and retracts to the R plane every peck to clear chips. The go-to cycle for deep holes.G84Tapping Canned CycleRigid taps a right-hand thread: feeds in synchronised with the spindle, reverses, and feeds out.G90Absolute PositioningPositions are measured from part zero. The default and the safe choice for almost everything.G98Canned Cycle Initial Point ReturnAfter each hole, retracts to the Z height the tool was at before the cycle started. Clears clamps between holes.G187Smoothness ControlTrades speed against accuracy on contoured paths. P1 rough, P2 medium, P3 finish, with E corner tolerance.

Independent reference. Not affiliated with, sponsored by or endorsed by Haas Automation, Inc. Haas is a trademark of its respective owner. Always confirm codes against your machine's operator manual — options and settings vary by model and software version.