Sendlist, Sendlist -22 – Measurement Computing GPIB-488 User Manual
Page 90

Chapter 4
GPIB 488.2 Library Reference
4-22
GPIB-488
SendList
Sends data to multiple GPIB devices.
Syntax
C
SendList(int board, short addresslist[],
char data[], long count, int eotmode)
Parameters
board
is an integer which identifies the GPIB board to use for this operation. In most
applications, this value is 0.
addresslist
is an array of GPIB addresses, terminated by the value
NOADDR
. These
addresses identify the devices on the system to reset.
data
is the string containing the data to send.
count
specifies the maximum number of data bytes to send 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
When this routine is executed, the specified GPIB board is addressed as a Talker and the
designated GPIB devices as Listeners. The board then sends the given number of bytes of data
from the data string to the listening GPIB devices.
•
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 the GPIB devices at addresses
6 and 7. End of data is signalled by an EOI.
C
short addresslist[3] = {6, 7, NOADDR};
SendList (0, addresslist, "*IDN?", 5, DABend)