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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7 Programming with Q Parameters<br />

7.4 If–Then Operations with Q Parameters<br />

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

Unconditional jumps<br />

Unconditional jumps are jumps which are always executed because the<br />

condition is always true.<br />

Example:<br />

FN 9: IF +10 EQU +10 GOTO LBL1<br />

Since it is always true that 10=10, the jump will always be executed.<br />

Program example<br />

When Q5 becomes negative, a jump to program 100 will occur.<br />

.<br />

.<br />

.<br />

5 FN0: Q5 = +10 ................................................... Assign value (such as 10) to parameter Q5<br />

.<br />

.<br />

.<br />

9 FN 2: Q5 = +Q5–+12 ......................................... Reduce the value of Q5<br />

10 FN 12: IF +Q5 LT +0 GOTO LBL 5 ..................... If +Q5 is less than 0, jump to label 5<br />

.<br />

.<br />

.<br />

15 LBL 5 .................................................................. Label 5<br />

16 PGM CALL 100 ................................................... Jump to program 100<br />

.<br />

.<br />

.<br />

7-9

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

Saved successfully!

Ooh no, something went wrong!