Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 622 -
------------------------------------------------------------------------------
4.3 Write punch-press tool data. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_wrpunchtl
[Syntax]
int cnc_wrpunchtl( int len, struct iodbpunch1 *buf ) ;
struct iodbpunch1 {
unsigned int number ; /* tool registration number */
unsigned int attr ; /* attribute */
union {
unsigned int u2data ; /* unsigned 2-byte */
int s2data ; /* signed 2-byte */
unsigned long u4data ; /* unsigned 4-byte */
long s4data ; /* signed 4-byte */
unsigned long u8data[2] ; /* unsigned 8-byte */
} u ;
} ;
[Arguments]
len Data block length. ( =4+(one of 2,4,8) )
buf Buffer in which the tool data are stored.
[Return]
0 Successful.
2 Incorrect data block length "len".
3 Incorrect tool registration number "buf.number".
4 Incorrect data attribute "buf.attr".
5 Incorrect data contents to be written.
6 There are no required options.
- Multi-tool control.
- Graphic function.
- Tool data setting.
[Description]
Writes various tool registration data (such as tool number, tool-punch
count, tool shape, etc.) of the specified tool registration number.
Specify the tool registration number in "buf.number" with binary
format. Specify the kind of data to be written in "buf.attr" with
binary format.
Store data to be written in one member of "buf.u" with binary format.
The available data number, data attribute and kind of data are as
follows.