G37 Automatic Tool Offset Measurement (Group 00)

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

(This G-code is optional and requires a probe)

This G-code is used to set tool length offsets.

F - Feedrate
H - Tool offset number
Z - Required Z-Axis offset

Automatic Tool Length Offset Measurement (G37) is used to command a probe to set tool length offsets. A G37 will feed the Z-Axis in an effort to probe a tool with a tool-setting probe. The Z-Axis will move until a signal from the probe is received or the travel limit is reached. A non-zero H code and either G43 or G44 must be active. When the signal from the probe is received (skip signal) the Z position is used to set the specified tool offset (Hnnn). The resulting tool offset is the distance between the current work coordinate zero point and the point where the probe is touched. If a non-zero Z value is on the G37 line of code the resulting tool offset will be shifted by the non-zero amount. Specify Z0 for no offset shift.

The work coordinate system (G54, G55, etc.) and the tool length offsets

(H01-H200) may be selected in this block or the previous block.


This code is non-modal and only applies to the block of code in which G37 is specified.

A non-zero H code and either G43 or G44 must be active.

To avoid damaging the probe, use a feed rate below F100. (inch) or F2500. (metric).

Turn on the tool-setting probe before using G37.

If your mill has the standard Renishaw probing system, use the following commands to turn on the tool-setting probe.

% M59 P1133 ; G04 P1. ; M59 P1134 ; %

Use the following command to turn off the tool-setting probe.

M69 P1134 ;

Also see M78 and M79.

Sample program:

This sample program measures the length of a tool and records the measured value on the tool offset page. To use this program, the G59 work offset location must be set to the tool-setting probe location.

% O60371 (G37 AUTO TOOL OFFSET MEASUREMENT) ; (G59 X0 Y0 is center of tool-setting probe) ; (Z0 is at the surface of tool-setting probe) ; (BEGIN PREPARATION BLOCKS) ; T1 M06 (Select tool 1) ; G00 G90 G59 X0 Y0 (Rapid to center of the probe) ; G00 G43 H01 Z5. (Activate tool offset 1) ; (BEGIN PROBING BLOCKS) ; M59 P1133 (Select tool-setting probe) ; G04 P1. (Dwell for 1 second) ; M59 P1134 (Probe on) ; G37 H01 Z0 F30. (Measure & record tool offset) ; M69 P1134 (Probe off) ; (BEGIN COMPLETION BLOCKS) ; G00 G53 Z0. (Rapid retract to Z home) ; M30 (End program) ; %

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.