GPIB Programming Techniques
Chapter 6
NI-488.2M UM for Windows NT
6-10
© National Instruments Corp.
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 parallel polling is that a
single parallel poll 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. The value of the individual status bit (
ist
) determines the
parallel poll response.
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.
S is 1 if the device is to assert the assigned data line when
ist
= 1, and 0 if the
device is to assert the assigned data line when
ist
= 0.
D2 through D0 determine the number of the assigned data line. The physical line
number is the binary line number plus one. For example, DIO3 has a binary bit
pattern of 010.
The following example code configures a device for parallel polling using NI-488
functions. The device asserts DIO7 if its
ist
= 0.