Macros Introduction

Next Generation Control Mill Operator's Manual

The Online Interactive Operator's Manual is currently available in English only.

A PDF version of the Operator's Manual is available for download in multiple languages. Click the link below to view the Operator's Manual in your language. Click "Continue" to view the online version in English.

Get a translated PDF Download Continue
note: This control feature is optional; call your HFO for information on how to purchase it.

Macros add capabilities and flexibility to the control that are not possible with standard G-code. Some possible uses are: families of parts, custom canned cycles, complex motions, and driving optional devices. The possibilities are almost endless.

A Macro is any routine/subprogram that you can run multiple times. A macro statement can assign a value to a variable, read a value from a variable, evaluate an expression, conditionally or unconditionally branch to another point within a program, or conditionally repeat some section of a program.

Here are a few examples of the applications for Macros. The examples are outlines and not complete macro programs.

  • Tools For Immediate, On-Table Fixturing - You can semi-automate many setup procedures to assist the machinist. You can reserve tools for immediate situations that you did not anticipate in your application design. For instance, suppose a company uses a standard clamp with a standard bolt hole pattern. If you discovered, after setup, that a fixture needs an additional clamp, and suppose that you programmed macro subprogram 2000 to drill the bolt pattern of the clamp, then you only need this two-step procedure to add the clamp to the fixture:

    1. Jog the machine to the X, Y, and Z coordinates and angle where you want to place the clamp. Read the position coordinates from the machine display.

    2. Execute this command in MDI mode:

      G65 P2000 Xnnn Ynnn Znnn Annn ;

      where nnn are the coordinates determined in Step a). Here, macro 2000 (P2000) does the work since it was designed to drill the clamp bolt hole pattern at the specified angle of A. Essentially, this is a custom canned cycle.

  • Simple Patterns That Are Repeated - You can define and store repeated patterns with macros. For example:

    1. Bolt hole patterns

    2. Slotting

    3. Angular patterns, any number of holes, at any angle, with any spacing

    4. Specialty milling such as soft jaws

    5. Matrix Patterns, (e.g. 12 across and 15 down)

    6. Fly-cutting a surface, (e.g. 12 inches by 5 inches using a 3 inch fly cutter)

  • Automatic Offset Setting Based On The Program - With macros, coordinate offsets can be set in each program so that setup procedures become easier and less error-prone (macro variables  #2001-2800).

  • Probing - Using a probe enhances the capabilities of the machine, some examples are:

    1. Profiling of a part to determine unknown dimensions for machining.

    2. Tool calibration for offset and wear values.

    3. Inspection prior to machining to determine material allowance on castings.

    4. Inspection after machining to determine parallelism and flatness values as well as location.

Be aware: Many service and repair procedures should be done only by authorized personnel. The service technicians at your Haas Factory Outlet (HFO) have the training, experience, and are certified to do these tasks safely and correctly. You should not do machine repair or service procedures unless you are qualified and knowledgeable about the processes.

Danger: Some service procedures can be dangerous or life-threatening. DO NOT attempt a procedure that you do not completely understand. Contact your Haas Factory Outlet (HFO) and schedule a service technician visit if you have any doubts about doing a procedure.

Feedback