torbjorn/ September 7, 2015/ Fundamentals/ 0 comments

What are offsets in a machine tool ?  In the most basic sense the offsets are what the machine tool controller “knows” about the tools and the workpiece.  In a technical sense the offsets are numbers stored in specific registers in the memory of the controller.  The typical program run on a CNC machine tool contains a series of commands related to starting and stopping the spindle and moving the tip or the edge of a cutting tool through a series of points.

Offsets are what lets the programmer write a program without setting up the machine tool first, in some cases without even knowing what machine tool will be used.  Every machine tool will have a machine coordinate system.  This is typically a Cartesian system with the z axis aligned with the spindle and x and y axes perpendicular to the z axis and each other.   (In a 2 axis lathe the z axis is still aligned with the spindle and the y axis is omitted.)  When a machine tool is in its “home” position all of the axes are typically positioned at one extreme of travel (see Machine Tool Motion.)

In a milling machine, the machine tool’s work offset is a measure from the spindle nose, to the position on the workpiece that the programmer referenced when the machine is positioned with all of its axes at its home position.  The tool length offset is a measurement from the spindle nose to the tip if the tool once it has been installed in the spindle.  Since the center line of the tool is aligned up with the center line of the spindle the tool length offset only has a z dimension.
Tools have other dimensions of course and depending on the method the programmer used the machine tool may need to know the diameter of the tool..

In a Lathe, the workpiece is, by the nature of the operation, aligned with the center line of the spindle so the work offset will have only a z dimension, measured from the spindle nose.  The workpiece of course has diameter and possible a shape from previous operations, but that is handled by the programmer.  The tool offsets are measured from the spindle nose to the cutting edge(s) of the tool with the tool turret positioned at the machine tool’s home position.

Methods for offset measurement can vary by machine and by the preferences of the operators.  Several techniques for offset measurement are explained in the WPI HTEC Quick Guide.

The offsets are stored in the machine tools memory after measurement.   Each machine will typically have a set of memory registers reserved for tool offsets numbered from one.  It is not uncommon for a machine to be able to “remember” information about more tools than it can physically hold at one time this allows for quick change over between jobs.  The Work offsets are also stored in specific memory locations in the machine tool controller.  It is often the case that the machine controller can “remember” well over one hundred offset locations at the same time  This allows for multiple fixtures to be set up at the same time so you don’t have to measure the offsets each time you change the part you will be cutting.  The Work offsets are accessed  and switched with a Simple G code that refers to the offset by number.

One of the first lines of code in any program that is executed on the machine controller will be to reference the work offset to be used.  This is frequently referred to a “calling the offset” or “calling the work offset.”  On a Haas Mill or Lathe the first work offset register is 54 and registers 54 – 59 are commonly used.  The work offset is called on a Haas mill by including Gnn in a line of code where nn refers to the offset register to be used for example:

“G54”

set’s the active coordinate system to the one stored in the memory register labeled 54.

Once the work offset has been called and the machine controller knows where the workpiece is, one of the next lines of code will be to load a tool into the spindle.  On a Haas mill this would be something like:

“T5 M06;”

The “T5” indicates that the rest of the line pertains to the tool designated as tool number five when loaded into the machine; the “M06” tells the machine to operate the tool changer to put tool five into the spindle.
It is important to note that at this time the machine tool does not know anything about tool five other than the fact it is loaded into the spindle.   Using the Haas mill again as the example the machine controller is told about the tools offsets when the following line of code is executed:

“G43 H05 G00 Znn;” (nn is any valid z location in the active coordinate system)

The code “G43” tells the machine controller to set the tool offset.  The “H05” tells the machine controller to use the length offset stored in the fifth tool register.  The the “G00 Znn”  tells the controller to move the Z axis until the tip of the tool reaches the location “nn” position in the active work coordinate system.

The work and tool offsets are added together in this first and any subsequent moves so while the machine gives commands to the axis drive controls with relation to its machine coordinate system it is constantly calculating those coordinates based on the tool and work offsets that are active.  For information about how the machine tool controller uses the tool diameter information look for information on the use of “Cutter Compensation.”

Leave a Comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>