beautypg.com

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

Page 245: Programming if-then decisions, If-then decisions with q parameters, If-then decisions with q parameters 9.5

background image

If-then decisions with Q parameters

9.5

9

TNC 620 | User's Manual for DIN/ISO Programming | 5/2013

245

9.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 222). If it is not fulfilled, the TNC continues with the ne
xt
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 TO, JUMP
e.g.

D09 P01 +Q1 P02 +Q3 P03 "UPCAN25" *

If both values or parameters are equal, jump to
specified label

D10: IF NOT EQUAL TO, JUMP
e.g.

D10 P01 +10 P02 -Q5 P03 10 *

If both values or parameters are not equal, jump
to specified label

D11: IF GREATER, JUMP
e.g.

D11 P01 +Q1 P02 +10 P03 5 *

If the first value or parameter is greater than the
second value or parameter, jump to specified
label

D12: IF SMALLER, JUMP
e.g.

D12 P01 +Q5 P02 +0 P03 “ANYNAME“ *

If the first value or parameter is smaller than the
second value or parameter, jump to specified
label