Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 375 -
------------------------------------------------------------------------------
1.25 Read program information. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rdproginfo
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_rdproginfo( int type, int length, struct odbnc *buf ) ;
struct odbnc {
union {
struct {
int reg_prg ; /* Amount of registered programs. */
int unreg_prg ; /* Amount of available programs.*/
long used_mem ; /* Character size of used memory.*/
long unused_mem ; /* Character size of unused */
} bin ; /* memory. */
char asc[31] ; /* Buffer for ASCII string format. */
} u ;
} ;
[Arguments]
type Data type ( =0(binary), 1(ASCII) ).
length Data block length ( =16(binary), 35(ASCII) ).
buf Buffer in which the program information is stored.
[Return]
0 Successful.
2 Incorrect data block length "length".
3 Incorrect data type "type".
[Description]
Reads the management data of NC programs already registered in CNC.
The management data of NC program are
Amount of registered programs,
Amount of available programs,
Character number of used memory,
Character number of unused memory.
This function returns these data with binary format or ASCII string
format. These informations are same as ones which are displayed in
PROGRAM/LIB screen (in EDIT mode) of CNC. Specify arguments as follows
for each formats.
Format type length
---------------+-------+-------
binary 0 16
ASCII 1 35