beautypg.com

If-then operations with q parameters, Jumps, Overview – HEIDENHAIN TNC 360 User Manual User Manual

Page 142: 4 if–then operations with q parameters

background image

TNC 360

7-8

7

Programming with Q Parameters

7.4 If–Then Operations with Q Parameters

If–Then conditional operations enable the TNC to compare a Q parameter
with another Q parameter or with a numerical value.

Jumps

The jump target is specified in the block through a label number. If the
programmed condition is true, the TNC continues the program at the
specified label; if it is false, the next block is executed.

To jump to another program, you enter a PGM CALL after the block with
the target label (see page 6-8).

Abbreviations used:

IF

If

EQU

Equals

NE

Not equal

GT

Greater than

LT

Less than

GOTO Go to

Overview

FN9: IF EQUAL, JUMP
e.g. FN9: IF +Q1 EQU +Q3 GOTO LBL 5
If the two values or parameters are equal,
jump to the specified label.

FN10: IF NOT EQUAL, JUMP
e.g. FN10: IF +10 NE –Q5 GOTO LBL 10
If the two parameters or values are not equal,
jump to the specified label.

FN11: IF GREATER THAN, JUMP
e.g. FN11: IF +Q1 GT–10 GOTO LBL 5
If the first value or parameter is greater
than the second value or parameter,
jump to the specified label.

FN12: IF LESS THAN, JUMP
e.g. 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 specified label.