Tool data (D or #TOOL DATA)

Tool geometry

With every D<i> or #TOOL DATA the CNC requests tool data during NC program decoding.

When the new tool is requested, the D number, T number and the freely usable P parameter of the currently replaced tool are also included. This permits the PLC to detect which tool is to be replaced. Wear can be entered in the NC program by the P parameter, for example, and can be returned to the PLC in the tool change.

The following data (CNC_TOOL_REQUEST_IN) is transferred in the request from the CNC to the PLC:

id: CNC_TOOL_ID; (tool id of requested tool)

act_t_nr : DINT; (actual t number in nc kernel)

act_d_nr : CNC_TOOL_ID; (actual tool id in nc kernel)

param : ARRAY[1..60] OF LREAL;

log_ax_nr_tool_length: UINT; (spindle axis for tool length compensation)

The PLC returns the complete tool record (CNC_TOOL_DESC).

Requesting tool data from the PLC
Requesting tool data from the PLC

Programing Example

prg_example

Tool request

%main

N10 X1200

N11 S2[D1] (request tool D1 for spindle S2

N20 S2[D2 REV=1 M4] (request tool D2 for spindle S2

N30 D3 S100 M3 (request tool D3 for spindle S

N40 X0

N50 M30