248  Programming: Subprograms and Program Section Repeats
8.6 Programming Examples
Example: Groups of holes
Program sequence
 Approach the groups of holes in the main 
program
 Call the group of holes (subprogram 1)
 Program the group of holes only once in 
subprogram 1
%UP1 G71 *
N10 G30 G17 X+0 Y+0 Z-40 *
N20 G31 G90 X+100 Y+100 Z+0 *
N40 T1 G17 S3500 *
Tool call
N50 G00 G40 G90 Z+250 *
Retract the tool
N60 G200 DRILLING
Cycle definition: drilling
Q200=2 ;SETUP CLEARANCE
Q201=-30 ;DEPTH
Q206=300 ;FEED RATE FOR PLNGN
Q202=5 ;PLUNGING DEPTH
Q210=0 ;DWELL TIME AT TOP
Q203=+0 ;SURFACE COORDINATE
Q204=2 ;2ND SETUP CLEARANCE
Q211=0 ;DWELL TIME AT DEPTH