6 pr ogr amming examples, Example: erosion hole patterns – HEIDENHAIN TNC 406 User Manual
Page 203

182
9 Programming: Subprograms and Program Section Repeats
9.6 Pr
ogr
amming Examples
Example: Erosion hole patterns
Program sequence
Approach the erosion hole patterns in the main
program
Call the erosion hole pattern (subprogram 1)
Program the erosion hole pattern only once in
subprogram 1
0 BEGIN PGM GROUPS MM
1 BLK FORM 0.1 Z X+0 Y+0 Z-20
Define the blank
2 BLK FORM 0.2 X+100 Y+100 Z+0
3 CYCL DEF 1.0 GENERATOR
Cycle GENERATOR (see ”Cycle 1 GENERATOR” on page 133)
4 CYCL DEF 1.1 P-TAB 10
Select erosion table (here, table 10)
5 CYCL DEF 1.2 MAX=10 MIN=10
Set power stage (here, to stage 10)
6 TOOL DEF 1 L+0 R+2.4
Define electrode in the program
7 TOOL CALL 1 Z U+0.2
Call electrode in the infeed axis Z, undersize 0.2 mm
8 L Z+100 R0 F MAX M
Retract in the infeed axis; rapid traverse; insert electrode
9 L X+15 Y+10 R0 F MAX M
Move to erosion hole group 1; rapid traverse
10 L Z+2 R FMAX M
Pre-position in the infeed axis
11 CALL LBL 1
Subprogram call (the subprogram is executed once with block 11)
12 L X+45 Y+60 R F MAX M
Move to erosion hole group 2
13 CALL LBL 1
Call subprogram 1
14 L X+75 Y+10 R0 F MAX M
Move to erosion hole group 3
15 CALL LBL 1
Call subprogram 1
16 L Z+100 R F MAX M2
Retract electrode; end of main program (M2);
Subprograms are entered after M2
17 LBL 1
Beginning of subprogram 1
18 CALL LBL 2
Call subprogram 2
X
Y
15
60
100
100
75
10
45
20
20
5
1
2
1
1
1
3