Unterprogramm im unterprogramm – HEIDENHAIN TNC 640 (34059x-05) Benutzerhandbuch

Seite 290

Advertising
background image

Programmieren: Unterprogramme und Programmteil-Wiederholungen

8.5

Verschachtelungen

8

290

TNC 640 | Benutzer-Handbuch HEIDENHAIN-Klartext-Dialog | 1/2015

Unterprogramm im Unterprogramm

NC-Beispielsätze

0 BEGIN PGM UPGMS MM
...
17 CALL LBL “UP1“

Unterprogramm bei LBL UP1 aufrufen

...
35 L Z+100 R0 FMAX M2

Letzter Programmsatz des Hauptprogramms mit M2

36 LBL “UP1“

Anfang von Unterprogramm UP1

...
39 CALL LBL 2

Unterprogramm bei LBL2 wird aufgerufen

...
45 LBL 0

Ende von Unterprogramm 1

46 LBL 2

Anfang von Unterprogramm 2

...
62 LBL 0

Ende von Unterprogramm 2

63 END PGM UPGMS MM

Programm-Ausführung

1 Hauptprogramm UPGMS wird bis Satz 17 ausgeführt

2 Unterprogramm UP1 wird aufgerufen und bis Satz 39

ausgeführt

3 Unterprogramm 2 wird aufgerufen und bis Satz 62

ausgeführt. Ende von Unterprogramm 2 und Rücksprung zum
Unterprogramm, von dem es aufgerufen wurde

4 Unterprogramm UP1 wird von Satz 40 bis Satz 45 ausgeführt.

Ende von Unterprogramm UP1 und Rücksprung ins
Hauptprogramm UPGMS

5 Hauptprogramm UPGMS wird von Satz 18 bis Satz 35

ausgeführt. Rücksprung zu Satz 1 und Programm-Ende

Advertising