2.3 Auxiliary Functions (M00, M03-M05, M06, M08-M09, M30)

Key Takeaways

  • The Haas mill allows one M-code per block and executes M-code actions at the end of the block.

  • M00 stops the program. M01 performs the stop only if Optional Stop is enabled.

  • M03 and M04 command spindle direction, M05 commands a stop, and S specifies spindle speed in RPM on the mill.

  • Haas M06 stops spindle and coolant, moves Z to the tool-change position, orients the spindle, and changes the selected tool.

  • M30 ends the program, stops the spindle and coolant, and returns the cursor to the start. It does not cancel tool-length compensation on the described Haas NGC software.

Last updated: November 2026

2.3 Auxiliary Functions: Stops, Spindle, Tools and Coolant

Auxiliary functions, or M-codes, tell the control to change machine or program state. A motion block might move the tool to a clearance point, and an M-code might then turn off a pump. On the Haas mill used here, use one M-code in a block. Haas describes M-code actions as taking effect at the end of the block. If you want coolant on before cutting begins, establish it on its own earlier block.

Program Stops and Completion

CodeEffect on the Haas millExample decision
M00Stops program and axis motion, stops spindle, and turns off coolantA required inspection stop at a planned clearance point
M01Performs the program stop when Optional Stop is enabledAn extra check during prove-out that can be skipped on an approved production run
M02Program endUse the controller’s documentation for details of end state and cursor behavior.
M30Program end and reset to the program start; spindle and coolant stopEnd of a main program after the planned retract and any required setup-state cleanup

A stop can be used to check the first part or change a setup under the shop’s safe-access procedure. Verify motion has stopped and follow that procedure before accessing the work area. A program stop is a control state; use the energy-control procedure when required for the task. Optional Stop is suitable only for work that may be skipped. If removing a locating pin is required before subsequent motion, the operation needs a process that ensures that step is complete. An optional inspection block cannot ensure it.

After a stop, examine the next programmed block. Confirm that the machine, tooling and part are in the expected state before resuming. If the stop is optional, trace both outcomes. The resume path must account for a spindle or coolant state that changed when it stopped. Haas notes that M30 on NGC software from version 100.16.000.1041 onward no longer cancels tool-length offsets. Establish and check the next program’s required states explicitly.

Programmed Spindle Rotation

On a Haas mill S3200 M03 requests 3,200 RPM and starts forward rotation, clockwise viewed down the spindle toward the workpiece. M04 starts reverse rotation. Choose direction from the tool and operation. M05 stops the spindle and waits for it to stop. Use the speed recommended for the specific cutter, material and machine. Program an intentional S value before cutting or on the spindle start block; the presence of M03 alone does not establish the intended numerical speed.

Tool Changes

On a Haas mill an automatic tool change such as T02 M06 puts Tool 2 in the spindle. Haas M06 automatically stops spindle and coolant, moves Z to the change position and orients the spindle for the exchange. Separate stop codes and a G28 command are not prerequisites of that Haas instruction. Still plan the departure and check the holder’s path to the tool-change position. The current tool may need to leave a bore or pocket before repositioning, and the machine or fixture can restrict the approach.

Here is a Haas example for reading in graphics. Before the optional stop the cutter is above all features, cutter compensation is canceled, and the displayed fixture matches the drawing. The new tool’s offset and clearance plane have been checked.

M01 (Optional inspection at a planned clearance point)
T02 M06
G20 G17 G90 G94 G54 G40 G80
S3500 M03
G00 G43 H02 Z1.000 (Establish the verified work Z with Tool 2)
M08

If Optional Stop is on, the operator completes the inspection and resumes only after checking the next block. If it is off, control proceeds to M06. Both paths converge at the tool change. The following blocks select the intended fixture and positioning modes, request the new speed, confirm H02 and turn on flood coolant before the first cut. Verify this fragment with the actual setup and the machine-specific restrictions before physical use.

Coolant Commands

Haas mill M08/M09 command standard coolant on/off. M07 addresses shower coolant where fitted. M88/M89 command through-spindle coolant on/off where fitted; select the supported tool and observe the controller’s sequence. Verify which coolant the cutting operation requires. An instruction for another control or optional feature can have a different effect. The program’s completion section establishes a verified withdrawal path and a defined stop state suitable for the next operation.

Sources: Haas mill M-code list, Haas M06, Haas M30, and Haas basic programming.

Loading diagram...
Automated Tool Change (ATC) Command Flow
Test Your Knowledge

What is the difference between M00 and M01 on a Haas mill?

A

M00 changes tools and M01 selects work zero.

B

M00 stops the program; M01 stops it when Optional Stop is enabled.

C

M00 ends the program and M01 rewinds it.

D

M01 always stops and M00 depends on Optional Stop.

Test Your Knowledge

In a Haas mill program, what does a separate S3200 M03 block establish before an interpolated cut?

A

Forward spindle rotation with a programmed speed of 3,200 RPM

B

Reverse rotation with a 3,200 RPM limit

C

A table feed of 3,200 in/min

D

An axis move that begins after a timed dwell

Test Your Knowledge

What does M30 do on Haas NGC software version 100.16.000.1041 or later?

A

It stops and erases all stored tool geometry registers.

B

It cancels the tool-length offset and commands every axis home.

C

It ends the program, stops spindle and coolant, and returns the cursor to the start while retaining the tool-length offset.

D

It pauses at the current block only when Optional Stop is on.

Test Your Knowledge

A Haas mill has a verified tool-change path. What does T02 M06 do?

A

Restores G54 through G59 to factory values.

B

Only stages Tool 2 in the magazine and resumes cutting with the old tool.

C

Requires a separate G91 G28 Z0 before the CNC will accept it.

D

Stops spindle and coolant, moves Z to the change position, orients the spindle and changes to Tool 2.

Sections you finish are checked off in the contents.