30.07.2013 Views

User's Manual ISO TNC 360 (260020xx, 280490xx) - heidenhain

User's Manual ISO TNC 360 (260020xx, 280490xx) - heidenhain

User's Manual ISO TNC 360 (260020xx, 280490xx) - 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 %) ( 1 ).<br />

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

end ( 2 ).<br />

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

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

following the program call ( 3 ).<br />

Operating limits<br />

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

medium must not contain any subprograms or<br />

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 />

To call a main program as a subprogram<br />

0 /0<br />

PROGRAM NAME?<br />

.<br />

.<br />

.<br />

.<br />

.<br />

.<br />

.<br />

.<br />

% A ... *<br />

1<br />

% B *<br />

3<br />

N9999 % A ... *<br />

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

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

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

Resulting NC block: % NAME<br />

A main program can also be called with cycle G39 (see page 8-38).<br />

S<br />

R<br />

.<br />

.<br />

.<br />

.<br />

.<br />

.<br />

.<br />

.<br />

% B ... *<br />

2<br />

N9999 % B — *<br />

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

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

Saved successfully!

Ooh no, something went wrong!