Chapter 7 GPIB Programming Techniques
© National Instruments Corp. 7-11 NI-488.2 User Manual for Windows
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.
In this example, the ibdev command is used to open a device that has a primary
address of 3, has no secondary address, has a timeout of 3 s, asserts EOI with the last
byte of a write operation, and has EOS characters disabled.
#include "decl.h"
char ppr;
dev = ibdev(0,3,0,T3s,1,0);
/* Pass the binary bit pattern, 0110 0110 or hex 66, to
ibppc */
ibppc(dev, 0x66);
If the GPIB interface board configures itself for a parallel poll, you should still use
the ibppc function. Pass the board index or a board unit descriptor value as the
first argument in ibppc. In addition, if the individual status bit (ist) of the board
needs to be changed, use the ibist function.
In the following example, the GPIB board is to configure itself to participate in a
parallel poll. It asserts DIO5 when ist = 1 if a parallel poll is conducted.
ibppc(0, 0x6C);
ibist(0, 1);
2. Conduct the parallel poll using ibrpp and check the response for a certain value.
The following example code performs the parallel poll and compares the response to
hex 10, which corresponds to DIO5. If that bit is set, the ist of the device is 1.
ibrpp(dev, &ppr);
if (ppr & 0x10) printf("ist = 1\n");
3. Unconfigure the device for parallel polling with ibppc. Notice that any value
having the parallel poll disable bit set (bit 4) in the bit pattern disables the
configuration, so you can use any value between hex 70 and 7E.
ibppc(dev, 0x70);