Receive
Purpose
Read data bytes from a device.
Format
C
void Receive (int boardID, Addr4882_t address, void *buffer, size_t count, int termination)
|
Visual Basic
CALL Receive (boardID%, address%, buffer$, termination%)
|
Receive address count termination
|
Input
boardID
|
The interface number |
address
|
Address of a device to receive data |
count
|
Number of bytes to read |
termination
|
Description of the data termination mode (STOPend or an EOS character)
|
Output
buffer
|
Stores the received data bytes |
Description
Receive addresses the device described by address to talk and the interface to listen. Then up to count bytes are read and placed into the buffer. Data bytes are read until either count bytes have been read or the termination condition is detected. If the termination condition is STOPend, the read is stopped when a byte is received with the EOI line asserted. Otherwise, the read is stopped when an 8-bit EOS character is detected. The actual number of bytes transferred is returned in the global function, Ibcnt.
Possible Errors
EABO
|
The I/O timeout period elapsed before all the bytes were received. |
EARG
|
The address or termination parameter is invalid. The address must be a valid primary/secondary address pair. It cannot be the constant NOADDR. |
EBUS
|
No devices are connected to the GPIB. |
ECIC
|
The interface is not the Controller-In-Charge; see SendIFC. |
EDVR
|
The NI-488.2 driver is either configured incorrectly or is not properly installed. |
EHDL
|
boardID is 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. |