Circle Milling A Bolt Hole Pattern

There are times when you want to circle mill the holes on a bolt pattern. Possibly you want to rough the holes prior to finish boring.

Columns From: 12/1/2007 Modern Machine Shop,

There are times when you want to circle mill the holes on a bolt pattern. Possibly you want to rough the holes prior to finish boring. Here is a custom macro program (actually a combination of three custom macros) that allows you to do so.
First let’s look at an example main program and explain the input variables:

O0008 (MAIN PROGRAM)
N005 G54 G90 S800 M03 T02 (SELECT COORDINATE SYSTEM, ABSOLUTE MODE, START SPINDLE, GET NEXT TOOL READY)
N010 G00 X3.0 Y2.5 (RAPID TO CENTER OF BOLT HOLE PATTERN)
N015 G43 H01 Z.1 (INSTATE TOOL LENGTH COMPENSATION, RAPID UP TO WORKPIECE)
N020 G65 P1000 D1.0 A.375 T0.375 H1.0 (DEFINE CIRCLE MILL
VARIABLES)
N025 G65 P1001 X3.0 Y2.5 Z0 R1.5 D0.75 A45.0 H8.0 F5.0 (MACHINE ENTIRE BOLT HOLE PATTERN WITH DRILLING CYCLE)
N030 G91 G28 Z0 M19
N035 M30

Notice that there are two G65 commands in this program. The first (N020) defines the circle milling operation:

D: Diameter to mill
A: Approach radius
T: Tool diameter
H: Whether there is a hole currently in the center (from drilling)—this controls whether the end mill will rapid or feed to the hole bottom (H1.0: hole, H0: no hole).
The second G65 command (N025) defines the bolt pattern and does the machining.
X, Y: Bolt hole center
Z: Surface into which to mill
R: Radius of bolt pattern
D: Depth to mill
A: Angular distance between the holes
H: Number of holes
F: Feed rate for milling
There are actually three custom macros involved with this application:
O1000: Stores circle milling variable into common variables
O1001: Bolt pattern custom macro
O1002: Circle milling custom macro

O1000
#120 = #7 (DIAMETER OF MILLED HOLE)
#121 = #1 (APPROACH RADIUS)
#122 = #20 (TOOL DIAMETER)
#123 = #11 (HOLE OR NO HOLE)
M99
O1001 (BOLT CIRCLE MILLING CUSTOM MACRO)
#101=1 (INITIALIZE COUNTER)
#102=#1 (INITIALIZE CURRENT ANGLE TO A)
#103=360 / #11 (CONSTANT FOR INCREMENTAL ANGULAR DISTANCE BETWEEN HOLES)
#104=#26 + 0.1 (CONSTANT FOR RAPID APPROACH PLANE)
#105=#26 - #7 (CONSTANT FOR Z BOTTOM POSITION OF HOLE)
N1 IF [#101 GT #11] GOTO 99 (TEST IF LOOP IS FINISHED)
#110=#24 + COS[#102] * #18
(CALCULATE X POSITION FOR CURRENT HOLE BASED ON CURRENT ANGLE)
#111=#25 + SIN[#102] * #18
(CALCULATE Y POSITION FOR CURRENT HOLE BASED ON CURRENT ANGLE)
G65 P1002 X#110 Y#111 D#120 R#104 Z#105 A#121 T#122 F#9 H#123 (Mill circle)
#101=#101 + 1 (STEP COUNTER)
#102=#102 + #103 (STEP CURRENT ANGLE)
GOTO 1 (GO BACK TO TEST AT LOOP BEGINNING)
N99 M99 (END OF CUSTOM MACRO)


O1002 (Circle milling custom macro)
(APPROACH RADIUS MUST BE BIGGER THAN HALF OF TOOL DIA)
IF [#121 GT [#122/2 +0.1]] GOTO 2
#3000=101(APPROACH RADIUS TOO SMALL)
(RAPID TO APPROACH POSITION)
N2 G00 X#24 Y#25
Z#104
(TEST FOR HOLE IN CENTER)
IF[#123 EQ 0] GOTO 5
G00 Z#26 F#9
GOTO 6
N5 G01 Z#26 F[#9 * 5]
(MOTIONS TO MILL CIRCLE)
N6 G01 Y[#25 + #7/2 - #1] F#9
X[#24 - #1 + #20/2]
G02 X#24 Y[#25 + #7/2 - #20/2] R[#1 - #20/2]
J-[#7/2 - #20/2]
X[#24 + #1 - #20/2] Y[#25 + #7/2 -#1] R[#1 - #20/2]
G00 Z#104
X#24 Y#25
GOTO 99
N95 #3000=100 (INPUT VALUE MISSING)
N99 M99 (End of custom macro)

Comments are reviewed by moderators before they appear to ensure they meet Modern Machine Shop’s submission guidelines.
blog comments powered by Disqus
MMS ONLINE
Channel Partners
  • Techspex