Routines for tool setter
26 Oct 2017 14:51 #100836
by 10K
Routines for tool setter was created by 10K
I'm having some trouble writing a routine to use my tool setter on my lathe. I have a four-way tool setter. For the X axis, I do this:
That works fine for multiple tools, since X=0 is at the centerline of the lathe and never changes, and I know exactly where the toolsetter is in relation to the centerline.
The Z axis is another story. The tool table needs to be set relative to the part zero, which changes with each part chucked. As long as I';m using only one tool, everything is OK using a similar routine to the above. The problem is when I have more than one tool. I can set the first tool Z and the part zero, and then I have to manually set the second tool Z=0 off the part - that is, I can't use my tool setter.
I think that I need to set the Z tool table offsets and the part zero relative to the machine zero. I'm not sure exactly how to do this, and searching for an example on the internet has not turned anything up.
Here's how I've been setting the part zero:
I've tried reading about the various G10 codes, but it's certainly not obvious how it all works. Any ideas?
o<probe_x1> sub
(X1 - Set X axis using tool setter)
(probe_x1.ngc)
G7 G18 G20 G54 G90 G94
o10 if [#5400 EQ 0]
T99
o10 else
T#5400
o10 endif
M6
G43
F1
G38.2 X[#<_x>*2-0.30]
(Distance between probe face and centerline lathe = 1.927 diameter)
G10 L10 P#5400 X1.927
G43
G00 X[#<_x>*2+0.25] F50
o<probe_x1> endsub
M2
%
That works fine for multiple tools, since X=0 is at the centerline of the lathe and never changes, and I know exactly where the toolsetter is in relation to the centerline.
The Z axis is another story. The tool table needs to be set relative to the part zero, which changes with each part chucked. As long as I';m using only one tool, everything is OK using a similar routine to the above. The problem is when I have more than one tool. I can set the first tool Z and the part zero, and then I have to manually set the second tool Z=0 off the part - that is, I can't use my tool setter.
I think that I need to set the Z tool table offsets and the part zero relative to the machine zero. I'm not sure exactly how to do this, and searching for an example on the internet has not turned anything up.
Here's how I've been setting the part zero:
G10 L20 P0 Z0
I've tried reading about the various G10 codes, but it's certainly not obvious how it all works. Any ideas?
Please Log in or Create an account to join the conversation.
26 Oct 2017 20:34 #100853
by emcPT
Replied by emcPT on topic Routines for tool setter
I have on my lathe, currently about 64 tools, all calibrated. I do not use a tool settler, so not sure if my method helps, but I have a tool, that is normally always on the machine that is a facing/outside general turning tool, that I call the master tool.
For this tool Z=0 on the offset page and all other tools are calibrated in Z, set up against a facing that is the result of this tool. So if I want to calibrate a new tool, I first set the DRO Z=0 then face something with the master tool, call the tool to calibrate and touch it on the facing, then calibrate so that the DRO shows Z=0 again.
All tools in X axis are calibrated by machining and measuring the diameter.
My experience from tool settlers is that they are good to "approximate" setting the tool, not for exact dimensions. Also if the tool arm suffers something it will not be accurate anymore, so for me, the experience with a tool settler was not good.
For this tool Z=0 on the offset page and all other tools are calibrated in Z, set up against a facing that is the result of this tool. So if I want to calibrate a new tool, I first set the DRO Z=0 then face something with the master tool, call the tool to calibrate and touch it on the facing, then calibrate so that the DRO shows Z=0 again.
All tools in X axis are calibrated by machining and measuring the diameter.
My experience from tool settlers is that they are good to "approximate" setting the tool, not for exact dimensions. Also if the tool arm suffers something it will not be accurate anymore, so for me, the experience with a tool settler was not good.
Please Log in or Create an account to join the conversation.
28 Oct 2017 23:33 #100960
by 10K
Replied by 10K on topic Routines for tool setter
Thanks for the feedback. Sorry you had trouble with your tool setter. I have the arm type also, and I can see that it it gets hit (which is easy to do), it could get off. Otherwise, it seems to be repeatable to 0.0001 or so.
Up to now, I have been setting my tool offsets as you describe, but I really want to use the tool setter instead.
After a bit of work, I think I answered my own question. I read the G code guide again, and still didn't exactly understand it, so I did some experiments. I found that if I used the routine above, with one change, it worked as expected. Instead of doing a G10 L10 P#5400 Z0, I used G10 L11 P#5400 Z0. That code sets the offsets in G59.3 (P9) instead of in G54 (P0). Then I set Z=0 using G10 L20 P0 Z0, which applies it to the G54 (P0) coordinate system and NOT to the G59.3 (P9) coordinate system.
The Z offset set in the P9 coordinate system applies to all coordinate systems, and is referenced to the machine zero set when the machined is initially homed. The appropriate calculations are done to adjust for the different Z=0 in the two coordinate systems.
Knowing this makes the wording in the LInuxCNC G Code Reference make sense. Before I knew this, it didn't make sense to me!
Oh, and I'm still using the original routine using G10 L10 P#5400 X(tool setter offset measurement) to set the X axis.
Up to now, I have been setting my tool offsets as you describe, but I really want to use the tool setter instead.
After a bit of work, I think I answered my own question. I read the G code guide again, and still didn't exactly understand it, so I did some experiments. I found that if I used the routine above, with one change, it worked as expected. Instead of doing a G10 L10 P#5400 Z0, I used G10 L11 P#5400 Z0. That code sets the offsets in G59.3 (P9) instead of in G54 (P0). Then I set Z=0 using G10 L20 P0 Z0, which applies it to the G54 (P0) coordinate system and NOT to the G59.3 (P9) coordinate system.
The Z offset set in the P9 coordinate system applies to all coordinate systems, and is referenced to the machine zero set when the machined is initially homed. The appropriate calculations are done to adjust for the different Z=0 in the two coordinate systems.
Knowing this makes the wording in the LInuxCNC G Code Reference make sense. Before I knew this, it didn't make sense to me!
Oh, and I'm still using the original routine using G10 L10 P#5400 X(tool setter offset measurement) to set the X axis.
Please Log in or Create an account to join the conversation.
Time to create page: 0.102 seconds