Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 531 -
------------------------------------------------------------------------------
1.86 Write tool life management data (life count)(range specified).
<Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_wrcountr
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_wrcountr( int length, struct iodbtr *buf ) ;
struct iodbtr {
int datano_s ; /* Start group number. */
int dummy ; /* Not used. */
int datano_e ; /* End group number. */
struct {
long ntool ; /* Not used. */
long life ; /* Not used. */
long count ; /* Tool life counter. */
} data[N] ; /* N is the amount of group to be written.*/
} ;
[Arguments]
length Data block length ( =6+12*(amount of group to be
written) ).
buf Buffer in which the tool management data are stored.
[Return]
0 Successful.
2 Incorrect data block length "length".
3 Incorrect tool group number "buf.datano_s" or "buf.datano_e".
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]
Alters the tool life counter within the specified tool group range.
Specify the start tool group number in "buf.datano_s" and the end on
in "buf.datano_e" with binary format.
Store the tool life counter in "buf.data[i].count" with binary format.
The unit of the tool life value and the tool life counter is either
[minute] or [count]. The parameter No.6800#2 LTM determines which unit
is used.