
FANUC Series 16i/18i/21i-MA/MB/TB TOOL MANAGEMENT FUNCTION A-78614EN
2002.08.08 Edition 04
139
13.8 Read Magazine management data
Function Name:
cnc_rdmagazine
Declaration:
#include "fwlib32.h"
FWLIBAPI short WINAPI cnc_rdmagazine(unsigned short FlibHndl,
short *data_num, IODBTLMAG *mag);
Description:
Reads the registered Tool management data number from the Magazine
management table.
This function searches at the Magazine management table using the
magazine number, pot number. And if it finds, it reads the Tool
management data number from the matched entry.
Arguments:
FlibHndl
Specify the library handle.
See "1.1.3 Library handle" of SPECIFICATION MANUAL OF
DATA WINDOW LIBRARY for details.
data_num
Specify the pointer to the number of the reading data for
reading from the Magazine management table. Set the
number of the reading data(1...) to the pointed data before
calling this function.
After the execution of this function, *data_num holds the real
read number of data.
mag
Specify the pointer to IODBTLMAG structure including the Tool
management data number to be read. The IODBTLMAG structure is
as follows.
typedef struct iodbtlmag {
short magazine; /* magazine number (1..4) */
short pot; /* pot number */
short tool_index; /* tool management data number */
} IODBTLMAG;
magazine specifies magazine number.
pot specifies pot number.
tool_index when this function terminates normally, tool
management data number is returned.
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
--------------------------------------------------------------