Automatic Sizing Adjustments for High-Volume Lathe Work

Keeping operators from having to manually make sizing adjustments will free them up to do other things for as long as each finishing tool will last, regardless of how many sizing adjustments it requires.


A closeup of a lathe working on a piece
Photo Credit: Getty Images

All cutting tools start to wear from the very first workpiece they machine. As the tool machines, a small amount of material wears from its cutting tool edge(s). This causes machined surfaces to grow (or shrink) in the direction of the cutting edge(s).

With small tolerances, machined surfaces will grow or shrink to the point that they approach a tolerance limit long before the cutting tool gets dull. When this happens, a sizing adjustment must be made. Indeed, several sizing adjustments may be required during a cutting tool’s life, especially for single-point cutting tools like turning tools and boring bars.

Featured Content

With long running jobs, CNC operators get pretty good at remembering how many workpieces can be machined before a sizing adjustment is required, as well as how many workpieces can be produced before a cutting tool gets dull. While this is the case for any kind of CNC machine, it is especially true with multi-bar-fed turning centers that can run unattended for long periods of time. If not for dull tools and the need for sizing adjustments, the machine could run for many hours — possibly a day or more — without needing an operator present.

While there is not much you can do about the need to replace dull tools, this article will show a way to keep operators from having to manually make sizing adjustments. This will free them up to do other things for as long as each finishing tool will last, regardless of how many sizing adjustments it requires.

This technique requires that you know the same kinds of things mentioned earlier about how cutting tools behave. For example, say you know the new finish turning tool in turret station number 5 can machine 50 workpieces before a diameter sizing adjustment of X-0.0003 inch must be done. And after each additional 50 workpieces, another X-0.0003 inch sizing adjustment is required. And you know the cutting tool can last for 300 workpieces before it must be replaced. Note that many companies provide this kind of information for long-running jobs in production run documentation so operators know how to deal with cutting tools.

Consider this program segment that commands the sizing adjustments to be done automatically:

  • O0001 (MAIN)
  • .
  • .
  • N250 T0505 M42 (Finishing turning tool)
  • N255 G96 S500 M03
  • N260 G00 X3.0 Z0.1 M08
  • .
  • .
  • (Finish turning tool finish machining)
  • N265 G65 P9030 T5.0 W50.0 D300.0 A-0.0003 V542.0
  • N270 M01
  • N275 T0606 M42 (Next tool)
  • .
  • .
  • N600 M99

Look at line N265. It is after the cutting tool’s machining commands and just before the next tool is commanded and calls a custom macro. The arguments (variables) in the command specify how sizing adjustments must be made based upon our proven method.


  • T: Wear offset number for sizing adjustments
  • W: Number of workpieces before each adjustment
  • D: Number of workpieces before dull tool
  • A: Adjustment amount and polarity, negative in our example for external turning
  • V: Permanent common variable number used for counting

Arguments T, W, D, A are self-explanatory and values have been set as described in the scenario above.

Argument V specifies the permanent common variable number (#542 in our case) that will be used to count the number of workpiece prior to a sizing adjustment and the number of workpieces prior to the cutting tool gets dull.

A few notes about the application:

  • During setup, the setup person must manually set the value of the permanent common variable (again, #542 in our case) to the number of workpieces the cutting tool can machine before it gets dull (argument D, 300.0 in our case).
    • This variable counts down. An operator can monitor the value of this variable to know how many workpieces can yet be machined before the cutting tool gets dull.
  • When the counter reaches zero, a dull tool alarm will be sounded that stops the machine and places the message (REPLACE/INDEX INSERT) on the display screen.
    • When this happens, the custom macro resets the counter (to the value of the D argument).
    • To continue, the operator replaces/indexes the insert and must restart the program from the next tool (the tool after turret station 5 in our case).
  • This custom macro makes sizing adjustments for diameters. It could be modified to additionally handle critical faces.
  • Only use this to make automatic sizing adjustments for finishing cutting tools that require sizing adjustments. If this is required of more than one finishing tool, simply include another call to the custom macro (just specify a different permanent common variable for counting.
  • If you wish to provide a dull tool alarm for tools that do not require sizing adjustments (like roughing tools), make argument W the same as argument D.
  • The custom macro calling command (G65 command) must be placed after the cutting tool does its machining in order for the countdown variable to work properly.

Custom macro:

  • O9030 (Automatic sizing custom macro)
  • #[#22]=#[#22]-1.0 (Step PART counter)
  • #100= [#7/#23] (Number of adjustments)
  • IF [[#100-FIX[#100]] EQ 0] THEN #100 =#100-1 (Adjust number of adjustments if evenly divisible)
  • #100=FIX[#100] (Integer number of adjustments)
  • #32=0 (Loop counter)
  • WHILE [#32 LE #100] DO 1 (Find current trigger point for sizing adjustment)
  • #27=[#7-[#32 * #23]] (Current high limit for test)
  • #28=[#7-[[#32+1.0] * #23]] (Current Low limit for test)
  • #29=#[#22] (Counter)
  • IF[ [#29] GT [#27] ] GOTO 75
  • IF[ [#29] LT [#28] ] GOTO 75
  • #2=#28 (Current low limit)
  • N75 #32=#32+1
  • END 1
  • IF[[#[#22]] NE [#2+#23]] GOTO 75 (Test for sizing adjustment)
  • (Make sizing adjustment here)
  • #[2000+#20]=#[2000+#20]+[#1] (Adjust X wear offset)
  • N75 IF [#[#22] GT 0] GOTO 99 (Test for insert change)
  • IF [ [#7/#23] NE [FIX[#7/#23]]] GOTO 91
  • #33=FIX[#7/#23]-1
  • GOTO 92
  • N91 #33=FIX[#7/#23]
  • N92#[2000+#20]=#[2000+#20]-[#1*#33] (Adjust X wear offset)
  • #[#22]=#7 (Reset counter)
  • N99 M99