3.13.13.3 Read T, D and DL number (GETTENV)
The GETTENV function is used to read the T, D and DL numbers stored in a tool environment.
Syntax
<Status> = GETTENV(<name>, <TDDL>)
Meaning
GETTENV(...): Predefined function to read T, D and DL numbers in a data set to describe a tool
environment
Alone in the
block:
Yes
<Status>: Function return value. Negative values indicate error states.
Data type: INT
Value: 0 Function OK
-1 No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0
This means that the "tool environments" functionality is not
available.
-2 A tool environment with the specified name does not exist.
Parameters
1 <name>: Name of the data set from which the T, D and DL numbers are to be read
Data type: STRING
2 <TDDL>: The field of this result parameter contains the T, D and DL numbers of the tool,
whose tool environment is saved in the specified data set:
● <TDDL> [0]: T number
● <TDDL> [1]: D number
● <TDDL> [2]: DL number
Data type: INT[3]
GETTENV(,<TDDL>),
GETTENV("",<TDDL>):
When calling function GETTENV, it is permissible to omit the first pa‐
rameter – or to transfer the null string as first parameter. In these two
special cases, in <TDDL>, the T, D and DL numbers of theactive tool are
returned.
Work preparation
3.13 Tool offsets
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 811