6 pr ogr amming examples – HEIDENHAIN TNC 640 (34059x-01) ISO programming User Manual
Page 218

218
Programming: Subprograms and Program Section Repeats
7.
6 Pr
ogr
amming Examples
N70 G00 Z+250 M6 *
Tool change
N80 T2 G17 S4000 *
Call tool: drill
N90 D0 Q201 P01 -25 *
New depth for drilling
N100 D0 Q202 P01 +5 *
New plunging depth for drilling
N110 L1,0 *
Call subprogram 1 for the entire hole pattern
N120 G00 Z+250 M6 *
Tool change
N130 T3 G17 S500 *
Call tool: reamer
N140 G201 REAMING
Cycle definition: REAMING
Q200=2
;SET-UP CLEARANCE
Q201=-15
;DEPTH
Q206=250
;FEED RATE FOR PLNGNG
Q211=0.5
;DWELL TIME AT DEPTH
Q208=400
;RETRACTION FEED RATE
Q203=+0
;SURFACE COORDINATE
Q204=10
;2ND SET-UP CLEARANCE
N150 L1,0 *
Call subprogram 1 for the entire hole pattern
N160 G00 Z+250 M2 *
End of main program
N170 G98 L1 *
Beginning of subprogram 1: Entire hole pattern
N180 G00 G40 G90 X+15 Y+10 M3 *
Move to starting point for group 1
N190 L2,0 *
Call subprogram 2 for the group
N200 X+45 Y+60 *
Move to starting point for group 2
N210 L2,0 *
Call subprogram 2 for the group
N220 X+75 Y+10 *
Move to starting point for group 3
N230 L2,0 *
Call subprogram 2 for the group
N240 G98 L0 *
End of subprogram 1
N250 G98 L2 *
Beginning of subprogram 2: Group of holes
N260 G79 *
Call cycle for 1st hole
N270 G91 X+20 M99 *
Move to 2nd hole, call cycle
N280 Y+20 M99 *
Move to 3rd hole, call cycle
N290 X-20 G90 M99 *
Move to 4th hole, call cycle
N300 G98 L0 *
End of subprogram 2
N310 %SP2 G71 *