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)
| Code | Function | Machine |
|---|---|---|
G00 | Rapid Positioning | Both |
G01 | Linear Interpolation (Feed Move) | Both |
G02 | Circular Interpolation Clockwise | Both |
G03 | Circular Interpolation Counter-Clockwise | Both |
G04 | Dwell | Both |
G09 | Exact Stop (one block) | Both |
G10 | Programmable Data Input (Set Offsets) | Both |
G12 | Circular Pocket Milling CW (Haas) / Polar Interpolation (Lathe G12.1) | Mill |
G13 | Circular Pocket Milling CCW (Haas) / Cancel Polar Interpolation (G13.1) | Mill |
G15 | Polar Coordinate Command Cancel | Mill |
G16 | Polar Coordinate Command | Mill |
G17 | XY Plane Selection | Mill |
G18 | XZ Plane Selection | Both |
G19 | YZ Plane Selection | Mill |
G20 | Inch Input | Both |
G21 | Metric Input | Both |
G28 | Return to Reference Point (Machine Home) | Both |
G31 | Skip Function (Probing Move) | Both |
G37 | Automatic Tool Length Measurement | Both |
G40 | Cutter Radius Compensation Cancel | Both |
G41 | Cutter Radius Compensation Left | Both |
G42 | Cutter Radius Compensation Right | Both |
G43 | Tool Length Compensation (+) | Mill |
G44 | Tool Length Compensation (−) | Mill |
G49 | Tool Length Compensation Cancel | Mill |
G50 | Max Spindle Speed Clamp (Lathe) / Scaling Cancel (Mill) | Both |
G51 | Scaling | Mill |
G52 | Local Coordinate System | Both |
G53 | Machine Coordinate System (One Block) | Both |
G54 | Work Coordinate System 1 | Both |
G55 | Work Coordinate System 2 | Both |
G56 | Work Coordinate System 3 | Both |
G57 | Work Coordinate System 4 | Both |
G58 | Work Coordinate System 5 | Both |
G59 | Work Coordinate System 6 | Both |
G61 | Exact Stop Mode | Both |
G64 | Cutting Mode (Continuous Path) | Both |
G65 | Macro Call (Non-Modal) | Both |
G68 | Coordinate System Rotation | Mill |
G69 | Coordinate Rotation Cancel | Mill |
G70 | Finishing Cycle (Lathe) | Lathe |
G71 | Stock Removal in Turning (Roughing Cycle) | Lathe |
G72 | Stock Removal in Facing | Lathe |
G73 | Pattern Repeating (Lathe) / High-Speed Peck Drilling (Mill) | Both |
G74 | Left-Hand Tapping (Mill) / Face Peck Drilling (Lathe) | Both |
G75 | Grooving Cycle (Lathe X) | Lathe |
G76 | Threading Cycle (Lathe) / Fine Boring (Mill) | Both |
G80 | Cancel Canned Cycle | Both |
G81 | Drilling Cycle (Spot Drill) | Mill |
G82 | Drilling Cycle with Dwell (Counterbore / Spot) | Mill |
G83 | Peck Drilling Cycle (Deep Hole) | Mill |
G84 | Tapping Cycle (Right-Hand) | Mill |
G85 | Boring Cycle (Feed In, Feed Out) | Mill |
G86 | Boring Cycle (Spindle Stop, Rapid Out) | Mill |
G87 | Back Boring Cycle | Mill |
G88 | Boring Cycle (Dwell, Manual Retract) | Mill |
G89 | Boring Cycle (Dwell, Feed Out) | Mill |
G90 | Absolute Programming (Mill) / OD Turning Cycle (Lathe) | Both |
G91 | Incremental Programming | Mill |
G92 | Coordinate System Setting (Mill) / Threading Cycle (Lathe) | Both |
G93 | Inverse Time Feed | Mill |
G94 | Feed per Minute (Mill) / Facing Cycle (Lathe) | Both |
G95 | Feed per Revolution (Mill) | Mill |
G96 | Constant Surface Speed (CSS) | Lathe |
G97 | Constant RPM (CSS Cancel) | Lathe |
G98 | Initial Plane Return (Mill) / Feed per Minute (Lathe) | Both |
G99 | R-Plane Return (Mill) / Feed per Revolution (Lathe) | Both |
G101 | Mirror Image On (Haas) | Mill |
G103 | Limit Block Look-Ahead (Haas) | Mill |
G107 | Cylindrical Mapping / Interpolation | Both |
G112 | Polar Coordinate Interpolation On (Lathe) | Lathe |
G141 | 3D Cutter Compensation (Haas) | Mill |
G143 | 5-Axis Tool Length Compensation (Haas) | Mill |
G150 | General Purpose Pocket Milling (Haas) | Mill |
G154 | Additional Work Offsets (Haas) | Mill |
G187 | Smoothness / Accuracy Control (Haas) | Mill |
G234 | Tool Centre Point Control (Haas TCPC) | Mill |
G254 | Dynamic Work Offset (Haas DWO) | Mill |
G268 | Feature Coordinate System (Haas Tilted Plane) | Mill |
Haas M-codes (27)
| Code | Function | Machine |
|---|---|---|
M00 | Program Stop | Both |
M01 | Optional Stop | Both |
M02 | End of Program | Both |
M03 | Spindle On Clockwise | Both |
M04 | Spindle On Counter-Clockwise | Both |
M05 | Spindle Stop | Both |
M06 | Tool Change | Mill |
M07 | Mist Coolant On | Both |
M08 | Flood Coolant On | Both |
M09 | Coolant Off | Both |
M10 | Clamp / Brake On (builder specific) | Both |
M11 | Clamp / Brake Off (builder specific) | Both |
M19 | Spindle Orientation | Both |
M30 | Program End and Rewind | Both |
M31 | Chip Conveyor Forward (Haas) | Both |
M33 | Chip Conveyor Stop (Haas) | Both |
M50 | Pallet Change Sequence (Haas) | Mill |
M83 | Auto Air Jet On (Haas) | Mill |
M84 | Auto Air Jet Off (Haas) | Mill |
M88 | Through-Spindle Coolant On (Haas) | Mill |
M89 | Through-Spindle Coolant Off (Haas) | Mill |
M95 | Sleep Mode (Haas) | Both |
M96 | Jump if Input Is Zero (Haas) | Both |
M97 | Local Subprogram Call (Haas) | Both |
M98 | Subprogram Call | Both |
M99 | Subprogram Return / Loop | Both |
M109 | Interactive 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.