
FANUC Series 16i/18i/21i-MA/MB/TB TOOL MANAGEMENT FUNCTION A-78614EN
2002.08.08 Edition 04
132
13.5 Write individual data of Tool management data
Function Name:
cnc_wrtool2
Declaration:
#include "fwlib32.h"
FWLIBAPI short WINAPI cnc_wrtool2(unsigned short FlibHndl,
short number, IDBTLM *wrtool);
Description:
Writes the individual data on the Tool management data to the specified
Tool management data table.
Arguments:
FlibHndl
Specify the library handle.
See "1.1.3 Library handle" of SPECIFICATION MANUAL OF
DATA WINDOW LIBRARY for details.
number
Specify the data number at the Tool management data table.
wrtool
Specify the pointer to IDBTLM structure including the Tool
management data to be written. The IDBTLM structure is as
follows.
typedef struct idbtlm {
short data_id; /* specified data ID */
union {
unsigned char data1; /* 1 byte data */
short data2; /* 2 byte data */
long data4; /* 4 byte data */
} item;
} IDBTLM;
data_id
Identifies the Tool management data to be written. The
correspondence between the ID and the variable for the
data is as follows.
Name data_id variable for item
-------------------------------------------------------------------------------------------
Tool number(T) 1 data4
Tool life counter 2 data4
Maximum of tool life 3 data4
Predictive tool life 4 data4
State of tool life 5 data1
Customizing data (bit) 6 data1
Tool info. 7 data2
Tool length compensation
number (H) 8 data2
Cutter compensation
number (D) 9 data2