//
CAM

Introduction

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:

  • Do you run multi-tool jobs?
  • Do you have a knee mill or a bed mill?
  • Do you have enough tool holders to leave a basic set of commonly used tools in their holders all the time?
  • Do you use a particularly wide assortment of different tools for each job?
  • Do you have a TT-1 (electronic tool detector)?
  • Do you have an automatic tool changer?

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.

Theory and Concepts

If at any point in this discussion your eyes start to glaze over, just skip down to the Methods section.

What are tool length compensation and tool length offsets?

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.

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.

G codes for tool length compensation

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

  G49 H0

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.

Tool length compensation and the Z axis part zero

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:

  • You should go to the offset library and measure your tools before you go to part setup and set the part zero position.
  • You must measure the length offset for every tool you will use in the job.
  • You can then set the Z axis part zero with any one of the tools.

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

CATEGORIES

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3 other followers

%d bloggers like this: