Using Canned Cycles

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

You can program canned cycle X and Y positions in either absolute (G90) or incremental (G91).


% G81 G99 Z-0.5 R0.1 F6.5 (This drills one hole); (at the present location) ; G91 X-0.5625 L9 (This drills 9 more holes 0.5625); (equally spaced in the X-negative direction) ; %

There are (3) possible ways for a canned cycle to behave in the block in which you command it:

  • If you command an X/Y position in the same block as the canned cycle G-code, the canned cycle executes. If Setting 28 is OFF, the canned cycle executes in the same block only if you command an X/Y position in that block.
  • If Setting 28 is ON, and you command a canned cycle G-code with or without an X/Y position in the same block, the canned cycle executes in that block—either at the position where you commanded the canned cycle, or at the new X/Y position.
  • If you include a loop count of zero (L0) in the same block as the canned cycle G-code, the canned cycle does not execute in that block. The canned cycle does not execute regardless of Setting 28 and whether or not the block also contains an X/Y position.
note: Unless otherwise noted, the program examples given here assume that Setting 28 is ON.

When a canned cycle is active, it repeats at every new X/Y position in the program. In the example above, with each incremental move of -0.5625 in the X axis, the canned cycle (G81) drills a 0.5" deep hole. The L address code in the incremental position command (G91) repeats this operation (9) times.

Canned cycles operate differently depending on whether incremental (G91) or absolute (G90) positioning is active. Incremental motion in a canned cycle is often useful, because it lets you use a loop (L) count to repeat the operation with an incremental X or Y move between cycles.


% X1.25 Y-0.75 (center location of bolt hole pattern) ; G81 G99 Z-0.5 R0.1 F6.5 L0; (L0 on the G81 line will not drill a hole) ; G70 I0.75 J10. L6 (6-hole bolt hole circle) ; %

The R plane value and the Z depth value are important canned cycle address codes. If you specify these addresses in a block with XY commands, the control does the XY move, and it does all of the subsequent canned cycles with the new R or Z value.

The X and Y positioning in a canned cycle is done with rapid moves.

G98 and G99 change the way the canned cycles operate. When G98 is active, the Z-Axis will return to the initial start plane at the completion of each hole in the canned cycle. This allows for positioning up and around areas of the part and/or clamps and fixtures.

When G99 is active, the Z-Axis returns to the R (rapid) plane after each hole in the canned cycle for clearance to the next XY location. Changes to the G98/G99 selection can also be made after the canned cycle is commanded, which will affect all later canned cycles.

A P address is an optional command for some canned cycles. This is a programmed pause at the bottom of the hole to help break chips, provide a smoother finish, and relieve any tool pressure to hold closer tolerance.

note: A P address used for one canned cycle is used in others unless canceled (G00, G01, G80 or the RESET button).

You must define an S (spindle speed) command in or before the canned cycle G-code block.

Tapping in a canned cycle needs a feed rate calculated. The feed formula is:

Spindle speed divided by threads per inch of the tap = feedrate in inches per minute

The metric version of the feed formula is:

RPM times metric pitch = feedrate in mm per minute

Canned cycles also benefit from the use of Setting 57. If this setting is ON, the machine stops after the X/Y rapids before it moves the Z Axis. This is useful to avoid nicking the part when the tool exits the hole, especially if the R plane is close to the part surface.

note: The Z, R, and F addresses are required data for all canned cycles.

Modal canned cycles stay in effect after you define them, and they execute in the Z-axis for each position of the X, Y, and C-Axes.

note: X, Y, or C-Axis positioning moves during a canned cycle are rapid moves.

Canned cycles operate differently, depending on whether you use incremental (U,W) or absolute (X, Y, or C) positions.

If you define a loop count (Lnn code number) in the canned cycle block, the canned cycle repeats that many times with an incremental (U or W) move between each cycle.

Enter the number of repeats (L) each time you want to repeat a canned cycle. The control does not remember the number of repeats (L) for the next canned cycle.

You should not use spindle control M-codes while a canned cycle is active.

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.