• Spring 2024 meetup in Calgary - tentative date Saturday, April 20/2024. Other regions are also discussing meet ups. If you want one in your area get going on organizing it! discussion
  • We are having email/registration problems again. Diagnosis is underway. New users sorry if you are having trouble getting registered. We are exploring different options to get registered. Contact the forum via another member or on facebook if you're stuck. Update -> we think it is fixed. Let us know if not.
  • Spring meet up in Ontario, April 6/2024. NEW LOCATION See Post #31 Discussion NEW LOCATION

Finding Lathe Spindle center line in CNC with multiple tools

jcdammeyer

John
Premium Member
OK. This thread is going to be a bit of work in progress. Mostly me babbling about what I've been doing in software. With my Mill Tool Setter and probe setting up LinuxCNC to deal with variable length tools is pretty easy. But when I started thinking about how to do this on a Lathe it's amazing how complicated it became.

I have a fully manual Southbend Heavy 10L with my ELS on the Z axis. Also the Gingery with X and Z and spindle sensor so I can run either MACH3 or my ELS. The problem with both lathes is they have a compound slide and tool holders that are moveable.

My ELS software took that into consideration because we always cut with the X axis set to 0.000. Want to do a 0.025" depth of cut just move the cross slide in 0.025" and zero the axis again. I use the dials on the lathe the same way so I don't have to keep track of where I was after I've returned to the start position. Now was that 0.032 on the dial or 0.022. Much easier to return to 0.000 and then create a new depth.

Anyway, for CNC it's important to know where the spindle axis is (x = 0.000) so that if you want to turn to a given dimension you program that into the G-code. Lathe software, just like the cross feed dials can run radius or diameter mode.

OK. About CNC. When started up and homed the X is usually moved away from the center line to some point and then the x world coordinate system is set to 0.000. At this point we really don't know where the center line is unless it's programmed into the system as an absolute distance from the home switch. Until you move the compound, insert a different tool or just even tweak the tool holder a bit.

The easiest way to find the lathe center line is to chuck something and turn it to a known diameter. Let's say we turn a piece of rusty 1.25" HRS down to exactly 1.000". As long as nothing is moved we now know where the centerline is. It's 0.5" from the surface of what we just turned.

In the CNC world we set set relative co-ordinates to figure that out. Since we've turned to 1" and we know the tool tip is just 0.5" from the center line the Tool Touch of feature is used to set the tool tip at 0.5" so the DRO display shows that value and a move closer to center line with a 0.025" depth of cut or in CNC terms to bring it to 0.950 diameter.

I had a lot of trouble getting my head around the associated offsets but I think I finally have it. I whipped up a Delphi program to emulate some of the LinuxCNC AXIS screen with faked motion.

Here are the screen shots. After a physical home operation a move of 4" towards the centerline on this fake lathe get's us to a point where the tool cuts exactly a 1" diameter cylinder. (fake lathes are like that... perfect...).

LatheMove4.0.jpg

Now since we've measured the work with our micrometer at 1.0000" we know the lathe axis is 0.5000" from the tool tip. This is where we now set our reference identified by G54. The machine coordinates are held in G53. And the DRO display is the POSITION. In G-Code we change coordinate systems by issuing G54 or G55 or G56. In a mill it means the same G-Code can carve out 3 different items where the 0,0 location is offset by the part size but still 0,0.

Since we know we're 0.5" from the center line we need to set the G54 home position with the Touch Off feature.

TouchOffTool.jpg
Notice what happens when the Accept button has been pressed.
LatheAxisFound.jpg
Now our DRO POSITION shows that the tool tip is indeed at 0.5" from the center line. The world coordinate position is still -4.0 from the limit switch. And because of the touch off the G54 offset is 4.5"

Now let's make a 0.025" cut or more specifically turn it to 0.95" diameter. So we move to 0.475" from the center line to cut 0.025". My log there shows that as a negative (towards the center line) movement.
LatheCut0.025.jpg


That's all for now. Next step is to create a tool table and see if I can change tools and have the POSITION automatically change with different length tips using the Tool Touch Off Button. Hopefully I have the math and the sign of the offsets correct.
 

jcdammeyer

John
Premium Member
A quick update on this. Haven't done anything with the software or the lathe because I ran into the "How do I do this efficiently?" question. Because my tool setter for the mill finally arrived I thought I'd explore how LinuxCNC handles this.

That's been a bit of a rabbit hole and I'm still not entirely sure how to handle tools in the tool table with fixed lengths and also variable lengths dynamically during the running of a G-Code program.

To figure out what LinuxCNC and mill are doing I've modeled some of the physical parts of the mill to see if I can make the distances match. Attached is a PDF with the mill to table, to toolsetter and to a work piece that is 5" tall.

