Haas Automation is the largest machine tool manufacturer in the western world in terms of unit volume and largest dollar-volume machine tool manufacturer in North America. The company was established in 1983 by an industry pioneer Gene Haas, who transformed the American manufacturing industry by demonstrating that high-quality CNC machines could be manufactured in the United States at competitive prices. To the manufacturing professionals and CNC programmers, the ability to master the Haas machine codes is critical to the maximization of productivity in the contemporary machining processes.
Haas’s American manufacturing excellence
Haas Automation changed the CNC machine tool industry with a very simple, but revolutionary idea: make everything in-house at their 1.3-million-square-foot manufacturing plant in Oxnard, California. This is a strategy that enables total control of quality of raw materials to finished machines and at competitive prices that threatened the industry norm of offshore production.
In 1988, the company made a breakthrough with the release of the VF-1 vertical machining center that sold below $50,000 dollars when industry analysts were not sure that an American-made machine could sell at such a price.
The VF name is shortened to represent the term Very First, which is to commemorate the entry of Haas into the machine tool market. The VF-1 continues to sell today, at a price of less than 50,000 dollars, and can usually be delivered within weeks of the order. View our inventory of Vf-2 & Vf-3 machines.
Haas does not only believe in American manufacturing because it is patriotic but because it is beneficial. More than 50 percent of the machines that the company uses to produce its products are its own, which shows that the company has confidence in the quality and reliability of its machines. They have a just-in-time production and lean manufacturing processes that allow them to produce more than 1,300 machines per month in four key product lines: vertical machining centers, horizontal machining centers, CNC lathes and rotary tables.
Complete Haas machine code reference tables
Haas G-codes for milling machines
Haas programming is based on the popular Fanuc standard with proprietary enhancements that increase productivity and ease of use. This compatibility-first strategy implies that the majority of Fanuc G-code programs can be used directly on Haas machines, and operators enjoy the exclusive Haas innovations.
G-Code | Description | Application |
---|---|---|
G00 | Rapid motion | Fast non-cutting positioning moves |
G01 | Linear interpolation motion | Straight cutting moves with feedrate |
G02 | Clockwise circular interpolation | Clockwise arcs and circles |
G03 | Counterclockwise circular interpolation | Counterclockwise arcs and circles |
G04 | Dwell | Pause for specified time |
G09 | Exact stop | Precise positioning verification |
G10 | Programmable offset setting | Work offset and tool setting |
G12 | Clockwise circular pocket milling | Automated pocket cutting CW |
G13 | Counterclockwise circular pocket milling | Automated pocket cutting CCW |
G17 | XY plane selection | Circular interpolation in XY plane |
G18 | ZX plane selection | Circular interpolation in ZX plane |
G19 | YZ plane selection | Circular interpolation in YZ plane |
G20 | Inch programming selection | Imperial units |
G21 | Metric programming selection | Millimeter units |
G28 | Return to machine zero | Reference position return |
G29 | Move through G29 reference | Controlled movement from reference |
G31 | Skip function | Probing and measurement |
G35 | Automatic tool diameter measurement | Tool setting and verification |
G36 | Automatic work offset measurement | Workpiece coordinate establishment |
G37 | Automatic tool length measurement | Z-axis tool setting |
G40 | Cutter compensation cancel | Cancel tool radius compensation |
G41 | Cutter compensation left | Left-side tool radius compensation |
G42 | Cutter compensation right | Right-side tool radius compensation |
G43 | Tool length compensation positive | Positive tool length offset |
G44 | Tool length compensation negative | Negative tool length offset |
G47 | Engraving | Text and pattern engraving |
G49 | Tool length compensation cancel | Cancel tool length offset |
G50 | Scaling cancel | Cancel G51 scaling |
G51 | Scaling | Coordinate system scaling |
G52 | Local coordinate system | Temporary work offset |
G53 | Machine coordinate selection | Absolute machine positioning |
G54-G59 | Work coordinate systems 1-6 | Standard work offsets |
G60 | Unidirectional positioning | Approach from one direction |
G61 | Exact stop modal | Continuous exact positioning |
G64 | Exact stop cancel | Cancel G61 mode |
G65 | Macro subroutine call | Custom macro execution |
G68 | Rotation | Coordinate system rotation |
G69 | Rotation cancel | Cancel G68 rotation |
G70 | Bolt hole circle | Circular hole patterns |
G71 | Bolt hole arc | Arc-based hole patterns |
G72 | Bolt holes along angle | Linear hole patterns |
G73 | High-speed peck drilling | Deep hole drilling with reduced retract |
G74 | Reverse tapping cycle | Left-hand threading |
G76 | Fine boring cycle | Precision boring operations |
G77 | Back boring cycle | Reverse boring operations |
G80 | Canned cycle cancel | Cancel all fixed cycles |
G81 | Drilling cycle | Standard hole drilling |
G82 | Spot drilling cycle | Drilling with dwell |
G83 | Peck drilling cycle | Deep hole drilling |
G84 | Tapping cycle | Threading operations |
G85 | Boring cycle | Standard boring |
G86 | Bore/stop cycle | Boring with spindle stop |
G87 | Bore/manual retract cycle | Manual boring operations |
G88 | Bore/dwell cycle | Boring with pause |
G89 | Bore cycle | Complete boring operation |
G90 | Absolute programming | Absolute coordinate mode |
G91 | Incremental programming | Incremental coordinate mode |
G92 | Set work coordinates | Local coordinate establishment |
G93 | Inverse time feed mode | Special feed rate mode |
G94 | Feed per minute mode | Standard mm/min or in/min |
G98 | Initial point return | Return to cycle start level |
G99 | R-plane return | Return to clearance plane |
G100 | Mirror image disable | Cancel G101 mirroring |
G101 | Mirror image enable | Coordinate system mirroring |
G102 | Programmable output to RS-232 | Serial communication |
G103 | Block look-ahead limit | Processing optimization |
G107 | Cylindrical mapping | Cylinder surface machining |
G110-G129 | Work coordinate systems 7-26 | Extended work offsets |
G136 | Automatic work offset measurement | Advanced workpiece setting |
G141 | 3D+ cutter compensation | Advanced tool compensation |
G143 | 5-axis tool length compensation | Multi-axis tool offset |
G150 | General purpose pocket milling | Custom pocket geometries |
G153 | 5-axis high-speed peck drilling | Multi-axis drilling |
G154 | Extended work coordinates | P1-P99 coordinate systems |
G155 | 5-axis reverse tapping | Multi-axis threading |
G161-G169 | 5-axis canned cycles | Multi-axis fixed cycles |
G174 | Non-vertical rigid tapping CCW | Special tapping operations |
G184 | Non-vertical rigid tapping CW | Special tapping operations |
G187 | Accuracy control for HSM | High-speed machining optimization |
G188 | Program from schedule table | Automated program selection |
Complete Haas M-code reference
Haas M-codes allow full machine control beyond simple spindle and coolant control. The large library of M-codes proves that Haas is dedicated to automation and manufacturing efficiency.
M-Code | Description | Function |
---|---|---|
M00 | Program stop | Non-optional program halt |
M01 | Optional program stop | Operator-selectable stop |
M02 | Program end | End program execution |
M03 | Spindle on clockwise | Forward spindle rotation |
M04 | Spindle on counterclockwise | Reverse spindle rotation |
M05 | Spindle stop | Stop spindle rotation |
M06 | Tool change | Automatic tool changer |
M08 | Coolant on | Flood coolant activation |
M09 | Coolant off | All coolant deactivation |
M10 | 4th axis brake on | Rotary axis lock |
M11 | 4th axis brake release | Rotary axis unlock |
M12 | 5th axis brake on | Second rotary axis lock |
M13 | 5th axis brake release | Second rotary axis unlock |
M16 | Tool change | Alternative tool change command |
M17 | APC pallet unclamp/door open | Automatic pallet changer operation |
M18 | APC pallet clamp/door close | Automatic pallet changer operation |
M19 | Orient spindle | Spindle positioning |
M21-M28 | User M-code interface | Custom M-code functions |
M30 | Program end and reset | End program and return to start |
M31 | Chip auger forward | Chip removal system |
M33 | Chip auger stop | Stop chip removal |
M34 | Coolant spigot down | Coolant positioning |
M35 | Coolant spigot up | Coolant positioning |
M36 | Pallet part ready | Automation interface |
M39 | Rotate tool turret | Tool turret positioning |
M41 | Spindle low gear override | Gear selection override |
M42 | Spindle high gear override | Gear selection override |
M50 | Execute pallet change | Pallet changer activation |
M51-M58 | Optional user M-code set | Custom function activation |
M59 | Output relay set | External device control |
M61-M68 | Optional user M-code clear | Custom function deactivation |
M69 | Output relay clear | External device control |
M75 | Set G35/G136 reference point | Probing reference |
M76 | Control display inactive | Display management |
M77 | Control display active | Display management |
M78 | Alarm if skip signal found | Probing error detection |
M79 | Alarm if skip signal not found | Probing error detection |
M80 | Automatic door open | Enclosure door control |
M81 | Automatic door close | Enclosure door control |
M82 | Tool unclamp | Tool retention control |
M83 | Auto air jet on | Chip clearing air blast |
M84 | Auto air jet off | Chip clearing air blast |
M86 | Tool clamp | Tool retention control |
M88 | Through-spindle coolant on | High-pressure coolant |
M89 | Through-spindle coolant off | High-pressure coolant |
M93 | Axis position capture start | Data collection |
M94 | Axis position capture stop | Data collection |
M95 | Sleep mode | Power management |
M96 | Jump if no input | Conditional programming |
M97 | Local subroutine call | Internal program call |
M98 | Subroutine call | External program call |
M99 | Subroutine return/loop | Program control |
M101 | MOM canned cycle mode | Minimum oil machining |
M102 | MOM mode | Minimum oil machining |
M103 | MOM mode cancel | Minimum oil machining |
M109 | Interactive user input | Operator interface |
Haas lathe G-codes for turning centers
Haas turning centers use special G-codes that are optimized to work with lathes but are compatible with the common turning programming procedures.
G-Code | Description | Application |
---|---|---|
G00 | Rapid positioning | Fast non-cutting moves |
G01 | Linear interpolation | Straight cutting moves |
G02 | Clockwise circular interpolation | Clockwise arcs |
G03 | Counterclockwise circular interpolation | Counterclockwise arcs |
G04 | Dwell | Pause with timer |
G20 | Inch programming | Imperial units |
G21 | Metric programming | Millimeter units |
G28 | Reference point return | Machine zero return |
G32 | Thread cutting | Single-point threading |
G40 | Tool nose radius compensation cancel | Cancel TNRC |
G41 | Tool nose radius compensation left | Left TNRC |
G42 | Tool nose radius compensation right | Right TNRC |
G50 | Coordinate system setting | Work offset establishment |
G70 | Finishing cycle | Precision finishing operations |
G71 | Longitudinal roughing cycle | Parallel roughing |
G72 | Transverse roughing cycle | Face roughing |
G73 | Pattern repeat cycle | Irregular shape roughing |
G74 | End face peck drilling | Axial drilling |
G75 | Grooving cycle | Groove cutting |
G76 | Threading cycle | Complete threading |
G90 | Longitudinal turning cycle | Simple turning |
G92 | Threading cycle | Basic threading |
G94 | Transverse turning cycle | Face turning |
G96 | Constant surface speed | CSS mode |
G97 | Constant spindle speed | RPM mode |
Haas lathe M-codes for turning centers
M-Code | Description | Function |
---|---|---|
M00 | Program stop | Program halt |
M01 | Optional program stop | Conditional stop |
M02 | Program end | End execution |
M03 | Spindle forward | Clockwise rotation |
M04 | Spindle reverse | Counterclockwise rotation |
M05 | Spindle stop | Stop rotation |
M08 | Coolant on | Flood coolant |
M09 | Coolant off | Stop coolant |
M10 | Chuck clamp | Workpiece clamping |
M11 | Chuck unclamp | Workpiece release |
M12 | Auto air jet on | Chip clearing |
M13 | Auto air jet off | Stop air jet |
M14 | Main spindle clamp | C-axis lock |
M15 | Main spindle unclamp | C-axis unlock |
M17 | Rotate turret forward | Tool selection |
M18 | Rotate turret reverse | Tool selection |
M19 | Orient spindle | Spindle positioning |
M21 | Tailstock advance | Tailstock operation |
M22 | Tailstock retract | Tailstock operation |
M23 | Thread chamfer on | Threading feature |
M24 | Thread chamfer off | Threading feature |
M30 | Program end and reset | Complete program end |
Unique Haas programming features
Advanced pocket milling capabilities
Haas machines have advanced circular pocket milling commands (G12/G13) which automate complicated pocket work. The codes allow programmers to construct circular pockets using simple parameter inputs:
G12/G13 Parameters:
- D: Tool radius or diameter compensation
- I: Starting circle radius
- K: Finished circle radius
- L: Loop count for multiple depth passes
- Q: Stepover increment
- F: Feedrate
Enhanced coordinate systems
Haas offers 99 work coordinate systems via G154 P1-P99, which is much more than the six coordinate systems. This wide range of capability accommodates complicated fixtures and multi-setup without coordinate conflicts.
G51 scaling capability provides proportional scaling of coordinates with optional center point specification and G68 rotation provides rotation of the coordinate system about specified centers. These options are optional to activate, and they offer strong functionality to complex part geometries.
Integrated automation features
Haas is also committed to automation as shown by the Haas M-codes which include comprehensive pallet changer control (M17/M18), automatic door operation (M80/M81) and chip management systems (M31/M33). M36 pallet part ready command can be used with automated loading systems to achieve lights-out manufacturing.
High-pressure machining can be assisted by through-spindle coolant control (M88/M89), and automated chip clearing without operator involvement is available through air jet control (M83/M84).
Programming best practices for Haas machines
Leveraging Haas-specific features
Effective Haas programming is a mixture of standard G-code compatibility and proprietary additions. The G150 general purpose pocket milling command allows defining custom pocket geometries with subprograms, and is compatible with CAM-generated toolpaths.
Automatic measurement cycles (G35, G36, G37) incorporate probing directly into machining programs, and allow automated tool setting and measurement of the workpiece without operator intervention. These cycles facilitate tool setting as well as in-process verification.
Optimization techniques
Haas machines have the advantage of high-speed machining due to sophisticated control algorithms. G187 accuracy control optimizes cutting parameters to high-speed applications and look-ahead processing provides smooth motion in complex toolpaths.
Modular program construction and efficiency of repetitive operation are possible with subroutine programming (M97/M98). The M109 interactive user input command enables the operator to communicate with the program during the execution of the program in part-specific parameters.
Conclusion
The fact that Haas Automation is the largest machine tool manufacturer in the western world, coupled with their American manufacturing prowess and their ability to program their machines to do just about anything, makes learning these machine codes a must in the modern manufacturing industry. The compatibility-first strategy of the company makes it easy to adopt, and proprietary additions give competitive advantages in productivity and automation.
Haas has demonstrated that American manufacturing is competitive on the world stage by producing the revolutionary $50,000 VF-1 that changed the industry to the latest 5-axis machining centers and automation systems. Haas machine codes are the basis of manufacturing success in competitive markets across the globe, especially among manufacturers who want to have reliable and productive CNC solutions with extensive programming flexibility.