As always reference the LinuxCNC manuals and the LinuxCNC Wiki for more information.

Basic Tool Offsets

Typically in a lathe the end of the material that faces the tailstock (if you have one) is the Z0.000 end. And the center of rotation is the X0.000 location.

Note
The Basic Tool Offsets section assumes no tool changer and the radius mode G8 is on.
Finding Z0

For now I assume the lathe doesn’t have a tool turret so tool offsets won’t cloud up the process. With a turning tool loaded move the tool close to the Z end of the material. Set the jog to increment at 0.001" and place the dowel in between the tool and the material. Slowly back off the tool until the dowel just slips between the material and the tool. Now check to be sure Z is the selected axis and using the touch off button in Axis touch off the P1 G54 coordinate system and enter the diameter of your dowel. Now the end of the material will be Z0.000 to that tool.

images/lathe-touchoff-material.png
Figure 1: Lathe Touchoff to Material
Finding X0

The same method as above can be used to find the X radius just remember to add the diameter of the dowel to the radius of the material in the chuck. Another method is to just take a cut and measure the diameter and without moving the X axis after the cut touch off and enter 1/2 the diameter you measured.

Tool Turret Setup

This section is for lathes that have a tool turret or some means of swapping tools and retaining the XZ settings of the tool.

Setting the Tool Table

I use the same dowel to set the Z offset for the tool table but use the face of the spindle as my Z reference for all tools. This sets an offset for each tool relative to each other. Now when you change tools all the Z locations are correct.

Warning
Make sure you have Tool Touch off to fixture selected in the Machine menu when touching off the tool table or you will get some experience you may not like. Also make sure you have the tool loaded with Tn M6 G43. There is no default tool loaded when you start up Axis.
Z Offset

With the tool loaded using the dowel touch off method touch off the tool table (last one on the drop down list) and leave the entry at 0.0. Some tools like a parting tool you would enter a positive value equal to the width of the tool so parts cut off will be the correct length. Center cutting tools would normally be a value equal to 1/2 the width of the tool and if it is a left hand holder

images/lathe-touchoff-fixture.png
Figure 2: Lathe Touchoff to Fixture
X Offset

With the tool loaded you can use either the dowel method or the turn and measure method to set the X offset for the tool table. For a drill holder you can indicate the drill in the center of the spindle for X0.

Note
Don’t forget to change back to Touch off to workpiece once your done setting up your tool table offsets.
Master Tool

I call my general facing/turning tool that is in position one my master tool. This is the tool I use to set my Z offset for the G54 coordinate system. Once I have set the Z offset for the coordinate system then the rest of the tools will be offset to the same position. With my material in the spindle I do as above and set the G54 Z offset using the dowel method and enter in the diameter of the dowel when touching off.

Warning
Always make sure you have a tool loaded with Tn M6 G43 before touching off. No tool is loaded by default when you start Axis.

Because I use the same dowel to touch off I was able to create a Pyvcp button to touch off the Z zero of the material. I added the following bits of code to my hardinge config to create the button. If you don’t have a Pyvcp in your config see the LinuxCNC docs to create one or use the StepConf Wizard to add one. You will also need halui loaded which can be done in the ini file as shown.

hardinge.xml
<button>
<halpin>"z-material-touchoff"</halpin>
<text>"Z Material Touch Off"</text>
<bd>3</bd>
</button>
postgui.hal
net z-material halui.mdi-command-00 <+ pyvcp.z-material-touchoff
harding.ini
[HAL]
HALUI = halui

[HALUI]
MDI_COMMAND = G10 L20 P1 Z0.375