
------------------------------------------------------------------------------
7. Open a text file on FCA device. <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
fca_fopen
[Syntax]
#include <bios.h>
int fca_fopen( char *name, char *mode ) ;
[Argument]
name File name on FCA device. (max. 17 characters)
mode Access mode. ( = "r": read, "w": write )
[Return]
Returns zero if successful. Returns -1 if any error occurrs.
[Description]
This function opens a text file in the FCA device under control.
This function is used in conjunction with fca_fclose() function.
Only functions, fca_getc() and fca_putc(), can be used in between
fca_fopen() and fca_fclose() functions.
When the character '#' is used for the first character of the argument
"name", which passes the file name of the FCA device, it is assumed
that file number is designated. Following formats are available.
#xxxx ( xxxx is max. 4 digit number ) : xxxxth file
#0 : first file
#N : next file
#E : last file
(Note) When MS-DOS format is used in the FANUC Handy File, this
function cannot be used. ISO code and EIA code are the only
codes that this function and fca_putc() and fca_getc()
functions can handle.
[Example]
Refer to the example in "Read a character from the text file.
(fca_getc)".