SendDataBytes

NI-488.2

SendDataBytes


Purpose

Send data bytes to devices that are already addressed to listen.

Format

C

void SendDataBytes (int boardID, const void *buffer, size_t count, int eotmode)

Visual Basic

CALL SendDataBytes (boardID%, buffer$, eotmode%)

Interactive Control (Usage Notes)

SendDataBytes buffer eotmode

Input

boardID The interface number
buffer The data bytes to be sent
count Number of bytes to be sent
eotmode The data termination mode: DABend, NULLend, or NLend

Description

SendDataBytes sends count number of bytes from the buffer to devices which are already addressed to listen. 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. The actual number of bytes transferred is returned in the global function, Ibcnt.

SendDataBytes assumes that the interface is in talk-active state and that devices are already addressed as Listeners on the GPIB (see SendSetup, Send, or SendList).

Possible Errors

EABO The I/O timeout period expired before all of the bytes were sent.
EADR The interface is not talk-active; use SendSetup to address the GPIB properly.
EARG Either the eotmode parameter is invalid (it can only be DABend, NULLend, or NLend), or the buffer is empty and the eotmode is DABend.
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; use SendSetup to address the GPIB properly.
EOIP Asynchronous I/O is in progress.