
------------------------------------------------------------------------------
1.14 Search specified program. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_search
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_search( long number ) ;
[Arguments]
number Program number.
[Return]
EW_OK( 0) Successful.
EW_DATA( 5) The specified NC program is not registered in CNC.
EW_PROT( 7) Tape memory of CNC is protected.
EW_BUSY(-1) The program search command was rejected.
This code is returned if any of the following conditions
exists when this command is executed.
- The CNC is performing other window command processing
(downloading, collating, uploading, or program number
list reading).
- In the EDIT or memory mode, the automatic operation
signal OP<F000 #7> is on.
- In the EDIT or memory mode, a P/S 000 or P/S 101 alarm
condition has occurred.
[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.