Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 367 -
------------------------------------------------------------------------------
1.21 Search specified program. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_search
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_search( int number ) ;
[Arguments]
number Program number.
[Return]
0 Successful.
5 The specified NC program is not registered in CNC.
7 Tape memory of CNC is protected.
-1 Program search 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).
- CNC's mode is EDIT or MEM and Automatic operating signal
"OP"<F000#7> is "ON".
- CNC's mode is EDIT or MEM and P/S 000 or P/S 101 alarm is
set.
[Description]
Searches the NC program already registered in CNC.
This function is used to select one NC program before memory operation
is executed in CNC.
Foreground search is preformed for EDIT or MEM mode and background
search (only checks whether the specified program exists or not.) for
the other mode.
Specify the program number of NC program to be searched in "number"
with binary format.