5 if-then decisions with q parameters, Application, Unconditional jumps – HEIDENHAIN TNC 620 (73498x-01) ISO programming User Manual

Page 218: Programming if-then decisions

Advertising
background image

218

Programming: Q parameters

8.5 If-then decisions with Q

p

ar

amet

ers

8.5 If-then decisions with

Q parameters

Application

The TNC can make logical If-then decisions by comparing a
Q parameter with another Q parameter or with a numerical value. If
the condition is fulfilled, the TNC continues the program at the label
that is programmed after the condition (for information on labels, see
"Labeling subprograms and program section repeats", page 194
). If it
is not fulfilled, the TNC continues with the next block.

To call another program as a subprogram, enter a % program call after
the block with the target label.

Unconditional jumps

An unconditional jump is programmed by entering a conditional jump
whose condition is always true. Example:

D09 P01 +10 P02 +10 P03 1 *

Programming If-then decisions

Press the JUMP soft key to call the If-then conditions. The TNC then
displays the following soft keys:

Function

Soft key

D09

: IF EQUAL, JUMP

Example: D09 P01 +Q1 P02 +Q3 P03 “SPCAN25” *
If the two values or parameters are equal, jump to the
given label.

D10

: IF UNEQUAL, JUMP

Example: D10 P01 +10 P02 -Q5 P03 10 *
If the two values or parameters are unequal, jump to
the given label.

D11

: IF GREATER, JUMP

Example: D11 P01 +Q1 P02 +10 P03 5 *
If the first value or parameter is greater than the
second, jump to the given label.

D12

: IF LESS, JUMP

Example: D12 P01 +Q5 P02 +0 P03 “ANYNAME” *
If the first value or parameter is less than the second,
jump to the given label.

Advertising