HEIDENHAIN NC 124 User Manual
Page 96
![background image](/files/815891/content/doc096.png)
8
Subprograms and Program Section Repeats
96
TNC 124
Subprograms
L a b e l n u m b e r ?
1
ENT
ENT
Accept the default label number.
or
or
After the CALL LBL block in the operating mode PROGRAM RUN,
the TNC executes those blocks in the subprogram that are located
between the LBL block with the called number and the next block
containing LBL 0.
Note that the subprogram will be executed at least once even without
a CALL LBL block.
Program blocks
0
BEGIN PGM 60
MM
Start of program, program number, unit of measurement
1
F 9999
High feed rate for pre-positioning
2
Z+20
Clearance height
3
X+20
R0
X coordinate infeed point slot
1
4
Y+10
R0
Y coordinate infeed point slot
1
5
TOOL CALL 7 Z
Call tool data, here tool 7, tool axis Z
6
S 1000
Spindle speed
7
M 3
Spindle ON, clockwise
8
CALL LBL 1
Call subprogram 1: execute blocks 17 to 23
9
X+40
R0
X coordinate infeed point slot
2
10
Y+50
R0
Y coordinate infeed point slot
2
11
CALL LBL 1
Call subprogram 1: execute blocks 17 to 23
12
X+60
R0
X coordinate infeed point slot
3
13
Y+40
R0
Y coordinate infeed point slot
3
14
CALL LBL 1
Call subprogram 1: execute blocks 17 to 23
15
Z+20
Clearance height
16
M 2
Stop program run, spindle STOP, coolant OFF
1 7
LBL 1
Start of subprogram 1
1 8
F 200
Machining feed rate during subprogram
1 9
Z – 1 0
Infeed to slot depth
2 0
I Y + 2 0
R 0
Mill slot
2 1
F 9999
High feed rate for retracting and pre-positioning
2 2
Z + 2
Retract
2 3
LBL 0
End of subprogram 1
24
END PGM 60
MM
End of program, program number, unit of measurement
Enter a label number (here, 1). Confirm your entry.
The current block now contains the called label: CALL LBL 1.
For subprograms you can ignore the question Repeat REP ?.
Press the soft key to confirm that a subprogram is being called.