Tool length offsets are one of the most widely misunderstood aspects of CNC mill operation. This is at least partly because there are many different ways to manage length offsets. Which way is best for you will depend on your machine, your supply of tool holders, and the nature of your work.
Some factors which will affect your choice of methods include:
First I will discuss some of the basic theory and concepts behind measuring and using tool length offsets, then I will list some recommended methods for managing your offset library, based on the preceding considerations.
Unless otherwise noted, I will assume you have at least version 7.03 of Centroid's control software. This is the last version in which changes were made to tool length compensation. In general, however, these features have not changed significantly since the Centroid M-Series control was introduced in 1993.
If at any point in this discussion your eyes start to glaze over, just skip down to the Methods section.
Tool length compensation is a way for your CNC control to adjust for differences in length between different tools, without your having to worry about those differences in your part program.
The control can adjust for tool lengths on request, provided it knows how long each tool is relative to some standard length (and therefore relative to each other tool). These relative lengths are called Tool Length Offsets or Tool Height Offsets.
On the Centroid control, tool length offsets are stored in the offset library. To get to the offset library from the main screen, press F1/Setup, F2/Tool, F1/Offsets.
Centroid measures tool length offsets by comparing each tool to a standard length. This standard length is the Reference Tool. In general, you load the Reference Tool, jog the Z axis down until that tool touches some surface, and set the Z Reference position there. The control memorizes this position of its Z axis. You then load each other tool, bring that tool down until it touches the same surface, and tell the control to measure the tool. The control compares the Z axis position with this tool touching the surface to the previously stored Z Reference position. The difference in Z axis positions is stored as the length offset for the tool.
Clearly, to touch the same surface with a shorter tool, you have to move the Z axis down further. This results in a negative offset. The shorter the tool, the more negative the offset.
To touch the same surface with a longer tool, you don't have to move the Z axis down as far. This results in a positive offset. The longer the tool, the larger (or less negative) the offset.
Graphic illustration of Z Reference and measured height offsets, when using a dedicated Reference Tool on a knee mill
To apply tool length compensation, the control simply needs to add the current tool's length offset value to all Z axis moves. For a short tool, adding the smaller (or more-negative) number causes the Z axis to move lower. For a long tool, the larger (or less-negative) number causes the Z axis to move higher.
Centroid has traditionally recommended that your reference tool be longer than any other tool. This results in all your length offsets being negative. Doing this was never strictly necessary, but it did protect you against certain G coding errors. For example, suppose you wrote:
N1 M6 T4 ; load tool 4 (Z at home) N2 G0 Z0.1 ; rapid down to clearance level N3 G43 H4 ; turn on length compensation for tool 4
or, at the end of a cut:
N48 G1 F5 X2 Z-.5 ; make final cut at depth N49 G49 H0 ; turn off tool length compensation N50 M25 ; move Z to home
If the length offset H4 were positive, both of these examples would result in crashes.
On the N2 line, the control will rapid down too far because it does not yet know that it has a long tool.
On the N49 line, most controls (including Centroids with software earlier than version 7.03) will move the Z axis down by the offset amount, because they think they no longer have the long tool.
Neither of these situations will occur if you use Intercon, Mastercam, MillWrite, or any other CAD/CAM system with an intelligently written postprocessor to generate your G codes. Such programs will properly include changes in length compensation (i.e. G43 and G49) with other Z axis movement. In the examples above, N2 and N3 would be combined in a single line, as would N49 and N50:
N2 G0 Z.1 G43 H4 ; turn on length compensation and rapid down ... N49 G49 H0 M25 ; turn off length compensation and rapid to Z home
If you do likewise when writing G code by hand, then you don't need to worry about whether your reference tool is your longest tool.
Tool length compensation uses three G codes -- G43, G44, and G49 -- plus the H codes.
The H code tells the control which length offset value to use, when length compensation is active (as selected by G43 or G44). Generally, the H code is the same as the tool number. I.e. if you are using tool 4, you would include H4 in the G codes, telling the control to look up the tool length on line 4 of the offset library.
G43 tells the control to begin applying length compensation, by adding the current length offset (selected by the H code) to all Z axis positions.
G44 is a rarely-used alternative to G43. It tells the control to begin applying tool length compensation, by subtracting the current length offset from all Z axis positions. In this scheme, larger length offset numbers identify shorter tools (as if they were measured from the table up rather than from the spindle down). G44 is not compatible with the tool measuring methods built into Centroid's offset library.
G49 tells the control to stop applying length compensation.
H0 is a special H code. It specifies a length offset value of zero, meaning that no offset will be applied even if G43 is active. Therefore the line
is actually redundant, since either G49 or H0 alone would effectively cancel length compensation.
If you look at the G codes generated by Intercon, you will notice that Intercon changes to H0 at the beginning of every program, and leading into every tool change. When loading a tool, Intercon puts in G43 but does not immediately put in the new H value. Tool length compensation is effectively "armed and ready" but not yet active. Intercon puts in the actual H value later, with the first Z axis movement after the tool change. In software versions prior to 7.03 this was necessary to prevent the Z axis from attempting to move down (and possibly crashing) or up (and possibly tripping the Z+ limit switch). The same effect could, of course, have been achieved by delaying the G43 code until the first Z movement as well.
Many controls do not distinguish between measuring tool length offsets and setting the Z axis part zero. On such controls, you touch every tool to the surface of the stock in setting up for every job.
Centroid separates these two concepts. As a result, you can set or change the Z axis part location for all tools simultaneously, without having to change the length offset for every tool. In addition, you can keep commonly-used tools set up and measured indefinitely, using them in many different jobs without having to remeasure them.
You set the Z axis part zero using the Set Part 0/Position screen (F1/Setup, F1/Part, F1/Next Axis as needed).
You can think of the Z axis part zero as the Z position where the reference tool touches the part surface.
One way to find this position, of course, is to load the reference tool and jog it to the part surface.
However, if you have already measured the length offsets for your other tools, you can use any one of your tools to locate part zero. You just have to tell the control which tool you are using.
Once you have located the part surface with one tool, the control knows where it is with all the other tools as well, because it knows the relative lengths of all tools.
This leads to several key points:
If you rarely use more than one tool in a job (e.g. mold surfacing with a single ball mill), then you don't need to use tool length compensation at all.
Use this method if you have several tools you wish to set up, keep, and reuse, but you do not have a consistent tool measuring surface (e.g. on a knee mill, or measuring on stock surface).
This is the method described in Centroid's Basic Training video.
If you have a DP-4 or similar touch probe, it is a convenient reference tool. The following procedure assumes you also have a TT-1 electronic tool detector.
Use this method if you have several tools you wish to set up, keep, and reuse; and you have a consistent tool measuring surface (e.g. the table of a bed mill).
This method is comparable to what is done on some other CNC controls, which do not have a separate procedure for setting the Z axis part zero.
It is a reasonable method if you would have to measure every tool anyway (because they did not remain in their tool holders).
If you have a TT-1, measuring every tool for each job is less of a burden. In this case you might use a variant on Method 2: set Z reference at Z home, and measure every tool off of some convenient surface (e.g. vise jaw).
Since you are going to measure every tool before each job, you don't have to keep track of which tools have already been measured, and don't have to worry about using a consistent measuring surface from one job to the next.
Suppose you have a knee mill (Z axis is quill, with only 4 to 5 inches travel), and the job at hand uses a spot drill, drill, and reversing tapping head. You will almost certainly have to crank the knee up to use the spot drill, and down to use the tapping head.
There are two ways to approach this:
First, you could establish one knee position for the spot drill and drill, and another for the tapping head. Whenever you load or remove the tapping head, you crank the knee down or up by the same amount. In this way you can measure and use valid length offsets for all the tools.
Second, you can skip tool length compensation altogether. Whenever you come to a tool change in the program, cancel the job. Move the knee as needed; go to Part Setup and set Z zero with the new tool; then use Run/Search or Run/Resume to restart the job at that tool change.
This same cancel-and-resume method can also be used if multiple tools have to share the same tool holder (e.g. a drill chuck or collet chuck).
Back to on-line tutorials page
Copyright © 2017 Marc Leonard
You are welcome to print out this tutorial for your own use and for non-commercial distribution, as long as you include this copyright message.
Last updated 30-Apr-2017 MBL