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)
Shane

Share
Published by
Shane

Recent Posts

See the Production Machining Article: Broaching Tool Technology For Lathes Used to Slot Inconel Parts

We are thrilled to announce that CNC Broach Tools has been highlighted in a recent…

2 weeks ago

CNC Broach Tools G-code Program Generator V2

CNC Broach Tools G-code Program Generator V2 Toggle Fullscreen To use the V2 CNC Broach…

5 months ago

Male Keyway Broaching: CNC Broach Tool’s Proprietary Design

Leading the charge in internal male keyway broaching, CNC Broach Tools stands at the intersection…

5 months ago

Decoding a Spline Data Block: Essential Information for Your Spline Broach Quote

If you're in the machining world, you've undoubtedly come across the term "spline." A crucial…

9 months ago

Troubleshooting CNC Broaching: Tips and Tricks for Success

In this blog post, we'll cover some of the most common issues that arise when…

11 months ago

Mastering the Art of Broaching Involute Splines: A Guide for CNC Lathes and Mills

Writing a CNC program for broaching internal involute splines can be a complex task, but…

1 year ago

This website uses cookies.