Serial Polling with Device-Level Traditional NI-488.2 Calls

NI-488.2

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 function, 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 calls in a typical SRQ servicing situation when automatic serial polling is enabled.

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;
}

Related Topics:

AllSpoll

Automatic Serial Polling Overview

FindRQS

IBRSP

IBRSV

Serial Polling Overview

Serial Polling with Multi-Device NI-488.2 Calls

Service Requests from Devices