CNC Broaching Macro Program For Lathes with Fanuc Controller

Do you need to write a program to broach a keyway, spline, or slot in your CNC machine? Push broaching is continually evolving as manufacturing operations are becoming automated.

– MACRO PROGRAMMING CAN ONLY BE PERFORMED IF YOU HAVE ALREADY PURCHASED THE MACRO OPTION FOR YOUR MACHINE –

The following example is from a DMG Mori lathe with Y axis. The 5 lines at the top of the program which are shown in RED, are theoretically the only numbers you’d need to adjust for your keyway application. Although this is a proven program, it may not work the same in every machine. Use caution when running.

Adjust the numbers in RED with your Length of cut, Starting diameter, Ending diameter, Depth of cut, and Feed rate (in inches per minute).

O4567
(BROACH MACRO MAIN PROGRAM)
G0G17G54G40G80G97G99
#501=2.26(ENTER KEYWAY LENGTH HERE)
#502=1.303(ENTER STARTING DIAMETER HERE)
#503=1.520(ENTER ENDING DIAMETER HERE)
#504=.0010(ENTER RADIAL DOC PER PASS HERE)
#505=300.(ENTER IPM FEED RATE HERE)
(DO NOT EDIT THESE 3 LINES)
#506=[[#503-#502]/2](AUTO CALCULATES FULL DEPTH)
#507=[#506/#504](AUTO CALCULATES NUMBER OF PASSES)
#508=1(RESETS PASS COUNTER)
N1G00G30U0V0(BROACH)
G30W0
G18G54
T1212
G98
G0Y0.
G50S500
#508=1(RESETS PASS COUNTER)
M45(C-AXIS MODE ON)
G0C0.
M68(SPINDLE BRAKE ON)
G0Z1.0M8
G0X[#502]
M98P0070L[#507]
G0G99Z1.M9
M69(SPINDLE BRAKE OFF)
G30U0.V0.
G30W0.
M46(C-AXIS MODE OFF)
M30
O0070
(SUB PROGRAM)
G98G1Z[[[#501]*[-1]]-.3]F[#505](FEEDS IPM .300 BEYOND #501)
X[#502](RETRACT ON X)
G0Z1.0(RETRACT ON Z)
#508=#508+1(PASS COUNTER)
G0X[#502+[#508*[#504*2]]](RAPID TO NEXT X POSITION)
M99(RETURN TO MAIN PROGRAM)
Share

Written by:

15 Posts

View All Posts
Follow Me :
error: Content is protected !!