Tool data
Standard programming
By default, tools are identified in the NC program by means of one-part numbers. In conformity with DIN 66025, this numeric ID is programmed with the D command for calculation of new data (calculator tool change). In conjunction with the T command, the ID defines the next tool that is to be physically changed in.
External tool management
For the calculation of new tool data, these must be requested with the D command through an additional interface from an (external) tool management application provided by the user, possibly integrated decentral, e.g. in the PLC. The tool management has special, manufacturer-specific algorithm to define the tool to be changed in on the basis of the tool ID.
Tool change
The T number primarily serves as technological information, i.e. it reaches the interface to the PLC through the NC channel. The T command itself does not initiate a tool change. In conformity with DIN 66025, physical insertion of the new tool in the work spindle is triggered with the machine function M06. Separate specification of the two commands "T with tool number" and M06 can be used to take preparatory measures after the T command, e.g. in the tool magazine (P-CHAN-00087), before the tool is physically inserted in the work spindle with M06.
T with D
If the corresponding channel-specific parameter is defined (P-CHAN-00014), execution of the D command is also implicitly triggered with the T command.
Influence on the NC program run
Due to waiting times during execution of the T command, delayed processing of prior motion blocks may occur during communication with the tool management. This can be avoided by setting the channel parameter P-CHAN-00106.
Tool identification (TOOL ID)
In the NC program, every tool is identified by means of a unique number.
In the tool management, tool data is identified by means of a three-part number, which is referred to below as the tool ID. This is specified in the PLC by means of the following structure CNC_TOOL_ID.
Structure CNC_TOOL_ID in the PLC
basic : DINT;
sister : DINT;
variant : DINT;
sister_valid : BOOL;
variant_valid : BOOL;
The basic tool number (basic) describes the tool type and the sister tool number (sister) defines an example of this tool type. The variant number (variant) is purely for data processing purposes. Therefore, diverse records can be used for a tool.
Tool ID = basic tool No. + sister tool No. + variant number
T command, D command
The mathematical expressions when specifying the T and D commands must always be interpreted as the basic tool number (basic). Therefore, the tool management still has the same degree of freedom as previously when it comes to selection of the tool record.
T <basic> or D<basic>
#TOOL PREP, #TOOL DATA
Consider the fact that only the tool type is defined with the communicated tool ID and that several tools of the same type (sister tools) may be ready for use in the tool magazine. Therefore, it may be that the tool cannot be uniquely identified in the NC program by way of the T or D command.
This is why, as an alternative, the tool ID can be programmed by means of plain-language commands. The preparatory technological command for the physical tool change with #TOOL PREP corresponds to the T command and requesting of new tool data with #TOOL DATA corresponds to D command.
Announcing a tool change (T)
#TOOL PREP [ <basic> [,<sister> [,<variant> ] ] ]
Requesting new tool data (D)
#TOOL DATA [ <basic> [,<sister> [,<variant> ] ] ]
It is imperative to specify the basic tool number (basic). Moreover, sister can be optionally programmed for the sister tool number and variant for the variant. Zero is inserted if sister or variant is not programmed (comma follows comma or close parentheses follows comma).
Tool description
Excerpt from structur CNC_TOOL_DESC in the PLC
For the CNC, a tool is described by means of the data structure CNC_TOOL_DESC:
tool_id : CNC_TOOL_ID;
laenge : DINT;
radius : DINT;
ax_versatz : ARRAY [1..32] OF DINT;
kopf_versatz : ARRAY [1..28] OF DINT;
mass_einheit : UINT;
typ : UINT;
srk_lage : UINT;
kin_id : UINT;
log_ax_nr_spdl : UINT;
tool_fixed : BOOL;
valid : BOOL;
res : ARRAY [1..4] OF BYTE;
param : ARRAY [1..60] OF LREAL;
vb_min : LREAL;
vb_max : LREAL;
a_max : LREAL;
The complete meanings of the individual data items are described in [TOOL].
![]() | A tool can be described by way of further data which, however, is not needed when requesting the tool geometry from the CNC and is additionally held only in the PLC. |