Hello Leon,
I have an Okuma MA600 Machining Centre and developed a Helical milling macro many years ago. This subroutine allows us to easily and very quickly program a hole of virtually any diameter with any appropriate tool. As long as the tool will allow helical ramping it will be able to be used in this routine.
I have set up a G Code macro link on the machine to link the library subroutine to G103... refer your manuals if you do not know how to do this... or ask me and I will post instructions for you.
anyway... the library file contains the following code in a file called HELLIMILL.LIB (on the machine)
OHELI
(MILL HELICAL SUBROUTINE)
IF [PD EQ EMPTY ] NALM2
IF [PE EQ EMPTY ] NALM3
IF [PF EQ EMPTY ] NALM4
IF [PP EQ EMPTY ] NALM5
IF [PS EQ EMPTY ] NALM6
IF [PW EQ EMPTY ] NALM7
IF [PZ EQ EMPTY ] NALM8
IF [PR EQ EMPTY ] NALM9
N2 TODR=PD/2 (RADIUS OF MAJOR DIAMETER)
N4 RATE=PS*PE*PF (CALCULATE LINEAR FEEDRATE)
N8 DPTH=PW-PZ (ACTUAL DEPTH OF HOLE)
N10 QTYP=DPTH/PP (QUANTITY OF PASSES REQUIRED TO MILL THREAD)
N12 QTYP=ROUND[QTYP+0.5] (ROUNDUP THE NUMBER OF PASSES)
N14 PTCH=[DPTH/QTYP]*-1 (CALC ACTUAL PITCH REQ)
N16 PASS=0 (COUNTER FOR NUMBER OF PASSES MILLED)
N18 G0 Z=PR (RAPID TO "R" PLANE)
N20 G1 Z=PW F6000. (FEED TO "W" WORKING SURFACE)
N22 G91 G41 DA X=TODR Z0 F=RATE (MOVE FROM CENTRE OF HOLE TO DIAMETER, TURNING ON CUTTER RAD COMP)
NJP1 G3 X0 Y0 I-[TODR] J0 Z=PTCH F=RATE (FULL PITCH)
N24 PASS=PASS+1 (INCREMENT COUNTER)
N26 IF [PASS LT QTYP] NJP1 (JUMP BACK TO NEXT PASS CONDITION)
N28 G3 X0 Y0 I-[TODR] J0 (FULL CIRCLE CLEANUP)
N30 G1 G40 X-[TODR] Z0 F=RATE*5 (BACK TO CENTRE)
N32 G0 G90 Z=PR (CLEAR HOLE)
N34 GOTO NEND
NALM2
VNCOM[1]=1
MSG(MISSING DATA "D")
M00
NMSG
VNCOM[1]=0
GOTO NEND
NALM3
VNCOM[1]=1
MSG(MISSING DATA "E")
M00
NMSG
VNCOM[1]=0
GOTO NEND
NALM4
VNCOM[1]=1
MSG(MISSING DATA "F")
M00
NMSG
VNCOM[1]=0
GOTO NEND
NALM5
VNCOM[1]=1
MSG(MISSING DATA "P")
M00
NMSG
VNCOM[1]=0
GOTO NEND
NALM6
VNCOM[1]=1
MSG(MISSING DATA "S")
M00
NMSG
VNCOM[1]=0
GOTO NEND
NALM7
VNCOM[1]=1
MSG(MISSING DATA "W")
M00
NMSG
VNCOM[1]=0
GOTO NEND
NALM8
VNCOM[1]=1
MSG(MISSING DATA "Z")
M00
NMSG
VNCOM[1]=0
GOTO NEND
NALM9
VNCOM[1]=1
MSG(MISSING DATA "R")
M00
NMSG
VNCOM[1]=0
NEND G90
RTS
%
To use the program, follow the example below
Helical Milling Programming MA600
Definitions:
G103 G Code for the Helical program VIA G-Code Macro setting.
G100 Cancel Subprogram same as using G80 for std drilling cycles
D Hole Diameter
E Number of Flutes on the cutter
F Feed rate per Flute
P Z amount per rev. Pitch, in MM
R Reference Z Height
S RPM of tool
W Top surface of hole (Z).
Z Depth of hole.
Sample program:
Mill a hole 62mm diameter 70mm deep using a 4 flute 40mm diam tip tool.
N1 M3 S1432
N2 M8
N3 G0 Xstartpos Ystartpos
N4 G56 HA Z700
N5 Z20. (reference height)
N6 G103 D62 E4 F0.15 P4. R20. S1432 W0. Z-70.
N7 Xpos Ypos
N8 Xnext Ynext
or
N9 ARC or BHC or LAA...
N10 G100
N11 G0 Z20.
N12 M5
N13 M209
N14 Z700
N15 M6
N16 M1
...
As you might be able to see, the use of the helical milling routine is as simple as drilling a hole! The main tricks to remember when using the G103 command is to not just position at the first point and call the routine, as in like a drilling cycle, and then list the points for the next hole... but to list the first point and all other points on the line after the G103 line and make sure you cancel the cycle with a G100!
I have included comments for most lines to explain what they do... the bulk of the library file is actually taken up with alarm statements to help the user at the machine if any part of the G103 command is missing.
As the macro uses incremental mode for machining the hole, you can position the tool anywhere on the job and call this routine very easily.
I have found this macro to be VERY handy and a very fast way of programming helical milled holes.
Let me know if you find it useful.
Regards
Brian.