Srq And Serial Polling With Multi-Device Ni-488.2 Calls - National Instruments NI-488.2 User Manual

National instruments user manual ni-488.2
Hide thumbs Also See for NI-488.2:
Table of Contents

Advertisement

SRQ and Serial Polling with Multi-Device NI-488.2 Calls

© National Instruments Corporation
char SerialPollResponse = 0;
ibwait ( DeviceHandle, TIMO | RQS );
if ( ibsta & RQS )
printf ( "Device asserted SRQ.\n" );
/* Use ibrsp to retrieve the serial poll response. */
ibrsp ( DeviceHandle, &SerialPollResponse );
}
return SerialPollResponse;
}
The NI-488.2 software includes a set of multi-device NI-488.2 calls that
you can use to conduct SRQ servicing and serial polling. Calls pertinent to
SRQ servicing and serial polling are
,
, and
FindRQS
TestSRQ
the calls:
can serial poll multiple devices with a single call. It places
AllSpoll
the status bytes from each polled instrument into a predefined array.
Then, you must check the RQS bit of each status byte to determine
whether that device requested service.
ReadStatusByte
polls a single device. It is also similar to the device-level NI-488.2
function.
ibrsp
serial polls a list of devices until it finds a device that is
FindRQS
requesting service or until it has polled all of the devices on the list.
The call returns the index and status byte value of the device requesting
service.
determines whether the SRQ line is asserted and returns to
TestSRQ
the program immediately.
is similar to
WaitSRQ
application until either SRQ is asserted or the timeout period is
exceeded.
The following examples use these calls to detect SRQ and then determine
which device requested service. In these examples, three devices are
present on the GPIB at addresses 3, 4, and 5, and the GPIB interface is
designated as bus index 0. The first example uses
which device is requesting service, and the second example uses
to serial poll all three devices. Both examples use
GPIB SRQ line to be asserted.
Chapter 7
{
AllSpoll
. Following are descriptions of each of
WaitSRQ
is similar to
AllSpoll
, except that
TestSRQ
7-15
NI-488.2 Programming Techniques
,
ReadStatusByte
, except that it only serial
suspends the
WaitSRQ
to determine
FindRQS
AllSpoll
to wait for the
WaitSRQ
NI-488.2 User Manual for Windows
,

Advertisement

Table of Contents
loading

Table of Contents