For example here's my VERSA Probe in an TTS ER32 collet holder.
1673202152398.png
And the TTS mill holder
1673202315994.png
Finally the tool setter.
1673202363386.png
As yet I don't have the dynamic adjustment plus tool table entries working together.

Edit: Updated the PDF with better values.
 

Attachments

  • MillMockupValues.pdf
    249.9 KB · Views: 1
Last edited:

jcdammeyer

John
Premium Member
@jcdammeyer John what mill tool setter did you get? And why?
I bought the more expensive one that claimed a hardened surface. It has both the optical sensor inside along with a mechanical switch further down that I intend on putting in series with the Z axis limit. So if for some reason it keeps going down the limit switch will prevent further motion.

This is the one I bought: https://www.aliexpress.com/item/1005003797600365.html

Believe it or not at the time that was the lowest price. Now I search for Tool Setter CNC and the same one appears to be available for $40. The other ones I was considering were all in the $75 range.
Go figure eh?

I suppose I should be upset that I paid double. But the first time I ordered one it vanished and then the seller refunded the money because it had never actually been shipped. All in the middle of the COVID lockdown in China last year. So I waited and then ordered again from a different company about 7 months later.
 

little ol' e

Jus' a hobby guy
That's been a bit of a rabbit hole and I'm still not entirely sure how to handle tools in the tool table with fixed lengths and also variable lengths dynamically during the running of a G-Code program.
I'm not sure what you mean here.
On your CNC mill,

Are you setting your tools incrementally from your tool setter in relationship to your G54 fixture offset? Or are you using the absolute position from your machine home position?
 

jcdammeyer

John
Premium Member
Good to hear, I hope it works out .
What you can do in LinuxCNC is use the Touch Off and Tool Touch Off buttons. Complete with offsets.
The easy way is to use a piece of round known diameter steel (say 0.5") and adjust the knee (or quill) until it just rolls under the cutter. Then set that as the work 0 position less the 0.5" offset.

After that you can do that with all the other tools (All TTS or some sort of quick change) but this time use the set tool tool zero rather than work zero. That fills in the tool table with the length relative to that first tool. So a tool change always results in the cutting edge of the tool at work 0.

Or you can use the TTS method with a tool height setter kit that holds the tool on a surface plate and uses a digital height gauge to record the tool length via USB to the PC.

Or with a tool setter like the one I bought, you can insert a different drill bit into the chuck, move it above the setter and ask the system to determine the total length from TTS flange (spindle surface) to drill tip. What can be installed into the tool table then is the length of that TTS assembly.

I use the touch probe (with it's own length in the tool table) to set the work zero position for the G54.Z
After that changing tools with the G43 uses the tool table value to 'tweak' the G54.Z.
 

jcdammeyer

John
Premium Member
I'm not sure what you mean here.
On your CNC mill,

Are you setting your tools incrementally from your tool setter in relationship to your G54 fixture offset? Or are you using the absolute position from your machine home position?
Absolute distance from spindle face. What the TTS holder registers against.
 

little ol' e

Jus' a hobby guy
Absolute distance from spindle face. What the TTS holder registers against.
Sounds good, Thanks for the clarification.

I don't have a tool height setter like you posted. I still do it the old way. Both absolute and incremental, depending on which machine I'm using.

I need to look into getting a couple 1 of these days .
 

jcdammeyer

John
Premium Member
Sounds good, Thanks for the clarification.

I don't have a tool height setter like you posted. I still do it the old way. Both absolute and incremental, depending on which machine I'm using.

I need to look into getting a couple 1 of these days .
I've been using this probe screen (V2 I think) with my versa probe and now the tool setter.
However the buttons that call the G-Code do not generate the correct results. I'm not sure why, so over the last few weeks I've been trying to get a handle on it and the G-Code.
The problem is the use of GIT for making the software public. Each user spawns off a new version and suddenly there are 3. Each with advantages. One user also moved stuff around on the screen but has some good G-Code ideas.
Then the discussion groups vary all over the place depending on which version is being discussed and what the buttons do for setting tool length and work zero.

I'm going to do up a PDF doc (mostly for myself) that describes how to set all the values. I'll post it here when I'm done.
 

jcdammeyer

John
Premium Member
Here's my approach to determining the tool setter trip location.
1. Home system
2. Move up to the stacked pair of 1-2-3 blocks set for 4". Use MPG to sneak up until blocks no longer slide under spindle face. Note machine co-ordinate Z value. (-8.701 in one trial)
3. Now issue the following G-Codes
a) G91 for relative rather than absolute
b) G38.3 Z-1.0 F2.5 which moves down at 2.5 ipm and stops when tool setter triggers
c) note machine co-ordinates Z value (-9.0423)
d) G90 don't forget to go back to absolute values.

