Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 831 -
------------------------------------------------------------------------------
5. Read binary data from the file. <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
fca_read
[Syntax]
#include <bios.h>
int fca_read( char *buffer, unsigned int bytes ) ;
[Argument]
buffer Memory area to store read data.
bytes Number of data bytes to be read. ( = 1 - 65534 )
[Return]
Returns the number of data bytes actually read when successfully
completed. Returns -1 if any error occurs.
[Description]
When called this function reads data from the binary file opened by
the fca_open() function.
Because the FCA devices require the size of the transmitted data to
exactly match with the size of its unit input/output data block, it
can happen, when returned from this function call, that extra null
characters ('\0') are added at the end of the data read. When a value
smaller than the specified byte count is returned, it should be
assumed that the last block of the file is read by that function call.
(Note) This function can be used only when the device connected to
the port is FANUC Handy File. It cannot be used for FANUC
CASSETTE ADAPTOR etc..