EasyManuals Logo
Home>National Instruments>Software>NI-488.2 NI-488.2

National Instruments NI-488.2 NI-488.2 User Manual

National Instruments NI-488.2 NI-488.2
134 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #87 background imageLoading...
Page #87 background image
Chapter 8 NI-488.2 Programming Techniques
© National Instruments Corporation 8-15 NI-488.2 User Manual
SRQ and Serial Polling with Device-Level Traditional NI-488.2 Calls
You can use the device-level traditional NI-488.2 call ibrsp to conduct
a serial poll.
ibrsp conducts a single serial poll and returns the serial poll
response byte to the application. If automatic serial polling is enabled, the
application can use
ibwait to suspend program execution until RQS
appears in the status word,
ibsta. The program can then call ibrsp to
obtain the serial poll response byte.
The following example shows you how to use the
ibwait and ibrsp
functions in a typical SRQ servicing situation when automatic serial polling
is enabled:
#include "ni488.h"
char GetSerialPollResponse ( int DeviceHandle )
{
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;
}
SRQ and Serial Polling with Multi-Device NI-488.2 Calls
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
AllSpoll, ReadStatusByte,
FindRQS, TestSRQ, and WaitSRQ. Following are descriptions of each of
the calls:
AllSpoll can serial poll multiple devices with a single call. It places
the status bytes from each polled instrument into a predefined array.
Then, you must check the RQS bit (bit 6 or hex 40) of each status byte
to determine whether that device requested service.
ReadStatusByte is similar to AllSpoll, except that it only serial
polls a single device. It is similar to the device-level NI-488.2
ibrsp
function.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the National Instruments NI-488.2 NI-488.2 and is the answer not in the manual?

National Instruments NI-488.2 NI-488.2 Specifications

General IconGeneral
BrandNational Instruments
ModelNI-488.2 NI-488.2
CategorySoftware
LanguageEnglish