
FANUC Series 16i/18i/21i-MA/MB/TB TOOL MANAGEMENT FUNCTION A-78614EN
2002.08.08 Edition 04
135
13.6 New registration of Magazine management data
Function Name:
cnc_regmagazine
Declaration:
#include "fwlib32.h"
FWLIBAPI short WINAPI cnc_regmagazine(unsigned short FlibHndl,
short *data_num, IODBTLMAG *mag);
Description:
Registers the Tool management data number to the Magazine management
table.
This function searches at the Magazine management table using the
magazine number, pot number. And if it finds, it writes the Tool
management data number to 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 registration data for
the registration to the Magazine management table. Set the
number of the registration data(1...) to the pointed data
before calling this function.
After the execution of this function, *data_num holds the real
registered number of data.
mag
Specify the pointer to IODBTLMAG structure including the Tool
management data number to be registered. 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 specifies tool management data number
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