National Instruments NI-488.2 User Manual page 85

National instruments user manual ni-488.2
Hide thumbs Also See for NI-488.2:
Table of Contents

Advertisement

Chapter 7
NI-488.2 Programming Techniques
NI-488.2 User Manual for Windows
The following example code configures a device for parallel polling
using traditional NI-488.2 calls. The device asserts DIO7 if its
is 0.
In this example, the
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.
The following call configures the device to respond to the poll on DIO7
and to assert the line in the case when its
pattern, 0110 0110 or hex 66, to
#include "decl-32.h"
char ppr;
dev = ibdev(0,3,0,T3s,1,0);
ibppc(dev, 0x66);
If the GPIB interface configures itself for a parallel poll, you should
still use the
ibppc
unit descriptor value as the first argument in
individual status bit (
function.
ibist
In the following example, the GPIB interface is to configure itself to
participate in a parallel poll. It asserts DIO5 when
poll is conducted.
ibppc(0, 0x6C);
ibist(0, 1);
2.
Conduct the parallel poll using
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
ibrpp(dev, &ppr);
if (ppr & 0x10) printf("ist = 1\n");
3.
Unconfigure the device for parallel polling with
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);
command opens a device that has a primary
ibdev
ibppc
function. Pass the interface index or an interface
) of the interface needs to be changed, use the
ist
ibrpp
of the device is 1.
ist
7-18
is 0. Pass the binary bit
ist
.
. Also, if the
ibppc
is 1 if a parallel
ist
and check the response for a
. Notice that
ibppc
www.natinst.com
ist

Advertisement

Table of Contents
loading

Table of Contents