IBWRTF
Board-Level/Device-Level
Purpose
Write data to a device from a file.
Format
C
unsigned long ibwrtf (int ud, const char *flname)
Visual Basic
CALL ibwrtf (ud%, flname$)
or
status% = ilwrtf (ud%, flname$)
Interactive Control (Usage Notes)
ibwrtf flname
Input
ud | Board or device descriptor |
flname | Name of file containing the data to be written |
Output
Function Return | The value of Ibsta |
Description
Device-Level
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.
Board-Level
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.
Possible Errors
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. |