Write data to a device from a file.
unsigned int ibwrtf (int ud, const char *flname)
ibwrtf flname
ud | Board or device descriptor |
flname | Name of file containing the data to be written |
Function Return | The value of Ibsta |
If ud is a device descriptor, ibwrtf addresses the GPIB and writes all of the bytes from the file flname to a GPIB device. The operation terminates normally when all of the bytes have been sent. The operation terminates with an error if all of the bytes could not be sent within the timeout period. The actual number of bytes transferred is returned in the global function Ibcnt.
If ud is a board descriptor, ibwrtf writes all of the bytes of data from the file flname to a GPIB device. A board-level ibwrtf assumes that the GPIB is already properly addressed. The operation terminates normally when all of the bytes have been sent. The operation terminates with an error if all of the bytes could not be sent within the timeout period, or if the board is not CIC, the CIC sends a Device Clear on the GPIB. The actual number of bytes transferred is returned in the global function Ibcnt.
EABO | Either the file could not be transferred within the timeout period, or a Device Clear message was received after the write operation began. |
EADR | Board-level: The GPIB is not correctly addressed; use ibcmd to address the GPIB. |
Device-level: A conflict exists between the device GPIB address and the GPIB address of the device access board. Use the IbcPAD and IbcSAD options in ibconfig. | |
EARG | flname is invalid. |
EBUS | Device-level: No devices are connected to the GPIB. |
ECIC | Device-level: The access board is not CIC. See Device-Level Calls and Bus Management. |
EDVR | The NI-488.2 driver is either configured incorrectly or is not properly installed. |
EFSO | ibwrtf could not access flname. |
EHDL | ud is invalid or out of range. |
ELCK | The requested operation could not be performed because of an existing lock by another process. |
ENEB | The interface is not installed or is not properly configured. |
EOIP | Asynchronous I/O is in progress. |