31.07.2013 Views

User's Manual TNC 360 (from 259 900-11) - heidenhain

User's Manual TNC 360 (from 259 900-11) - heidenhain

User's Manual TNC 360 (from 259 900-11) - heidenhain

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6 Subprograms and Program Section Repeats<br />

6.3 Main Program as Subprogram<br />

Principle<br />

6-8<br />

A program is executed until another program is<br />

called (block with CALL PGM) ( 1 ).<br />

The called program is executed <strong>from</strong> beginning to<br />

end ( 2 ).<br />

Execution of the program <strong>from</strong> which the other<br />

program was called is then resumed with the block<br />

following the CALL PGM block ( 3 ).<br />

Operating limits<br />

• Programs called <strong>from</strong> an external data storage<br />

medium (such as a floppy disk) must not contain<br />

any subprograms or program section repeats.<br />

• No labels are needed to call main programs as<br />

subprograms.<br />

• The called program must not contain the miscellaneous<br />

functions M2 or M30.<br />

• The called program must not contain a jump into<br />

the calling program.<br />

Calling a main program as a subprogram<br />

PGM<br />

CALL<br />

PROGRAM NUMBER?<br />

0<br />

.<br />

BEGIN PGM A...<br />

.<br />

.<br />

1<br />

.<br />

.<br />

CALL PGM B<br />

.<br />

.<br />

3<br />

.<br />

END PGM A...<br />

Enter the main program call and the number of the program you want to call.<br />

Resulting NC block: CALL PGM NAME<br />

A main program can also be called with Cycle 12 PGM CALL (see page 8-38).<br />

S<br />

0 BEGIN PGM B...<br />

.<br />

.<br />

.<br />

. 2<br />

.<br />

.<br />

.<br />

.<br />

END PGM B...<br />

Fig. 6.3: Flow diagram of a main program as subprogram;<br />

S = jump, R = return jump<br />

R<br />

<strong>TNC</strong> <strong>360</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!