EasyManua.ls Logo

HEIDENHAIN CNC PILOT 640 - Requesting Variables and Constants

HEIDENHAIN CNC PILOT 640
697 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DIN/ISO programming | Conditional block run
4
HEIDENHAIN | User's Manual smart.Turn and DIN Programming | 12/2017
479
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
. . .

Table of Contents

Related product manuals