
FANUC Series 16i/18i/21i-MA/MB/TB TOOL MANAGEMENT FUNCTION A-78614EN
2002.08.08 Edition 04
128
13.3 Read Tool management data
Function Name:
cnc_rdtool
Declaration:
#include "fwlib32.h"
FWLIBAPI short WINAPI cnc_rdtool(unsigned short FlibHndl,
short s_number, short *data_num,
IODBTLMNG *tool);
Description:
Reads the Tool management data which is specified by the start data
number and the number of the data from the Tool management data table.
Reading by this function is done sequentially one by one. Once the
error occurs, succeeding reading is aborted.
Arguments:
FlibHndl
Specify the library handle.
See "1.1.3 Library handle" of SPECIFICATION MANUAL OF
DATA WINDOW LIBRARY for details.
s_number
Specify the start data number for reading from the Tool
management data table.
data_num
Specify the pointer to the number of the reading data for
reading from the Tool management data table. Set the number of
the reading data(1...) to the pointed data before calling this function.
This function reads the number of Tool management data
specified by "*data_num", from the index specified by "s_number".
After the execution of this function, *data_num holds
the real read number of data.
tool
Specify the pointer to IODBTLMNG structure including the Tool
management data to be read. As for the IODBTLMNG structure,
refer to the explanation of arguments of cnc_regtool function.
Return: EW_OK is returned on successful completion, otherwise any value except
EW_OK is returned. The major error codes are as follows.
(As for the details, see "1.1.5 Return status of Data window function" of
SPECIFICATION MANUAL OF DATA WINDOW LIBRARY.)
--------------------------------------------------------------
Return code Meaning/Error handling
--------------------------------------------------------------
EW_BUSY Other users (such as PMC) have accessed to the same
data window.
Try this function again.
EW_NUMBER The start data number for the Tool management