Senddatabytes, Senddatabytes -20 – Measurement Computing GPIB-488 User Manual
Page 88

Chapter 4
GPIB 488.2 Library Reference
4-20
GPIB-488
SendDataBytes
Sends data to previously addressed devices.
Syntax
C
SendDataBytes(int board, char data[], long count,
int eotmode)
Parameters
board
is an integer which identifies the GPIB board to be used for this operation. In most
applications, this value is 0.
data
is the string that contains the data which is sent to the device.
count
specifies the maximum number of data bytes which are to be sent to the device.
eotmode
is the flag used to signal the end of data.
Returns
ibsta
will contain a 16-bit status word as described in Appendix B,
.
iberr
will contain an error code, if an error occurred.
Usage Notes
This routine assumes that the desired GPIB listeners have already been addressed (by using
SendSetup
, for example).
Values for
eotmode
are as follows:
•
NLend
—Send NL (Line Feed) with EOI after last data byte.
•
DABend
—Send EOI with the last data byte in the string.
•
NULLend
—Do not mark the end of the transfer.
These constants are defined in the header files.
Example
In this example, GPIB board 0 sends an identification query to all previously addressed
listeners. End of data is signaled by an EOI.
C
SendDataBytes (0, "*IDN?", 5, DABend)