Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 353 -
------------------------------------------------------------------------------
1.13 Output NC program to be executed. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_dnc
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_dnc( 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 executing NC program has not
been completed, or no start-up command has been commanded.
2 Incorrect character number "number".
5 Incorrect NC program data.
-2 The CNC has been reset.
In this case, stop outputting of NC command data to be
executed and perform the end operation of outputting of NC
command.
[Description]
Outputs NC command data to be directly executed to CNC (for DNC
operation).
NC command data output is a string of ASCII code characters.
"Start output NC program to be executed(cnc_dncstart)" must be called
and cycle start must be performed before outputting NC command data to
be executed to CNC.
Set MEM mode and DMMN signal<G042#7> ON before executing
"cnc_dncstart".
"Stop output NC program to be executed(cnc_dncend)" must be called
after outputting.
Format of NC command data to be executed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NC command data to be executed to CNC is a string composed of ASCII
characters as following format.
LF Oxxxx LF Block1 LF Block2 LF ... LF Mxx LF %
LF NC command1 LF NC command2 LF ... LF Mxx LF %
LF 0x0A ('\n').
Mxx M code at the end of the DNC operation (M02,
M30,etc.).
'LF' must be placed at the top of the whole NC commands, and '%' at
the end.
'LF's are added after each NC commands.