
------------------------------------------------------------------------------
1.17 Read program directory. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rdprogdir
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_rdprogdir( short type, long datano_s, long datano_e,
short length, struct prgdir *buf ) ;
struct prgdir {
char prg_data[N] ; /* Contents of directory (ASCII */
} ; /* string). N: max 256 */
[Arguments]
type Format of program list (0,1,2).
datano_s Start program number to be read.
datano_e End program number to be read.
length Size of the following buffer for the program
directory.
buf Buffer in which the program directory list is stored.
[Return]
EW_OK( 0) Successful.
EW_LENGTH( 2) Incorrect buffer size "length".
EW_NUMBER( 3) The specified type is invalid.
EW_DATA( 5) The specified program number is invalid.
EW-BUSY(-1) In the CNC, read processing for program number list data
was rejected.
This code is returned if any of the following conditions
exists when this command is executed.
- The CNC is performing other command processing
(downloading, collating, uploading, or program number
list reading).
- Background editing is in progress or the MDI mode has
been entered.
- A P/S 000 or P/S 101 alarm condition has occurred.
EW_RESET(-2) The CNC was reset. Even in this case, the CNC completes
program number list reading normally.