Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 341 -
------------------------------------------------------------------------------
1.5 Output NC program to be registered (by address, conditional). <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_acdwnload
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_acdwnload( int length, struct iodbdata *buf ) ;
struct iodbdata {
int dummy[2] ; /* Not used. */
char data[N] ; /* NC program data (ASCII string). */
} ; /* N: max 65531 */
[Arguments]
length Data block length ( =4+(output string length) ).
buf Pointer to the structure including NC program data (
ASCII string).
[Return]
0 Successful.
1 The start-up procedure of CNC for registering NC program has
not been completed, or no start-up command has been commanded.
2 Incorrect data block length "length".
5 Incorrect NC program data. This code is returned under one of
following conditions.
- The same program number is already registered.
- A character which is unavailable for NC program is detected.
- When TV check is effective, a block which includes odd
characters (including 'LF' at the end of the block) is
detected.
8 No more NC program can be stored because tape memory of CNC is
full.
10 The buffer for NC program to be registered in CNC is full.
Retry to register the same data again.
[Description]
Outputs NC program to be registered to CNC.
This is same as "Output NC program to be registered(conditional)(
cnc_cdownload)" except following differences.
(1) The library send an address of the data buffer to CNC. The CNC
software read data immediately from memory pointed by the address.
(2) This function returns ERROR 10 during the CNC software has not
read all data.
(3) Application program must keep contents of buffer until the CNC
software completes reading all data.
(4) The maximum string length to be output at a time is 65531 bytes.
Refer "cnc_download" function for format of output data, etc.