Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 335 -
------------------------------------------------------------------------------
1.3 Output NC program to be registered. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_download
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_download( char *data, int number ) ;
[Arguments]
data NC program data (ASCII string).
number Character number of NC program data (1 - 256).
[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 character number "number".
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.
[Description]
Outputs NC program to be registered to CNC.
NC program output is a string of ASCII code characters.
"Start output of NC program to be registered(cnc_dwnstart)" must be
called before outputting NC program to be registered to CNC, and
"Stop output NC program to be registered(cnc_dwnend)" after
outputting.
If any program whose program number is same as newly registering
NC program's is already registered in CNC, one of following procedure
will be done according to CNC parameter No.3201#2 REP.
REP = "0" Return code "5" will be returned, and the new
program will be not registered.
REP = "1" The new program will be registered with
deleting already registered one, i.e., the new
program will replace the old one.