I have a TAIG micromill and will be drilling about 200 (.201 diameter) holes 2.5" deep in 6061-T6 aluminum. I'm using a spindle speed of about 1800 rpm and a black oxide HSS drill bit. I do not have flood coolant and the way I have my machine wired right now would cause problems if I did =). I tried using a G83 canned cycle and then adding oil while it was running but there is not much time to put oil in the hole and it ends up spinning off the drill bit. I wrote a lua program that writes GCode for peck drilling but with a programed stop every 5 pecks so I can add a drop of oil to the hole. Do you know of another way to do this?
In anycase this is the lua program and the code that was generated. If your interested in LUA goto www.lua.org and download the lua for windows installation. It gives you the basic lua interpreter *and* a ton of useful libraries. Its a fairly powerful and easy to learn programming language.
In anycase this is the lua program and the code that was generated. If your interested in LUA goto www.lua.org and download the lua for windows installation. It gives you the basic lua interpreter *and* a ton of useful libraries. Its a fairly powerful and easy to learn programming language.
Code:
local RetractHeight = 0.1
local HoleTop = 0.0
local HoleBottom = -2.65
local PeckAmount = 0.1
local FeedRate = 3.6
local StopPecks = 5
print("(PAUSABLE_PECKDRILL - R"..RetractHeight.." HoleTop"..HoleTop.." Z"..HoleBottom.." Q"..PeckAmount.." F"..FeedRate.." StopPecks"..StopPecks..")")
local PeckCount = 0
local Z = HoleTop
repeat
-- rapid to current Z
print("G00 Z"..Z)
-- feed drill into material
Z = Z - PeckAmount
if Z < HoleBottom then
Z = HoleBottom
end
Z = tonumber(tostring(Z)) -- necessary to avoid errors
print("G01 Z"..Z.." F"..FeedRate)
PeckCount = PeckCount + 1
-- exit loop if at hole depth
if Z == HoleBottom then
break
end
-- stop program after StopPecks pecks
if Z ~= HoleBottom and PeckCount == StopPecks then
print("G00 Z"..RetractHeight)
print("M0")
PeckCount = 0
-- otherwise just rapid to top of part to clear chips
else
print("G00 Z"..HoleTop)
end
until false
print("G00 Z"..RetractHeight)
os.exit()
Code:
(PAUSABLE_PECKDRILL - R0.1 HoleTop0 Z-2.65 Q0.1 F3.6 StopPecks5)
G00 Z0
G01 Z-0.1 F3.6
G00 Z0
G00 Z-0.1
G01 Z-0.2 F3.6
G00 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