National Instruments NI-488.2M Software Reference Manual page 119

For os/2
Hide thumbs Also See for NI-488.2M:
Table of Contents

Advertisement

Chapter 6
ibppc requires an 8-bit value to designate the data line number, the ist
sense, and whether 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 S
is 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 generic device that
has the desired characteristics. The device has a primary address of 3, no
secondary address, a timeout of 3 s, EOS characters disabled, and asserts
EOI with the last byte of a write operation.
#include "decl.h"
char ppr;
dev = ibdev(0,3,0,T3s,1,0);
/* The following call configures the device to
respond to the poll on DIO7 and to assert the line
in the case when its ist is 0.
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.
© National Instruments Corp.
GPIB Programming Techniques
Pass the binary
6-11
NI-488.2M SRM for OS/2

Advertisement

Table of Contents
loading

Table of Contents