National Instruments NI-488.2 Time Clock User Manual


 
GPIB Programming Techniques Chapter 7
NI-488.2 User Manual for Windows 7-10 © National Instruments Corp.
/* Use Allspoll to serial poll all the devices at once. */
AllSpoll ( 0, AddrList, ResponseList );
if (!(ibsta & ERR)) {
for ( i = 0; AddrList[i] != NOADDR; i++ ) {
printf ("Device at pad %x returned byte %x.\n",
AddrList[i], ResponseList[i] );
}
}
}
return;
}
Parallel Polling
Although parallel polling is not widely used, it is a useful method for obtaining the status
of more than one device at the same time. The advantage of a parallel poll is that it can
easily check up to eight individual devices at once. In comparison, eight separate serial
polls would be required to check eight devices for their serial poll response bytes.
Implementing a Parallel Poll
You can implement parallel polling with either NI-488 functions or NI-488.2 routines. If
you use NI-488.2 routines to execute parallel polls, you do not need extensive knowledge
of the parallel polling messages. However, you should use the NI-488 functions for
parallel polling when the GPIB board is not the Controller and must configure itself for a
parallel poll and set its own individual status bit (ist).
Parallel Polling with NI-488 Functions
Follow these steps to implement parallel polling using NI-488 functions. Each step
contains example code.
1. Configure the device for parallel polling using the ibppc function, unless the device
can configure itself for parallel polling.
ibppc requires an 8-bit value to designate the data line number, the ist sense, and
whether or not the function configures or unconfigures the device for the parallel
poll. The bit pattern is as follows:
0 1 1 E S D2 D1 D0
E is 1 to disable parallel polling and 0 to enable parallel polling for that particular
device.