5 if-then decisions with q parame- ters, 5 if-then decisions with q p ar a met ers – HEIDENHAIN TNC 426B (280 472) ISO programming User Manual
Page 274

HEIDENHAIN TNC 410, TNC 426, TNC 430
259
10.5 If-Then Decisions with Q Parame-
ters
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 section 9 “Subprograms and Program Section Repeats”). If it is
not fulfilled, the TNC continues with the next block.
To call another program as a subprogram, enter a program call with
% after label G98.
Unconditional jumps
An unconditional jump is programmed by entering a conditional
jump whose condition is always true. Example:
D0: 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 5 *
If the two values or parameters are equal,
jump to the given label.
D10: IF NOT EQUAL, JUMP
Example D10 P01 +10 P02 –Q5 P03 10 *
If the two values or parameters are not equal,
jump to the given label.
D11: IF GREATER THAN, JUMP
Example D11 P01 +Q1 P02 +10 P03 5 *
If the first parameter or value is greater than
the second value or parameter, jump to the given label.
D12: IF LESS THAN, JUMP
Example D12 P01 +Q5 P02 +0 P03 1 *
If the first value or parameter is less than the
second value or parameter, jump to the given label.
1
0.5 If-Then Decisions with Q P
ar
a
met
ers
Mkap10.pm6
29.06.2006, 08:06
259