News CNCnetPDM About us Support  
       
  

CNC_WRTLGEOMSIZE_EXT | TOOLGEOM

TOP

Description

This function writes / deletes the tool geometry size data within the range specified by "s_number" and "data_num".
The tool geometry size data is sequentially written / deleted one by one.
If the error occurs, the writing process thereafter is discontinued.

MTConnect Fanuc Adapter

Universal Fanuc Driver

Fanuc Focas Library CD

Declaration

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

FWLIBAPI short WINAPI cnc_wrtlgeomsize_ext( unsigned short FlibHndl, short coord, short type, short s_number, short *data_num, IODBTLGSEXT *tlgsext );

Arguments

FlibHndl   [ in ]

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

coord   [ in ]

Specify the program coordinate system.
When the tool offset switching function is invalid, this value is ignored.

0:Coordinate-1
1:Coordinate-2
type   [ in ]

Specify the type of written / deleted tool geometry size data.
The relation between the type and the setting data is as follows.

0:All data
1:Data1
2:Data2
3:Kind of the tool
4:Attachment
5:Attachment
6:Data3
7:Data4
8:Holder number
s_number   [ in ]

Specify the data number in which writing / deleting tool geometry size data is started.

data_num   [ in/out ]

The pointer to the number of writing / deleting data.
The tool geometry size data that belongs to one data number is counted by the set with one writing / deleting number.
Set the number of writing/deleting data to the data specified with the pointer beforehand.
The tool geometry size data of the number of "*data_num" are written / deleted from the data number which is specified by "s_number".
The number of data actually written / deleted is returned to "*data_num" when the execution of this function ends.

tlgsext   [ out ]

The pointer to the structure that storage the tool geometry size data.
IODBTLGSEXT structure is as follows.


typedef struct iodbtlgsext{
    long    data1;          /* Data1         */
    long    data2;          /* Data2         */
    long    data3;          /* Data3         */
    long    data4;          /* Data4         */
    char    tooltype;       /* Tool type     */
    char    install;        /* Attachment    */
    char    holder;         /* Holder number */
    char    toolname[9];    /* Tool name     */
} IODBTLGSEXT;
data1
Specify the value of tool data1.
In the case of "vacant", "0x7FFFFFFF" is specified.
data2
Specify the value of tool data2.
In the case of "vacant", "0x7FFFFFFF" is specified.
data3
Specify the value of tool data3.
In the case of "vacant", "0x7FFFFFFF" is specified.
data4
Specify the value of tool data4.
In the case of "vacant", "0x7FFFFFFF" is specified.
tooltype
Specify the kind of tool
Specify "type=3(Kind of the tool)" and "tooltype=0" to delete the tool geometry size data.
Kind of the tool is as follows.
0:Delete the tool geometry size data
10:General-purpose tool
11:Threading tool
12:Grooving tool
13:Round-nose tool
14:Point nose straight tool
15:Versatile tool
20:Drill
21:Counter sink tool
22:Flat end mill
23:Ball end mill
24:Tap
25:Reamer
26:Boring tool
27:Face mill
install
Specify the attachment value.
The setting range is different depending on the kind of the tool.
Specify "0", in case of the value of attachment is not set.
General-purpose tool 0-16
Threading tool 0-16
Grooving tool 0-16
Round-nose tool 0-16
Point nose straight tool0-12
Versatile tool 0-16
Drill 0-4
Counter sink tool 0-4
Flat end mill 0-4
Ball end mill 0-4
Tap 0-4
Reamer 0-4
Boring tool 0-4
Face mill 0-4
holder
Specify the holder number.
The setting range is as follows.
1 path system 0-120
2 path systems0-60
3 path sysyems0-40
4 path systems0-30
toolname   [ out ]

Specify the name of the tool.
Specify NULL for the end of the character string.

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_LENGTH
(2)
Writing / deleting number(data_num) is wrong.
EW_NUMBER
(3)
Writing / deleting start number(s_number) is wrong.
or the data effective number is over.
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_NUMBER
1:Writing / deleting start number(s_number) is wrong.
2:the data effective number is over.
EW_ATTRIB
(4)
Program coordinate system(coord) or type(type) is wrong.
EW_DATA
(5)
The member in the ODBTLGSEXT 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:"data1" is wrong.
2:"data2" is wrong.
3:"tooltype" is wrong.
4:"install" is wrong.
5:"toolname" is wrong.
6:"data3" is wrong.
7:"data4" is wrong.
8:"holder"
EW_NOOPT
(6)
No option.
Tool geometry size data 100-pairs or 300-pairs are necessary.
EW_PROT
(7)
Write protection.
Tool geometry size data is protected for writing.

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.

    Tool geometry size data 100-pairs or 300-pairs are necessary.

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 not related to CNC parameter.

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 X X X X X X O O
T (Turning) X X X O X - X X X X X X X X X 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_rdtlgeomsize_ext  

Privacy notice

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

https://www.inventcom.net/fanuc-focas-library/toolgeom/cnc_wrtlgeomsize_ext

Fanuc Focas Library | ToolGeom | cnc_rdtlgeomsize_ext

This function reads the tool geometry size data within the range specified by s_number and data_num. The tool geometry size data is... [read more]
Fanuc Focas Library | ToolGeom | cnc_rdtlgeomsize_ext

Fanuc Focas Library | ToolGeom | flist_ToolGeom

CNC: Function related to tool geometry size data... [read more]
Fanuc Focas Library | ToolGeom | flist_ToolGeom
Modified: 2023-12-05