Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 834 -
------------------------------------------------------------------------------
6. Write binary data to the file. <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
fca_write
[Syntax]
#include <bios.h>
int fca_read( char *buffer, unsigned int bytes ) ;
[Argument]
buffer Memory area to store write data.
bytes Number of data bytes to be written. ( = 1 - 65534 )
[Return]
Returns the number of data bytes actually written when successfully
completed. Returns -1 if any error occurs.
[Description]
This function is called to write data into a 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, the
data is padded with null characters, '\0', when it is shorter than
the unit size. As a result, it can happen that extra null characters,
'\0', are added at the end of the destination file.
(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..