beautypg.com

Repeating a subprogram, 5 nesting – HEIDENHAIN TNC 320 (340 551-01) User Manual

Page 305

background image

˜ ˜¢¬

305

9.5 Nesting

Repeating a subprogram

Example NC blocks

Program execution

1

"am˜zpV"h˜ ˜a’˜F¨F4¤›F=˜¤z˜›p˜*dp4c˜ss

2

¤*zpV"h˜¢˜a’˜4"ddF=˜"m=˜F¨F4¤›F=

3

pV"h˜’F4›apm˜*F›§FFm˜*dp4c˜s¢˜"m=˜*dp4c˜s¬˜a’˜FzF"›F=˜›§a4F˜

¤*zpV"h˜¢˜a’˜FzF"›F=˜›§a4F

4

"am˜zpV"h˜ ˜a’˜F¨F4¤›F=˜Oph˜*dp4c˜s˜›p˜*dp4c˜sn˜ m=˜

pO˜zpV"h

0 BEGIN PGM UPGREP MM

...

10 LBL 1

FVammamV˜pO˜zpV"h˜’F4›apm˜FzF"›˜s

11 CALL LBL 2

¤*zpV"h˜4"dd

12 CALL LBL 1 REP 2

^F˜zpV"h˜’F4›apm˜*F›§FFm˜›^a’˜*dp4c˜"m=˜ s

...

|*dp4c˜s¬}˜a’˜FzF"›F=˜›§a4F

19 L Z+100 R0 FMAX M2

"’›˜*dp4c˜pO˜›^F˜h"am˜zpV"h˜§a›^˜¢

20 LBL 2

FVammamV˜pO˜’¤*zpV"h

...

28 LBL 0

m=˜pO˜’¤*zpV"h

29 END PGM UPGREP MM