Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: j2mariashop on January 29, 2021, 03:23:15 PM
-
I cannot afford to buy a tool holder for each drill bit that I use and so was hoping to use one drill chuck with its own T# and multiple drill bits. I would then swap out the drill bit for a different size for each drill canned cycle.
While the diameter of the drill doesn't matter (XOffset) the issue is the ZOffset. I obviously would have different tool length offsets for various drill bits. So, for a simple operation, I would use my reference tool T01 to set Part Z0. Then, after a turning operation, I would call for a drill tool (say, T12 with a center drill) from my tool table. Once I drill the center, I swap out to the required diameter drill mounted in the same chuck. I call T12 in my GCode, but how do I account for the now changed Z offset? I cannot hold stick-out of the drill from the chuck constant as each drill would have different effective lengths.
I searched the forum but couldn't find any suggestions.
Joe
-
If you are on a lathe with Mach3 lathe screen then you call tools with T0101 or T0102 or T0103 where the first 2 numbers are the tool number and the second pair are the offset number to use with that tool.
T0101 tool 1 offset 1
T0102 tool 1 offset 2
T0102 tool 1 offset 3
T1012 tool 10 offset 12
Etc.
-
Also works in 4 ;)
-
Hi Graham and Brian
I'm not sure I explained the problem. I want to use the same toolholder and switch out drills. Since the drill bit stick out from the chuck will vary with the size of the drill I need a way to reset the Z offset for the same holder. Using T101..T104 still requires me to install the new drill bit at some preset stick out stored in the tool table from the drill chuck. I will have to install the next drill bit and ensure the stick out is the same value as previously entered in the tool table.
However, I figured out a way today. I designated, say, T24 as my dedicated drill bit holder. Then, all I needed to do was to touch the tip against PartZ0, place the cursor in the Z col. of Tool 24 in the tool table, and click Measure. The Z offset is now in the table and I can call a drill canned cycle that uses T24. When I want to swap to the next larger drill, then I repeat the process of touching off on Part Z0, clicking Measure, and then calling the canned cycle with T24. Worked fine for me today.
Joe
-
Hi Joe
You could put a collar (or ring) on each of the drills so they go the same distance into the chuck each time - so you only have to set the offset once not each time you change your drill.
Steve
-
A little over the top but works for me. After putting a collar on each one (I 3d print each one with a #6 set screw) you can then call a macro with the offset as one of the parameters in your gcode. For my fly rod ferrules I have to spot, drill, flat bottom and then ream each one. Multiply that by 10 different sizes and the tool table becomes cumbersome. My tool 60:
--[[
Macro to set Z or X offset or tool description
example: m6061 z1.3333 d.250
--]]
function m6061(hParam)
if (hParam ~= nil) then
--mc.mcCntlSetLastError(inst, 'handle == ' .. tostring(hParam));
local inst = mc.mcGetInstance();
local zVal = mc.mcCntlGetLocalVar(inst, hParam, mc.SV_Z)
local zFlag = mc.mcCntlGetLocalVarFlag(inst, hParam, mc.SV_Z)
local xVal = mc.mcCntlGetLocalVar(inst, hParam, mc.SV_X)
local xFlag = mc.mcCntlGetLocalVarFlag(inst, hParam, mc.SV_X)
local dVal = mc.mcCntlGetLocalVar(inst, hParam, mc.SV_D)
local dFlag = mc.mcCntlGetLocalVarFlag(inst, hParam, mc.SV_D)
if(zFlag == 1)or(xFlag==1)or(dFlag==1) then
if zFlag==1 then
rc=mc.mcToolSetData(inst,mc.MTOOL_LATHE_Z,61,tonumber(zVal))
end
if xFlag==1 then
rc=mc.mcToolSetData(inst,mc.MTOOL_LATHE_X,61,tonumber(xVal))
end
if dFlag==1 then
rc=mc.mcToolSetDesc(inst,61,'Bit Diameter: '..tostring(dVal))
end
else if zFlag==1 then
mc.mcCntlSetLastError(inst, 'ERROR: Z, X or D value required with M6001');
mc.mcCntlEStop(inst);
end
end
else
mc.mcCntlSetLastError(inst, 'ERROR: handle == nil');
end
end
if (mc.mcInEditor() == 1) then
m6061()
HTH
RT