NewsCNCnetPDMAbout usSupport
  

CNC_WRTOOL2 | TOOLMNG

Description

Writes the individual data on the Tool management data to the specified Tool management data table.

Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".

MTConnect Fanuc Adapter

Universal Fanuc Driver

Fanuc Focas Library CD

Declaration

#include "fwlib32.h" or "fwlib64.h"

FWLIBAPI short WINAPI cnc_wrtool2(unsigned short FlibHndl,short number, IDBTLM *wrtool);

Arguments

FlibHndl   [ in ]

Specify the library handle. See "Library handle" for details.

number   [ in ]

Specify the data number at the Tool management data table.

wrtool   [ in ]

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;    /* 1byte type data */
        short         data2;    /* 2byte type data */
        long          data4;    /* 4byte type 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.
Namedata_idvariable for item
Tool number(T)1data4
Tool life counter2data4
Maximum of tool life3data4
Rest of tool life4data4
State of tool life5data1
Customizing data (bit)6data1
Tool information7data2
Tool length compensation number (H)8data2
Cutter compensation number (D)9data2
Spindle speed (S)10data4
Feed rate (F)11data4
Tool geometric compensation number (G)12data2
Tool wear compensation number (W)13data2
Tool geometric number14data2
Edge group number(only 0i-F, 30i/31i/32i)15data2
Edge number(only 0i-F, 30i/31i/32i)16data2
Origin magazine number(only 0i-F, 30i/31i/32i)17data2
Origin pot number(only 0i-F, 30i/31i/32i)18data2
Customizing data 131data4
Customizing data 232data4
Customizing data 333data4
Customizing data 434data4
Customizing data 535data4
:::
Customizing data 4070data4
(Note) Above customizing data(5-20) are available at only "the additional customized data on tool management function option(5-20)".
(Note) Above customizing data(5-40) are available at only "the additional customized data on tool management function option(5-40)".

Return

EW_OK is returned on successful completion, otherwise any value except EW_OK is returned.

The major error codes are as follows.

Return code Meaning/Error handling
EW_BUSY
(-1)
Other users(such as PMC) have accessed the same data window. Try this function again.
EW_NUMBER
(3)
The data number for the Tool management data table(number) is invalid.
EW_ATTRIB
(4)
The data_id at IDBTLM structure is invalid.
EW_DATA
(5)
The member, item.data1, item.data2, item.data4, in the IDBTLM structure is invalid.
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
0:error except EW_DATA
1:error of tool number
2:error of tool life counter
3:error of maximum of tool life
4:error of rest of tool life
5:error of state of tool life
7:error of tool information
8:error of tool length compensation number
9:error of cutter compensation number
10:error of spindle speed
11:error of feed rate
12:error of tool geometric compensation number
13:error of tool wear compensation number
14:error of tool geometric number
15:error of edge group number (only 0i-F, 30i/31i/32i)
16:error of edge number (only 0i-F, 30i/31i/32i)
17:error of origin magazine number(only 0i-F, 30i/31i/32i)
18:error of origin pot number(only 0i-F, 30i/31i/32i)
27:Registered magazine and pot number were specified.(only 0i-F, 30i/31i/32i)
29:Multi edge data is illegal.(Data of multi edge tool has a part of inconsistency on tool management funcion.)(only 0i-F, 30i/31i/32i)
31,..,70:error of customizing data
EW_NOOPT
(6)
No option
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
EW_PROT
(7)
Write protection
The Tool management data table is write protected.
EW_REJECT
(13)
Interference with other tool.
EW_OVRFLOW
(8)
Data of multi edge tool has a part of inconsistency on tool management funcion. (only 0i-F, 30i/31i/32i)

As for the other return codes or the details, see "Return status of Data window function"

CNC option

This function need the following CNC option.

    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.

And this function is related to the following CNC option.

  • Series 16i/18i/21i
  • This function is influenced by the additional customized data on tool management function option.
  • Series 0i-F, 30i/31i/32i
  • This function is influenced by the additional customized data on tool management function option(5-20),(5-40).

For HSSB connection,

    The extended driver/library function are necessary.

For Ethernet connection,

    The Ethernet function and the extended driver/library function are necessary.

    However, in case of Series 16i/18i/21i-B, 0i-F and 30i, the required CNC option is as follows.

    When Embedded Ethernet is used,

      above two optional functions are not required.

    When Ethernet board is used,

      only Ethernet function is required.

CNC parameter

This function is related to the following CNC parameter.
See the manual of CNC parameter for details.

  • Series 16i/18i/21i
  • 13220 (valid number of Tool management data)
  • Series 0i-F, 30i/31i/32i
    13220 (valid number of Tool management data)
    13201#3 (It is necessary to use multi edge tool on tool management function.)

CNC mode

This function can be used in any CNC mode.

Available CNC

0i-A 0i-B/C(Note) 0i-D 0i-F 15 15i 16 18 21 16i-A 18i-A 21i-A 16i-B 18i-B 21i-B 30i-A 30i-B
M (Machining)X X X O X X X X X O O O O O O O O
T (Turning) X X X O X - X X X X X X O O O O O
LC (Loader) - - - - - - X X X X X X X X X - -

0i-D0i-F16i18i30i-A30i-B
P (Punch press)X X X X - X
L (Laser) - - X - - X
W (Wire) - - X X X X


Power Mate i-DX
Power Mate i-HX
Power Motion i-AX

"O" : Both Ethernet and HSSB
"E" : Ethernet
"H" : HSSB
"X" : Cannot be used
"-" : None

Note) 0i-C does not support the HSSB function.

See Also

cnc_regtool   cnc_regtool_f2   cnc_deltool   cnc_rdtool   cnc_rdtool_f2   cnc_wrtool   cnc_wrtool_f2  

Privacy notice

This website uses cookies. By continuing to use it you agree to our privacy policy. 

https://www.inventcom.net/fanuc-focas-library/toolmng/cnc_wrtool2

Fanuc Focas Library | ToolMng | cnc_btlfpotsrh

Searches the empty pot in the same magazine based on the specified pot position.... [read more]
Fanuc Focas Library | ToolMng | cnc_btlfpotsrh

Fanuc Focas Library | ToolMng | cnc_delmagazine

Deletes the registered Tool management data number from the Magazine management table. This function searches at the Magazine... [read more]
Fanuc Focas Library | ToolMng | cnc_delmagazine

Fanuc Focas Library | ToolMng | cnc_delmag_property

Deletes the magazine property data.... [read more]
Fanuc Focas Library | ToolMng | cnc_delmag_property

Fanuc Focas Library | ToolMng | cnc_delpot_property

This function deletes the pot property data within the range specified by s_number and data_num.... [read more]
Fanuc Focas Library | ToolMng | cnc_delpot_property

Fanuc Focas Library | ToolMng | cnc_deltool

Deletes the Tool management data which is specified by the start data number and the number of the data from the Tool management... [read more]
Fanuc Focas Library | ToolMng | cnc_deltool

Fanuc Focas Library | ToolMng | cnc_rdmagazine

Reads the registered Tool management data number from the Magazine management table.... [read more]
Fanuc Focas Library | ToolMng | cnc_rdmagazine

Fanuc Focas Library | ToolMng | cnc_rdmag_property

Reads the magazine property data.... [read more]
Fanuc Focas Library | ToolMng | cnc_rdmag_property

Fanuc Focas Library | ToolMng | cnc_rdpot_property

This function reads the pot property data within the range specified by s_number and data_num.... [read more]
Fanuc Focas Library | ToolMng | cnc_rdpot_property

Fanuc Focas Library | ToolMng | cnc_rdtool

Reads the Tool management data which is specified by the start data number and the number of the data from the Tool management... [read more]
Fanuc Focas Library | ToolMng | cnc_rdtool

Fanuc Focas Library | ToolMng | cnc_rdtoolgeom_tlm

The tool geometry data of number specified by datanum is read from the tool geometry data number specified by snum.... [read more]
Fanuc Focas Library | ToolMng | cnc_rdtoolgeom_tlm

Fanuc Focas Library | ToolMng | cnc_rdtool_f2

Reads the Tool management data which is specified by the start data number and the number of the data from the Tool... [read more]
Fanuc Focas Library | ToolMng | cnc_rdtool_f2

Fanuc Focas Library | ToolMng | cnc_regmagazine

Registers the Tool management data number to the Magazine management table. This function searches at the Magazine management table... [read more]
Fanuc Focas Library | ToolMng | cnc_regmagazine

Fanuc Focas Library | ToolMng | cnc_regtool

Registers the Tool management data which is specified by the start data number and the number of the data to the Tool... [read more]
Fanuc Focas Library | ToolMng | cnc_regtool

Fanuc Focas Library | ToolMng | cnc_regtool_f2

Registers the Tool management data which is specified by the start data number and the number of the data to the Tool... [read more]
Fanuc Focas Library | ToolMng | cnc_regtool_f2

Fanuc Focas Library | ToolMng | cnc_reg_toolstrage

Storage position of magazine number and pot number is registered or released to tool management data. By specifying the storage position of... [read more]
Fanuc Focas Library | ToolMng | cnc_reg_toolstrage

Fanuc Focas Library | ToolMng | cnc_tool_move

The tool management data number is moved specifying the magazine number and the pot number of the source and the destination. When Tool Management... [read more]
Fanuc Focas Library | ToolMng | cnc_tool_move

Fanuc Focas Library | ToolMng | cnc_wrmagazine

Writes the Tool management data number to the entry of the Magazine management table specified by magazine number and pot... [read more]
Fanuc Focas Library | ToolMng | cnc_wrmagazine

Fanuc Focas Library | ToolMng | cnc_wrmag_property

Writes the magazine property data.... [read more]
Fanuc Focas Library | ToolMng | cnc_wrmag_property

Fanuc Focas Library | ToolMng | cnc_wrpot_property

This function writes the pot property data within the range specified by s_number and data_num.... [read more]
Fanuc Focas Library | ToolMng | cnc_wrpot_property

Fanuc Focas Library | ToolMng | cnc_wrtool

Writes the specified Tool management data to the Tool management data table. In case of writing the individual data on the Tool... [read more]
Fanuc Focas Library | ToolMng | cnc_wrtool

Fanuc Focas Library | ToolMng | cnc_wrtoolgeom_tlm

The tool geometry data of number specified by datanum is written from the tool geometry data number specified by snum.... [read more]
Fanuc Focas Library | ToolMng | cnc_wrtoolgeom_tlm

Fanuc Focas Library | ToolMng | cnc_wrtool_f2

Writes the specified Tool management data to the Tool management data table. In case of writing the individual data on the... [read more]
Fanuc Focas Library | ToolMng | cnc_wrtool_f2

Fanuc Focas Library | ToolMng | flist_ToolMng

CNC: Function related to tool management data... [read more]
Fanuc Focas Library | ToolMng | flist_ToolMng
Modified: 2023-12-05