beautypg.com

Measurement Computing GPIB-488.2 User Manual

Page 43

background image

GPIB 488.2 Porting Guide

986992

IOtech to Associated MCC APIs

3-25

SendDataBytes is used to send data to previously addressed devices. This routine assumes that
the desired GPIB listeners have already been addressed (by using SendSetup, for example).

Values for eotmode are as follows. The constants are defined in the header file.

o NLend — Send NL (Line Feed) with EOI after last data byte.
o DABend — Send EOI with the last data byte in the string.
o NULLend — Do not mark the end of the transfer.


In the following example, GPIB board 0 sends an identification query to all previously
addressed listeners. End of data is signaled by an EOI.

Example:

SendDataBytes (0, "*IDN?", 5, DABend)



SendList
is used to send data to multiple GPIB devices. 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.

The constants are defined in the header file.

o NLend — Send NL (Line Feed) with EOI after last data byte.
o DABend — Send EOI with the last data byte in the string.
o NULLend — Do not mark the end of the transfer.


In the following 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.

Example
:

short addresslist[3] = {6, 7, NOADDR};

SendList (0, addresslist, "*IDN?", 5, DABend)