Few questions on a tool setup procedure (lathe) -- does this make sense?
Posted: Sun Sep 19, 2021 8:08 pm
I have a lathe running CNC12 on Allin1DC. It doesn't have a turret or gang setup; instead, it has a Dorian QCTP. I also don't have the Centroid tool touch-off (though I wish I did). Instead I'm trying to hack together a rough equivalent method for automatic tool measuring using a "reference tool" (not unlike one for a knee mill), which is one of those common electronic probes that lights up and beeps when the electrical circuit is closed. I have this sitting in a dedicated toolholder. I have a second probe which is held in the chuck; it also lights up and beeps when its electrical circuit is closed, but it resembles a tool touch-off instead (has a pancake-shaped surface that can be touched on both the X and Z positions for locating).
The idea: hold probe #2 in the chuck when I want to set up tools. Put probe #1 in the toolpost. Dedicate G59 as a "scratch" coordinate system (every other one uses X = 0 as the centerline of the spindle, this one will not and instead use it as where the reference tool touches in X). Then when I want to add new tools, I perform the following operations:
Secondly, assuming all this does work as I expect, I wrote a macro to automate the process:
I'm confused on one point -- lathes don't have G91/G92 for incremental/absolute mode. How can I specify, when setting the WCS parameters, that I do mean the current positions?
I'm also wondering, if there's a way to display on the screen all the existing tools at the start of the N300 block, to make life easier for the operator so they don't have to recall from memory what all the tools and their numbers are.
The idea: hold probe #2 in the chuck when I want to set up tools. Put probe #1 in the toolpost. Dedicate G59 as a "scratch" coordinate system (every other one uses X = 0 as the centerline of the spindle, this one will not and instead use it as where the reference tool touches in X). Then when I want to add new tools, I perform the following operations:
- G59
- Jog the X and Z locations of the tool touch-off using the reference tool. Set these as G59's zeroes.
- Insert tool I want to touch.
- Jog its Z on the tool touch-off. Set it as the tool's Z offset in tool library.
- Jog its X on the tool touch-off. Set it as the tool's X offset in tool library.
- Repeat steps 3-5 for every tool to be measured.
- Insert reference tool.
- Insert workpiece.
- Jog workpiece's Z using reference tool. Set it as G59 Z-zero and G54 Z-zero.
- Jog workpiece's outer diameter X using reference tool. Set it as G59 X-zero.
- Switch to G54.
- Any tool's cutting edge (provided radius etc are set correctly) will, when X=0, be at the centerline of the spindle.
- Any tool's cutting edge (provided radius etc are set correctly) will, when Z=0, be at the Z end of the part.
- The Z=0 will be the Z-end of the part.
Secondly, assuming all this does work as I expect, I wrote a macro to automate the process:
Code: Select all
; Tool and part setup macro.
; Uses G59 as the scratch coordinate system to set the part X/Z (NOT CENTERLINE).
#100 = 0.125/2 ; Radius of the probe.
#101 = 1 ; Reference tool number.
#102 = -1 ; Current tool number we're probing.
N100
G59
T #101 00
M225 0 "Jog reference tool to Z location of the tool setter"
#2600 = 0
G10 P#101 Z0
M225 0 "Jog reference tool to X location of the tool setter"
#2500 = [-#100]
G10 P#101 X-#100
N200
M224 #102 "Enter tool number to probe, -1 to cancel."
IF #102 = -1 THEN GOTO 300
T #102 00
M225 0 "Jog tool to Z location of the tool setter."
G10 P#102 Z0
M225 0 "Jog tool to X location of the tool setter."
G10 P#102 X0
GOTO 200
N300
M225 0 "Press CYCLE START to probe part, cancel to exit."
T #101 00
M225 0 "Jog reference tool to Z location of the part."
#2600 = 0
M225 0 "Jog reference tool to X location of the part."
#2500 = [-#100]
N400
M225 0 "Probing and setup complete."
G54
I'm also wondering, if there's a way to display on the screen all the existing tools at the start of the N300 block, to make life easier for the operator so they don't have to recall from memory what all the tools and their numbers are.