beautypg.com

HEIDENHAIN TNC 360 User Manual User Manual

Page 143

background image

7-9

TNC 360

7

Programming with Q Parameters

7.4

If–Then Operations with Q Parameters

Unconditional jumps

Unconditional jumps are jumps which are always executed because the
condition is always true.
Example:

FN 9: IF +10 EQU +10 GOTO LBL1

Since it is always true that 10=10, the jump will always be executed.

Program example

When Q5 becomes negative, a jump to program 100 will occur.

5

FN0: Q5 = +10 ................................................... Assign value (such as 10) to parameter Q5

9

FN 2: Q5 = +Q5–+12 ......................................... Reduce the value of Q5

10

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

15

LBL 5 .................................................................. Label 5

16

PGM CALL 100 ................................................... Jump to program 100

.
.
.

.
.
.

.
.
.

.
.
.