Send

NI-488.2

Send


Purpose

Send data bytes to a device.

Format

C

void Send (int boardID, Addr4882_t address, const void *buffer, size_t count, int eotmode)

Visual Basic

CALL Send (boardID%, address%, buffer$, eotmode%)

Interactive Control (Usage Notes)

Send address buffer eotmode

Input

boardID The interface number
address Address of a device to which data is sent
buffer The data bytes to be sent
count Number of bytes to be sent
eotmode The data termination mode: DABend, NULLend, or NLend

Description

Send addresses the device described by address to listen and the interface to talk. Then count bytes from buffer are sent to the device. The last byte is sent with the EOI line asserted if eotmode is DABend. The last byte is sent without the EOI line asserted if eotmode is NULLend. If eotmode is NLend then a new line character ('\n') is sent with the EOI line asserted after the last byte of buffer. The actual number of bytes transferred is returned in the global function, Ibcnt.

Possible Errors

EABO The I/O timeout period has expired before all of the bytes were sent.
EARG Either the address parameter or eotmode parameter is invalid, or the buffer is empty and eotmode is DABend. The address must be a valid primary/secondary address pair; it cannot be the constant NOADDR. The eotmode parameter can only be DABend, NULLend, or NLend.
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.
ENOL No Listeners are on the GPIB to accept the data bytes.
EOIP Asynchronous I/O is in progress.