News CNCnetPDM About us Support  
         
  

CNC_RDTLGEOMSIZE_EXT | TOOLGEOM

Description

This function reads the tool geometry size data within the range specified by "s_number" and "data_num".
The tool geometry size data is sequentially read one by one.
If the error occurs, the reading 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_rdtlgeomsize_ext( unsigned short FlibHndl, short coord, 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
s_number   [ in ]

Specify the data number in which reading is started.

data_num   [ in/out ]

The pointer to the number of reading data.
The tool geometry size data that belongs to one data number is counted by the set with one reading number.
Set the number of reading data to the data specified with the pointer beforehand.
The tool geometry size data of the number of "*data_num" are read from the data number which is specified by "s_number".
The number of data actually read 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.
The 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
The value of tool data 1 is returned.
In the case of "vacant", "0x7FFFFFFF" returns.
data2
The value of tool data 2 is returned.
In the case of "vacant", "0x7FFFFFFF" returns.
data3
The value of tool data 3 is returned.
In the case of "vacant", "0x7FFFFFFF" returns.
data4
The value of tool data 4 is returned.
In the case of "vacant", "0x7FFFFFFF" returns.
tooltype
Kind of tool is returned.
Tool type is as follows.
0:Tool is not defined.
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
Attachment value is returned.
The setting range is different depending on the kind of the tool.
In case of "0", the value of the 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
Holder number is returned.
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 ]

Tool name is returned. NULL is set to 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)
Reading number(data_num) is wrong.
EW_NUMBER
(3)
Reading start number(s_number) is wrong.
EW_ATTRIB
(4)
Program coordinate system value(coord) is wrong.
EW_NOOPT
(6)
No option.
Tool geometry size data 100-pairs or 300-pairs is necessary.

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 is 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_wrtlgeomsize_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_rdtlgeomsize_ext
Fanuc Focas Library | ToolGeom | cnc_wrtlgeomsize_ext
Description This function writes / deletes the tool geometry size data within the range specified by "s_number" and "data_num". The tool geometry size... [read more]
cnc_wrtlgeomsize_ext
Fanuc Focas Library | ToolGeom | flist_ToolGeom
CNC: Function related to tool geometry size data... [read more]
flist_ToolGeom
Modified: 2018-06-11