%MPF 16 N0040 R10=0 (Starting Angle) N0045 R11=80 (Angle Span) N0050 R12=5 (Angle Step) N0055 R13=25.00 (Stock diameter) N0060 R14=10.00 (End Mill Diameter) N0062 R15=18.00 (Spanner AF size) N0063 R16=R15 / 2 (Half Spanner AF) N0066 R17 =0 (for angle offset) N0070 R2 = R14 + R15 (Form D+R term) N0075 R1=R13+15 (Stand clear of bar) N0080 G71 G94 (Metric Feed MM) N0085 L54 (Go to safe toolchange posn) N0090 T9 D9 (10 mm 4 flute endmill) N0095 @714 (wait for buffer to clear) N0100 M23 (Power Tooling Anticlockwise) N0105 S1000 (1000 rpm) N0110 G00 Z-5 N0115 G00 X=R1 N0120 M20 (Rotate to Target Angle) N0125 M19 S= R10 N0130 @714 (Wait for buffer to clear) N0135 R17= R10-R11/2 (offset angle value) N0135 @631 R3 R17 (Form cosine of angle in R17) N0140 R4= R2 / R3 (divide d+r by cosA) N0145 G01 X=R4 F100 (perform the cut) N0150 G00 X=R1 (stand clear of bar) N0155 R10 = R10 + R12 (Calculate next Target Angle) N0160 @123 R10 R11 K-120 (Loop Back if Span not exceeded) N0165 M30