6 pr ogr amming examples – HEIDENHAIN TNC 128 (77184x-01) User Manual
Page 176

176
Programming: Subprograms and program section repeats
7.
6 Pr
ogr
amming examples
6
X+15 R0 FMAX M3
Move to starting point X for group 1
7
Y+10 R0 FMAX
Move to starting point Y for group 1
8 CALL LBL 1
Call the subprogram for the group
9
X+45 R0 FMAX
Move to starting point X for group 2
10
Y+60 R0 FMAX
Move to starting point Y for group 2
11 CALL LBL 1
Call the subprogram for the group
12
X+75 R0 FMAX
Move to starting point X for group 3
13
Y+10 R0 FMAX
Move to starting point Y for group 3
14 CALL LBL 1
Call the subprogram for the group
15
Z+250 R0 FMAX M30
End of main program
16 LBL 1
Beginning of subprogram 1: Group of holes
17 CYCL CALL
Hole 1
18
IX+20 R0 FMAX M99
Move to 2nd hole, call cycle
19
IY+20 R0 FMAX M99
Move to 3rd hole, call cycle
20
IX-20 R0 FMAX M99
Move to 4th hole, call cycle
21 LBL 0
End of subprogram 1
22 END PGM SP1 MM