W1: Tool offset
18.12 Working with tool environments
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
1579
The
GETTENV
function is a predefined subprogram. It must, therefore, be programmed in a separate block.
It is possible to omit the first parameter in the
GETTENV
function call (e.g.,
GETTENV
(, _TDDL)) or to pass a null
string as the first parameter (e.g.,
GETTENV(
"", _TDDL
)
). In both of these two special cases, the T, D and DL
numbers of the active tool are returned in _TDDL.
18.12.6
Read tool lengths, tool length components
GETTCOR function
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.
The
GETTCOR
function is a predefined subprogram. It must, therefore, be programmed in a separate block.
Syntax:
Status = GETTENV(_NAME, _TDDL)
Value/parameter:
Status
INT
0:
Function OK
-1:
No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0 (number of tool environments in TO
area).
i.e. the "tool environments" functionality is not available.
-2:
A tool environment with the name specified in _NAME does not exist.
_NAME
STRING
Name of the tool environment, from which the T, D and DL numbers can be read
_TDDL[3]
INT
This integer array contains:
- in "_TDDL[0]" the T number of the tool,
- in "_TDDL[1]" the D number of the tool,
- in "_TDDL[2]" the DL number of the tool,
whose tool environment in the data set is stored with the name "_NAME".
Syntax:
Status = GETTCOR(_LEN, _COMP, _STAT, _T, _D, _DL)
All parameters can be omitted with the exception of the first parameter (_LEN).