Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 369 -
------------------------------------------------------------------------------
1.22 Delete all programs. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_delall
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_delall( void ) ;
[Arguments]
------
[Return]
0 Successful.
7 Tape memory of CNC is protected, or the target program is
protected.
-1 All program deletion command 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 automatic operation is being executed. (Automatic
operating signal "OP"<F000#7> is "ON".)
- P/S 000, P/S 101 or any BP/S alarm is set.
[Description]
Deletes all NC programs registered in CNC.
Even the selected program in foreground editing is deleted by this
function. But when any automatic operation is being executed, program
deletion is not performed.
[Example]
The following program deletes all programs and displays the result.
#include <data.h>
#include <fwindow.h>
#include <stdio.h>
void example( void )
{
int ret ;
ret = cnc_delall() ;
switch ( ret ) {
case 0:
printf( "ALL PROGRAMS has been deleted.\n", num ) ;
break ;
case 7:
printf( "PROTECTED.\n" ) ;
break ;
case -1:
printf( "REJECTED.\n" ) ;
break ;
}
}