IBRDF

NI-488.2

IBRDF

Board-Level/Device-Level


Purpose

Read data from a device into a file.

Format

C

unsigned long ibrdf (int ud, const char *flname)

Visual Basic

CALL ibrdf (ud%, flname$)

or

status% = ilrdf (ud%, flname$)

Interactive Control (Usage Notes)

ibrdf flname

Input

ud Board or device descriptor
flname Name of file into which data is read

Output

Function Return The value of Ibsta

Description

Device-Level

If ud is a device descriptor, ibrdf addresses the GPIB, reads data from a GPIB device, and places the data into the file specified by flname. The operation terminates normally when END is received. The operation terminates with an error if the transfer could not complete 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, ibrdf reads data from a GPIB device and places the data into the file specified by flname. A board-level ibrdf assumes that the GPIB is already properly addressed. The operation terminates normally when END is received. The operation terminates with an error if the transfer could not complete 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 END was not received within the timeout period, or ud is a board descriptor and Device Clear was received after the read 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 ibconfig, options IbcPAD and IbcSAD.
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 ibrdf 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.