IBRD
Board-Level/Device-Level
Purpose
Read data from a device into a user buffer.
Format
C
unsigned long ibrd (int ud, void *rdbuf, size_t count)
Visual Basic
CALL ibrd (ud%, rdbuf$)
or
status% = ilrd (ud%, rdbuf$, count&)
Interactive Control (Usage Notes)
ibrd count
Input
ud | Board or device descriptor |
count | Number of bytes to be read from the GPIB |
Output
rdbuf | Address of buffer into which data is read |
Function Return | The value of Ibsta |
Description
Device-Level
If ud is a device descriptor, ibrd addresses the GPIB, reads up to count bytes of data, and places the data into the buffer specified by rdbuf. The operation terminates normally when count bytes have been received or 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, ibrd reads up to count bytes of data and places the data into the buffer specified by rdbuf. A board-level ibrd assumes that the GPIB is already properly addressed. The operation terminates normally when count bytes have been received or 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 | Either count bytes or END was not received within the timeout period or a Device Clear message 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 | Either the buffer or the count 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. |
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. |