SolidCAM
Published

A Circle Milling Custom Macro

Older model Fanuc controls and some current model Fanuc-compatible controls have a feature to help you machine round counterbores with an end mill (G12 and G13). For some reason, Fanuc stopped providing these helpful G codes.

Share

Older model Fanuc controls and some current model Fanuc-compatible controls have a feature to help you machine round counterbores with an end mill (G12 and G13). For some reason, Fanuc stopped providing these helpful G codes. If your control has custom macro B, you can get them back. This column shows one of these custom macros—the clockwise circle milling custom macro (like G12). With minor modifications, you can create the counter-clockwise version. This drawing shows the arguments to be used in the G65 command.

Here is a calling program that uses the circle milling custom macro:

O0001 (Main program)
.
(Machine hole)
.
N075 T04 M06 (1.0 END MILL)
N080 G54 G90 S1200 M03 T05 (Start spindle)
N085 G00 X2.5 Y2.0 (Rapid to hole-center)
N090 G43 H04 Z0.1 (Rapid approach in Z)
N095 M08 (Turn on coolant)
N100 G65 P1000 X2.5 Y2.0 D3.0 R0.1 Z-1.0 A1.25 T1.0 F5.0 H1.0
(Mill circle)
N105 G91 G28 Z0 M19 (Return to tool change position)
N110 M01 (Optional stop)
.
(Program continues)
.
N200 M30 (End of main program)

The H word is used to specify whether a hole currently exists in the center of the circle to be milled. If it does, the end mill will fast feed to the work surface in Z. If not, it will feed at half the specified feed rate (F word in G65 command).

Here is the custom macro:

O1000 (Circle milling custom macro)
(TEST FOR MISSING ARGUMENTS)
N1 IF [#24 EQ #0] GOTO 95 (X)
IF [#25 EQ #0] GOTO 95 (Y)
IF [#26 EQ #0] GOTO 95 (Z)
IF [#18 EQ #0] GOTO 95 (R)
IF [#7 EQ #0] GOTO 95 (D)
IF [#20 EQ #0] GOTO 95 (T)
IF [#9 EQ #0] GOTO 95 (F)
IF [#1 EQ #0] GOTO 95 (A)
IF[#11 EQ #0] GOTO 95 (H)
(A MUST BE BIGGER THAN HALF OF T)
IF [#1 GT [#20/2 +0.1]] GOTO 2
#3000=101
(APPROACH RADIUS TOO SMALL)
(RAPID TO APPROACH POSITION)
N2 G00 X#24 Y#25]
Z#18
 

(TEST FOR HOLE IN CENTER)
IF[#11 EQ 1.0] GOTO 5
G01 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#26
X#24 Y#25
GOTO 99
N95 #3000=100 (INPUT VALUE MISSING)
N99 M99
(End of custom macro)

Kennametal
DN Solutions
Paperless Parts
OASIS Inspection Systems
CHIRON Group, one stop solution for manufacturing.
To any Measurement Question there is an Answer
SolidCAM
Koma Precision
Hurco