Requesting Variables And Constants - HEIDENHAIN CNC PILOT 640 User Manual

Smart.turn and din programming
Table of Contents

Advertisement

DIN/ISO programming | Conditional block run

Requesting variables and constants

With the DEF, NDEF, and DVDEF elements you can inquire whether
a valid value was assigned to a variable or a constant. For example,
an undefined variable can return the value 0, just like a variable that
has been assigned the value 0. You can prevent undesired program
jumps by examining the variables.
Programming:
Select Extras > DINplus word.... The control opens the Insert
DIN PLUS word selection list.
Select IF
Enter the required inquiry element (DEF, NDEF or DVDEF)
Enter the name of a variable or a constant
Enter the variable name without the character #, e.g. IF
NDEF(__la)
Inquiry elements of variables and constants:
DEF: A value is assigned to a variable or constant
NDEF: No value is assigned to a variable or constant
DVDEF: Inquiry of an internal constant
Example: Requesting variable in subprogram
N.. IF DEF(__la)
N.. THEN
N.. PRINT("Value:",#__la)
N.. ELSE
N.. PRINT("#__la is not defined")
N.. ENDIF
. . .
Example: Requesting variable in subprogram
N.. IF DEF(__lb)
N.. THEN
N.. PRINT("#__lb is not defined")
N.. ELSE
N.. PRINT("Value:",#__lb)
N.. ENDIF
. . .
Example: Requesting constants
N.. IF DVDEF(__n97_s)
N.. THEN
N.. PRINT("__n97_s is defined",#__n97_s)
N.. ELSE
N.. PRINT("#__n97_s is not defined")
N.. ENDIF
. . .
HEIDENHAIN | User's Manual smart.Turn and DIN Programming | 12/2017
4
479

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Manualplus 620

Table of Contents