Controller reference

Haas G-Code and M-Code List (VF Mills & ST Lathes)

79 G-codes and 27 M-codes explained for Haas controls.

Haas controls (NGC) use Fanuc-compatible G-codes plus their own conveniences: G12/G13 circular pockets, G150 general pocketing, G154 extended work offsets, G187 smoothness, mirror image with G100/G101, M97 local subprograms and 5-axis functions G234 (TCPC) and G254 (DWO). Rigid tapping is automatic with G84.

Haas G-codes (79)

CodeFunctionMachine
G00Rapid PositioningBoth
G01Linear Interpolation (Feed Move)Both
G02Circular Interpolation ClockwiseBoth
G03Circular Interpolation Counter-ClockwiseBoth
G04DwellBoth
G09Exact Stop (one block)Both
G10Programmable Data Input (Set Offsets)Both
G12Circular Pocket Milling CW (Haas) / Polar Interpolation (Lathe G12.1)Mill
G13Circular Pocket Milling CCW (Haas) / Cancel Polar Interpolation (G13.1)Mill
G15Polar Coordinate Command CancelMill
G16Polar Coordinate CommandMill
G17XY Plane SelectionMill
G18XZ Plane SelectionBoth
G19YZ Plane SelectionMill
G20Inch InputBoth
G21Metric InputBoth
G28Return to Reference Point (Machine Home)Both
G31Skip Function (Probing Move)Both
G37Automatic Tool Length MeasurementBoth
G40Cutter Radius Compensation CancelBoth
G41Cutter Radius Compensation LeftBoth
G42Cutter Radius Compensation RightBoth
G43Tool Length Compensation (+)Mill
G44Tool Length Compensation (−)Mill
G49Tool Length Compensation CancelMill
G50Max Spindle Speed Clamp (Lathe) / Scaling Cancel (Mill)Both
G51ScalingMill
G52Local Coordinate SystemBoth
G53Machine Coordinate System (One Block)Both
G54Work Coordinate System 1Both
G55Work Coordinate System 2Both
G56Work Coordinate System 3Both
G57Work Coordinate System 4Both
G58Work Coordinate System 5Both
G59Work Coordinate System 6Both
G61Exact Stop ModeBoth
G64Cutting Mode (Continuous Path)Both
G65Macro Call (Non-Modal)Both
G68Coordinate System RotationMill
G69Coordinate Rotation CancelMill
G70Finishing Cycle (Lathe)Lathe
G71Stock Removal in Turning (Roughing Cycle)Lathe
G72Stock Removal in FacingLathe
G73Pattern Repeating (Lathe) / High-Speed Peck Drilling (Mill)Both
G74Left-Hand Tapping (Mill) / Face Peck Drilling (Lathe)Both
G75Grooving Cycle (Lathe X)Lathe
G76Threading Cycle (Lathe) / Fine Boring (Mill)Both
G80Cancel Canned CycleBoth
G81Drilling Cycle (Spot Drill)Mill
G82Drilling Cycle with Dwell (Counterbore / Spot)Mill
G83Peck Drilling Cycle (Deep Hole)Mill
G84Tapping Cycle (Right-Hand)Mill
G85Boring Cycle (Feed In, Feed Out)Mill
G86Boring Cycle (Spindle Stop, Rapid Out)Mill
G87Back Boring CycleMill
G88Boring Cycle (Dwell, Manual Retract)Mill
G89Boring Cycle (Dwell, Feed Out)Mill
G90Absolute Programming (Mill) / OD Turning Cycle (Lathe)Both
G91Incremental ProgrammingMill
G92Coordinate System Setting (Mill) / Threading Cycle (Lathe)Both
G93Inverse Time FeedMill
G94Feed per Minute (Mill) / Facing Cycle (Lathe)Both
G95Feed per Revolution (Mill)Mill
G96Constant Surface Speed (CSS)Lathe
G97Constant RPM (CSS Cancel)Lathe
G98Initial Plane Return (Mill) / Feed per Minute (Lathe)Both
G99R-Plane Return (Mill) / Feed per Revolution (Lathe)Both
G101Mirror Image On (Haas)Mill
G103Limit Block Look-Ahead (Haas)Mill
G107Cylindrical Mapping / InterpolationBoth
G112Polar Coordinate Interpolation On (Lathe)Lathe
G1413D Cutter Compensation (Haas)Mill
G1435-Axis Tool Length Compensation (Haas)Mill
G150General Purpose Pocket Milling (Haas)Mill
G154Additional Work Offsets (Haas)Mill
G187Smoothness / Accuracy Control (Haas)Mill
G234Tool Centre Point Control (Haas TCPC)Mill
G254Dynamic Work Offset (Haas DWO)Mill
G268Feature Coordinate System (Haas Tilted Plane)Mill

Haas M-codes (27)

CodeFunctionMachine
M00Program StopBoth
M01Optional StopBoth
M02End of ProgramBoth
M03Spindle On ClockwiseBoth
M04Spindle On Counter-ClockwiseBoth
M05Spindle StopBoth
M06Tool ChangeMill
M07Mist Coolant OnBoth
M08Flood Coolant OnBoth
M09Coolant OffBoth
M10Clamp / Brake On (builder specific)Both
M11Clamp / Brake Off (builder specific)Both
M19Spindle OrientationBoth
M30Program End and RewindBoth
M31Chip Conveyor Forward (Haas)Both
M33Chip Conveyor Stop (Haas)Both
M50Pallet Change Sequence (Haas)Mill
M83Auto Air Jet On (Haas)Mill
M84Auto Air Jet Off (Haas)Mill
M88Through-Spindle Coolant On (Haas)Mill
M89Through-Spindle Coolant Off (Haas)Mill
M95Sleep Mode (Haas)Both
M96Jump if Input Is Zero (Haas)Both
M97Local Subprogram Call (Haas)Both
M98Subprogram CallBoth
M99Subprogram Return / LoopBoth
M109Interactive User Input (Haas)Both

Options, machine builders and software versions change which codes are available. Always confirm in the programming manual for your exact machine.

Other controls