Now the math. The Block value -8.701 minus the 1-2-3 blocks (4") results in -12.701 which is spindle quill distance to table at home position.
Next subtract the Tool Setter trip point from that spindle quill distance. (-3.6587). The positive value is the tool setter height.

Now put in a TTS tool and once again position over the tool setter. Bring it close and then use the same procedure as step 3 above. Except now the value will be less negative.
Same math as before. -12.701 - tool setter height(-3.6587) - the tool setter reading(-6.2968) = 2.7455 rounded up is abs(-2.75)"

That value is entered into the tool table and used by the system to offset from the current G54.Z value.
 

Attachments

  • MeasureToolSetter.jpg
    MeasureToolSetter.jpg
    973 KB · Views: 2
I can't comment too much on the system you are using, in Acorn (Centriod) its a tool table that lets me either enter via setter or manual setting, once I've ID'd my 0,0,0 location it runs.

Could it be that you have a setting in your tool table that is messed up?
 

jcdammeyer

John
Premium Member
I can't comment too much on the system you are using, in Acorn (Centriod) its a tool table that lets me either enter via setter or manual setting, once I've ID'd my 0,0,0 location it runs.

Could it be that you have a setting in your tool table that is messed up?
LinuxCNC is the same. The tool table can be edited or you can run a macro from a button that measures the tool using the tool setter. The problem is the macro that came with the screen expects the probe to first touch off the surface of the work. Then as each tool is selected it's first measured and then that value is used to put the tool tip at that same zero. Internally the measurements are relative to that 0.

Someone else by creating a new version from the GIT repository did more like what I want but also re-arranged the screen which I didn't want. Here they check to see if the value in the tool table is 0 or not.

If it's not zero then that value is used. If it's zero then it could be a 3/8" 2 flute cutter installed into a standard R8 collet or a drill bit stuck in a chuck in the TTS holder. This has to be measured before it can be used. So then G-Code goes and measures the tool as installed and now the 0 location matches.

For your ACORN where is your Z axis home switch? Does the head (quill) move up and down or the knee? Is the machine co-ordinate system at some specific mid point or at a travel limit?

Oh and what type of tool holders do you use?
 
Last edited:
Z is on the Quill top at max Z+, max Z- is a soft limit based from upper limit. I originally considered power knee too, but determined that 99.9% of my work is within the quill travel. The knee just adjust the clearance as required for for mounting, work and cutters.

The danger is before the initial home is run, you can exceed to soft stops unsuccessfully with a hard shut off prior to the homes being initialized which applies to all 3 axises. Additionally the homes can be exceeded at this time at higher speeds as the limit switch and hard limit are only a few thou apart to maximize travel and workable area. The machine is setup to run 4 axis but have yet to add the 4th.

Based on R8, weldon Holders and ER32's and one straight shanked ER16 for reach on special applications. Tool changer is not in the future.

To ensure repeatable set ups in the vise(s) I use M200 (wait for user pause with dialog) to position tool as stop reference to insert the part to be machined, after of the initial 0,0,0 position is set (which only needs to be done once).

To set the 0,0,0 location I use the tooling with a 0.0005 shim stock to locate and then offset in x&y as required, z is direct. I don't worry about the shim and consider it an approx null piece based on the accuracy of the machine overall. If I wanted I could also include this in the offset to claim perfect numbers.

Based on current usage I see the potential of upgrading to a higher axis count machine complete with tool changers.

Once you start down CNC the options and potential of what can you do expands exponentially (along with the cost to play). It is a great road, but learning on route does cost on occasion.
 
Last edited:

jcdammeyer

John
Premium Member
That's more how like how I run my CNC router with home and limit at the top. Since it's a 1/4 or 1/8" collet a new tool is touched off to wherever I want Z=0 to be using a PC board with a wire attached to an input. A ground clip is connected to the tool bit.
I wrote a macro for MACH3 that touches off on the PC board and then subtracts the thickness of the board.
I have a rod attached to the Z axis that is adjustable and serves as the lower limit switch to avoid hitting fixtures. The Router has a 4th rotary axis but I have not used it.
 

jcdammeyer

John
Premium Member
Here's a photo of the touch plate and limit switch mechanism on the router.
TouchPlateLimit.jpg
Given the the general accuracy of the MDF etc. what I have there is more than good enough.
Here's a reflector pattern for casting. Did the hollowing out bottom first. Then the top.
ReflectorReadyForFinishing.jpg
And finished...
ReflectorPainted3.jpg
 

jcdammeyer

John
Premium Member
On you drawings where do you set Z=0, do you build up or down?
Tend to draw up from XY plane. Doesn't matter from the CAM perspective as I can set zero wherever I want.
For example for the spiral finish machining of the underside I put the Z on the bottom of the part at the center. The tool bit was a 0.375" ball mill cutter.
1673631959985.png
It's possible to have multiple work zero positions depending on what type of machining is desired. This started out as a sandwich of MDF pieces.
1673632470592.png
 
Top