Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 352 -
------------------------------------------------------------------------------
1.12 Start output NC program to be executed. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_dncstart
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_dncstart( void ) ;
[Arguments]
------
[Return]
0 Successful.
-1 Start command for output of NC program to be executed has been
rejected.
This code is returned under one of following conditions.
- CNC is executing other requested command (downloading,
comparing, uploading or reading program directory).
- Any alarms are set.
- CNC is executing the other program.
[Description]
It is possible to get CNC software to run a NC program (NC command
data), which is made by the application program, directly (DNC
operation).
This is DNC operation, which is ordinarily executed via RS-232C, via
CNC window from C language application.
The application program requests CNC to start DNC operation by this
function.
In addition to calling functions about DNC operation by the
application program, it is necessary for executing DNC operation to
operate signals by the LADDER software of PMC.
Execute the following steps.
(1) Set CNC's mode as MEM mode. [LADDER]
(2) Set "DMMC" signal(G42#7) as "1". [LADDER]
(3) Execute "cnc_dncstart" function. [C application]
(4) Start automatic operation by operating "ST" signal(G7#2)
"0"->"1"->"0". [LADDER]
(5) Send NC commands by "cnc_dnc" function. [C application]
(6) Execute "cnc_dncend" function after sending all NC commands.
[C application]
(7) Reset CNC when the program is completed (i.e., the M-code which
means the end of the program is detected.) [LADDER]
(8) Set "DMMC" signal as "0". [LADDER]
The CNC software goes on waiting NC commands sent by "cnc_dnc"
function from starting of DNC operation. To stop the operation in this
state, reset the CNC.
[Example]
See example of "Output NC program to be executed(cnc_dnc)".