Looking for a little feedback. I am new to G code programming, though not to Basic, Cobol and Fortran programming (years ago).

I wrote this program to drill cylindrical hairbrush handles. The brush has 12 rows of 14 holes, each row spiraling at 17 degrees and every other row offset by 1/2 space.

My concept is to drill 15 holes along the axis, take 1/2 step and rotate to next row to return to the end, rotate and repeat 5 times.

What code will have this repeat 5 times?

Have I neglected something to tell the program axis A it is rotational?

Any other comments?


(hair brush pattern, xx mm dr)

G0 G49 G40.1 G17
G80 G50 G90 G98
G20 (Inch)
(***** Spiraling Hole Pattern *****)
M6 T1
M03 S3500
M9
G00G43 H1 Z0.25
G81
X0.25 Y0 Z-0.33 A0 R0.125 F100
M98 O0002


O0002
G91 X+0.2679 A+0.0078 L14
X+0.134 A-30
X-.02679 A-0.0078 L14
M98 O0003
M99


O0003
G91 A-30
M98 O0002
M99


G80
M5 M9
M30




Thanks!

Lew