Programming and 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 (calculatory tool change). In conjunction with the T command, the ID defines the next tool that is to be physically changed in.

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 actually physically inserted in the work spindle with M06.

External tool administration

To calculate new tool data, data must be requested over an additional interface from an (external) user-supplied tool management system (e.g. in the PLC) and must contain the D command.

The tool management system has special manufacturer-specific algorithms to define the tool to be changed based on the tool ID.

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

During communication with the tool management system, previous motion blocks may be processed with a delay due to waiting times caused by execution of the T command. 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 system, tool data is identified by a three-part number referred to below as the tool ID. This is specified in the PLC by the following structure CNC_TOOL_ID:

NC_TOOL_ID structure 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 and D command

The mathematical expressions when specifying T and D commands must always be interpreted as the basic tool number (basic). Therefore, the tool management system still has the same degree of freedom as before when it comes to selecting a tool record.

T<basic> or D<basic>

#TOOL PREP #TOOL DATA

It must be considered that only the tool type is defined in the tool ID sent and that several tools of the same type (sister tools) may be ready for use in the tool magazine. In other words, the T or D command in the NC program may not be able to identify individual tools correctly.

This is why, as an alternative, the tool ID can be programmed by means of plaintext commands. The preparatory technology command for a physical tool change in #TOOL PREP corresponds to the T command and the request for new tool data in #TOOL DATA corresponds to the D command.

Announcing a tool change (T)

#TOOL PREP [<basic> [, <sister> [, <variant> ] ] ]

Requesting new tool data (D)

#TOOL DATA [<basic> [, <sister> [, <variant> ] ] ]

What is essential is to specify the basic tool number (basic). In addition, you can optionally program sister 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

A tool is described for the CNC by the data structure CNC_TOOL_DESC:

Excerpt from the structure CNC_TOOL_DESC in PLC

(* Variable name

Variable type

Reference *)

tool_id  

: CNC_TOOL_ID;

 

laenge

: DINT;

(* P-TOOL-00003 *)

radius

: DINT;

(* P-TOOL-00004 *)

ax_versatz

: ARRAY [1..32] OF DINT;

(* P-TOOL-00006 *)

kopf_versatz

: ARRAY [1..28] OF DINT;

(* P-TOOL-00009 *)

mass_einheit

: UINT;

(* P-TOOL-00008 *)

typ 

: UINT;

(* P-TOOL-00001 *)

srk_lage

: UINT;

(* P-TOOL-00002 *)

kin_id

: UINT;

(* P-TOOL-00011 *)

log_ax_nr_spdl

: UINT;

(* P-TOOL-00012 *)

tool_fixed

: BOOL;

(* P-TOOL-00010 *)

valid

: BOOL;

(* P-TOOL-00005 *)

res 

: ARRAY [1..4] OF BYTE;

 

param

: ARRAY [1..60] OF LREAL;

 

vb_min

: LREAL;

(* P-TOOL-00013 *)

vb_max

: LREAL;

(* P-TOOL-00014 *)

a_max

: LREAL;

(* P-TOOL-00015 *)

The meanings of individual data items are described in greater detail in [TOOL].

Notice

notice

A tool can be described by way of further data which, however, is not needed to request the tool geometry from the CNC and is additionally stored only in the ?PLC.