Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 505 -
------------------------------------------------------------------------------
1.73 Read tool life management data (tool group number). <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rdngrp
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_rdngrp( struct odbtool *buf ) ;
struct odbtool {
int datano ; /* Not used. */
int type ; /* Not used. */
long data ; /* Amount of tool group. */
} ;
[Arguments]
buf Buffer in which the tool management data are stored.
[Return]
0 Successful.
6 The required option (Tool life management or Tool number
expansion for tool life management (512 sets in total, only
M Series)) is not added.
[Description]
Reads the amount of registered tool group.
The amount of registered group is stored in "buf.data" with binary
format.
[Example]
The following program reads the amount of currently registered tool
group, and displays it.
#include <data.h>
#include <fwindow.h>
#include <stdio.h>
int example( void )
{
struct odbtool buf ;
int ret ;
ret = cnc_rdngrp( &buf ) ;
if ( !ret )
printf( "Total number of tool group is %ld.\n", buf.data ) ;
else
printf( "ERROR!(%d)\n", ret ) ;
return ( ret ) ;
}