4.32 Conditional Block Run; Program Branch If..then..else..endif - HEIDENHAIN CNC PILOT 640 User Manual

Smart.turn and din programming
Table of Contents

Advertisement

DIN/ISO programming | Conditional block run

4.32 Conditional block run

Program branch IF..THEN..ELSE..ENDIF

A conditional branch consists of the elements:
IF, followed by a condition. The condition includes a variable
or mathematical expression on either side of the relational
operator.
THEN. If the condition is fulfilled, the THEN branch is executed
ELSE. If the condition is not fulfilled, the ELSE branch is
executed
ENDIF concludes the conditional program branch
bitset: You can also use the BITSET function as
Interrogate
condition. The function returns 1 if the numerical value contains the
requested bit. The function returns 0 if the numerical value does
not contain the requested bit.
Syntax:
BITSET (x,y)
x: Bit number (0 to 15)
y: Numerical value (0 to 65535)
The relationship between bit number and numerical value is shown
in the table. You can also use variables for x, y.
Programming:
Select Extras > DINplus word.... The control opens the Insert
DIN PLUS word selection list.
Select IF
Enter the condition
Insert NC blocks of the THEN branch
If required: Insert NC blocks of the ELSE branch
NC blocks with IF, THEN, ELSE, ENDIF can have no
further commands
You can combine up to two conditions
Relational operators
<
Less than
<=
Less than or equal to
<>
Not equal to
>
Greater than
>=
Greater than or equal to
==
equal to
Combining conditions
AND
Logical AND operation
OR
Logical OR operation
HEIDENHAIN | User's Manual smart.Turn and DIN Programming | 12/2017
4
477

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Manualplus 620

Table of Contents