3.13.13.4 Read information about the saved tool environments ($P_TOOLENVN, ($P_TOOLENV)
Information regarding the saved tool environments can be read using the following system
variables:
$P_TOOLENVN: Supplies the number of data sets (which have still not been deleted) – defined
using TOOLENV – to describe tool environments
Syntax: <n> = $P_TOOLENVN
Meaning: <n>: Number of defined data sets
Data type: INT
Value range: 0 ... MD18116
$MN_MM_NUM_TOOL_ENV
This system variable can be accessed even if no tool environments are possible
(MD18116 = 0). In this case, the return value is "0".
$P_TOOLENV: Supplies the name of the <i>th data set to describe a tool environment
Syntax: <Name> = $P_TOOLENV[<i>]
Meaning: <name>: Name of the data set with number <i>
Data type: STRING
<i>: Number of the data set
Data type: INT
Value range: 1 ... $P_TOOLENVN
The assignment of numbers to data sets is not fixed, but can be changed as a result
of deleting or creating data sets. The data sets are numbered internally.
If <i> refers to a data set that has not been defined, then the null string is returned.
If index <i> is not valid, i.e. <i> is less than 1 or higher than that the maximum
number of data sets for tool environments (MD18116 $MN_MM_NUM_TOO‐
LENV), then the following alarm is output:
Alarm 17020 "inadmissible array index 1"
3.13.13.5 Read tool lengths and/or tool length components (GETTCOR)
The GETTCOR function is used to read out tool lengths or tool length components.
The parameters can be used to specify which components are considered and the conditions
under which the tool is used.
Syntax
<Status> = GETTCOR(<Len>[, <Comp>, <Stat>, <T>, <D>, <DL>])
Meaning
GETTCOR(...): Predefined function to read tool lengths or to read tool length components
Alone in the
block:
Yes
Work preparation
3.13 Tool offsets
NC programming
812 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0