Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 614 -
4. CNC window library for punch-press
------------------------------------------------------------------------------
4.1 Read punch-press tool data. (by registration number) <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rd1punchtl
[Syntax]
int cnc_rd1punchtl( 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]
buf Buffer in which the tool data are stored.
[Return]
0 Successful.
3 Incorrect tool registration number "buf.number".
4 Incorrect data attribute "buf.attr".
6 There are no required options.
- Multi-tool control.
- Graphic function.
- Tool data setting.
[Description]
Reads 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 read in "buf.attr" with
binary format.
The read data are stored with binary format in one member of "buf.u"
according to its data format.
The available data number, data attribute and kind of data are as
follows.