Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 363 -
------------------------------------------------------------------------------
1.18 Input NC program (conditional). <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_cupload
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_cupload( struct odbup *buf, int *number ) ;
struct odbup {
int dummy[2] ; /* Not used. */
char data[N] ; /* NC program data (ASCII string). */
} ; /* N: max 256 */
[Arguments]
buf Buffer in which NC program data are stored.
number Size of the above buffer, amount of characters
included in input NC command data characters.
[Return]
0 Successful.
1 The start-up procedure of CNC for reading NC program has not
been completed, or no start-up command has been commanded.
2 Incorrect buffer size "number".
10 The buffer for NC program in CNC is empty. Retry to input NC
program data again.
[Description]
Inputs contents of NC program specified by "cnc_upstart" function from
CNC.
This is same as "Input NC program(cnc_upload)" except that this
returns ERROR 10 without waiting in the library when the library can
not get data because the buffer of CNC is empty.
Refer "cnc_upload" function for format of input data, etc.
[Example]
The following program is a modified version of the example of "Input
NC program(cnc_upload)" using this function.