Here is another great contribution by one of the members here beazel.
You can check out his profile here:
http://www.cncinformation.com/index.php?option=com_comprofiler&task=userProfile&user=875&Itemid=136This is a g-code program he wrote for splined shafts that can be changed around depending on the number of splines on the shaft.
Email:My latest write was on splined shafts for the TATA, Toyota 4x4 drive shafts.
Wrote it on an excel fanuc 21Mi 5 axis MACHINING CENTER.
This program can be manipulated easily for any number of splines on any
size shaft provided the insert is given and dividing head, rotary table (U
axis)
Perhaps you could post it as well, I`m sure theres a few people who would
be keen on using the program.
30 X( 60 DEG INSERT )EQUALLY SPACED SPLINES X 50mm LONG ON A SHAFT TO
SUITE GEAR.
MAIN PROGRAM
O0402;
G0 G80 G90 G40 G54 X0.0 Y-5.0; ( 5mm away from shaft on y axis )
G28 U0.0; ( home position rotary axis )
T13 M6; ( tool change )
G0 G43 T13 H01 Z50.0; ( tool length comp )
S1500 M03; ( spindle speed )
M08;
G0 G90 Z0.0; ( rapid to center of shaft on z axis )
G98 M98 P309402; (30=NUMBER OF REPEATS,9402=SUB PROGRAM)
G91 G28 Z0.0; ( home return position on z axis )
M30;( end of main program )
%
SUB PROGRAM
O9402;
G1 G90 Y2.0 F800.; ( depth of cut on y axis )
X50.0 F600.; ( length of cut on X axis )
G0 Y-5.0; ( rapid out clear of shaft on y axis )
X0.0; ( back to start position on x axis )
G91 U12.0;( 12 DEGREE INCREMENTS ON ROTARY )
M99; ( end of sub program - return to main )
%