Chapter 7
NI-488.2 Programming Techniques
NI-488.2 User Manual for Windows
7-14
www.natinst.com
Autopolling and Interrupts
If autopolling and interrupts are both enabled, the NI-488.2 software can
perform autopolling after any device-level NI-488.2 call provided that no
GPIB I/O is currently in progress. In this case, an automatic serial poll can
occur even when your application is not making any calls to the NI-488.2
software. Autopolling can also occur when a device-level
ibwait
for RQS
is in progress. Autopolling is not allowed when an application calls a
board-level traditional or multi-device NI-488.2 call, or the stuck SRQ
(ESRQ) condition occurs.
Windows 98/95
In Windows 98/95, you can use your GPIB interface without interrupts, but
the NI-488.2 software performance is significantly slower without
interrupts. For example, transfer sizes between 1 and 10 bytes transfer at a
rate of only 2% of the transfer rate with enabled interrupts. As the transfer
size increases, the performance degradation decreases slightly, but it
remains a significant problem for all transfers under 1 Mbyte. For
instructions on how to assign an interrupt to your GPIB interface if one was
not assigned, refer to the
section in Appendix D,
Windows 98/95: Troubleshooting and Common Questions
.
Windows 2000/NT
The NI-488.2 software for Windows 2000/NT does not function properly
if interrupts are disabled.
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 "decl-32.h"
char GetSerialPollResponse ( int DeviceHandle )
{