10 Programming: Q Parameters
1
0
.6 If-Then Decisions with Q P
a
ra
met
e
rs
10.6 If-Then Decisions with Q
Parameters
Function
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,
“Labeling Subprograms and Program Section Repeats,” page 342). If
it is not fulfilled, the TNC continues with the next block.
To call another program as a subprogram, enter PGM 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:
FN9: IF+10 EQU+10 GOTO LBL1
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
FN9: IF EQUAL, JUMP
Example:
FN9: IF +Q1 EQU +Q3 GOTO LBL 5
If the two values or parameters are equal, jump to the
given label.
FN10: IF NOT EQUAL, JUMP
Example:
FN10: IF +10 NE –Q5 GOTO LBL 10
If the two values or parameters are not equal, jump to
the given label.
FN11: IF GREATER THAN, JUMP
Example:
FN11: IF+Q1 GT+10 GOTO LBL 5
If the first parameter or value is greater than the
second value or parameter, jump to the given label.
FN12: IF LESS THAN, JUMP
Example:
FN12: IF+Q5 LT+0 GOTO LBL 1
If the first value or parameter is less than the second
value or parameter, jump to the given label.
Summary of Contents for TNC 426
Page 3: ......
Page 4: ......
Page 8: ...IV...
Page 10: ...VI...
Page 26: ......
Page 27: ...1 Introduction...
Page 41: ...2 Manual Operation and Setup...
Page 54: ......
Page 55: ...3 Positioning with Manual Data Input MDI...
Page 59: ...4 Programming Fundamentals of NC File Management Programming Aids Pallet Management...
Page 122: ......
Page 123: ...5 Programming Tools...
Page 153: ...6 Programming Programming Contours...
Page 201: ...7 Programming Miscellaneous functions...
Page 226: ......
Page 227: ...8 Programming Cycles...
Page 366: ......
Page 367: ...9 Programming Subprograms and Program Section Repeats...
Page 381: ...10 Programming Q Parameters...
Page 424: ......
Page 425: ...11 Test run and Program Run...
Page 443: ...12 MOD Functions...
Page 472: ......
Page 473: ...13 Tables and Overviews...
Page 496: ......