To get the arcs to drill properly I used the code from vmax as a start and modified it as below.
Note that I declared all the parameters first. Note the one related to the G16 such as center point etc are all assigned to 4 decimal places.
This drills 4 arcs, two arcs of two rows of holes, 5 holes per arc, 15 deg apart, skipping the 90 deg position.
Some parameter assignments are not used in this code snippet.
It appears that the G81 is not completely modal when in G16 mode. You must define the X and Y on each line. True modality would not require this.
So it appears that nesting a modal command in G16 has a minor shortcoming.
F40 G20 G90 G0
#24=0 ( SETS PARAMETER FOR X AXIS TO ZERO )
#25=0 ( SETS PARAMETER FOR Y AXIS TO ZERO )
#26=0 ( SETS PARAMETER FOR Z AXIS TO ZERO )
#40=0.0000
#41=0.0000
#42=0.0000
#43=0.0000
#60=0.0000
#61=0.0000
#30=0.2686 ( WAS 2812 THEN 2801 NOW 2790 IS GAP BETWEEN TRACK HOLES 2686 IS FINAL VALUE)
#31=0.3740 ( GAP BETWEEN GROUPS OF HOLES WAS 3750 NOW 3740 )
#40=2.2187 ( X VALUE FOR CENTER OF LARGE ARC )
#41=11.2500 ( Y VALUE FOR CENTER OF LARGE ARC )
#42=1.2626 ( SMALL RADIUS FOR LARGE ARC )
#43=1.5312 ( LARGE RADIUS FOR LARGE ARC )
#50=-4.6000 ( Z DRILL DEPTH )
#51=[#50+0.600] (RETRACT OR CLEARANCE FOR DRILLING )
#60=165.0000 ( STARTING ANGLE FOR LARGE ARCS JUST ABOVE 9 OCLOCK POSITION )
#61=210.0000 ( STARTING ANGLE FOR SMALL ARCS JUST BELOW 9 OCLOCK POSITION )
% THE LARGE ARC PATTERN HERE. THIS DRILLS TWO CIRCULAR ROWS OF HOLES ONE INNER, ONE OUTER AT SAME ANGLES
% THE 90 DEG POSITION IS SKIPPED
G0 X#40 Y#41 (sets the pivot point)
G16
G81 x#42 y#60 Z#50 R#51 F16 ( in g16 mode the x becomes the offset from center and the Y becomes the degrees of rotation from the center of
offset)
X#43 Y#60 #60=[#60-15.00] ( WE ARE DECREMENTING THE ANGLE BY 15 DEGREES AFTER EVERY 2 HOLES )
X#42 Y#60
X#43 Y#60 #60=[#60-15.00]
X#42 Y#60
X#43 Y#60 #60=[#60-15.00]
X#42 Y#60
X#43 Y#60 #60=[#60-15.00]
X#42 Y#60
X#43 Y#60 #60=[#60-30.00] ( WE SKIP THE 90 DEGREE POSITION )
X#42 Y#60
X#43 Y#60 #60=[#60-15.00]
X#42 Y#60
X#43 Y#60 #60=[#60-15.00]
X#42 Y#60
X#43 Y#60 #60=[#60-15.00]
X#42 Y#60
X#43 Y#60 #60=[#60-15.00]
X#42 Y#60
X#43 Y#60
G15 ( cancells the g16)
G80
z0
X0y0
M30