National Instruments GPIB-PCII Getting Started page 39

Hide thumbs Also See for GPIB-PCII:
Table of Contents

Advertisement

Chapter 3
Writing an Advanced Program Using NI-488.2 Routines
ibonl (0,0);
exit(1);
}
/*
Read its status byte.
*
(Message Available) bit is set.
*/
ReadStatusByte(0, fluke, &statusByte);
if ((ibsta & ERR) || !(statusByte & MAVbit)) {
printf("The Serial Poll failed.
printf(" statusByte = 0x%x\n", ibsta, statusByte);
ibonl (0,0);
exit(1);
}
/*
Read the measurement.
*/
Receive(0, fluke, buffer, 100L, STOPend);
if (ibsta < 0) {
gpiberr("Receive error");
ibonl (0,0);
exit(1);
}
buffer[ibcnt] = '\0';
printf("Reading :
sum = sum + atof(buffer);
}
printf("
The average of the 10 readings is : %f\n", sum/10);
sendIFC (0);
ibonl (0,0);
}
gpiberr(char *msg)
{
printf ("%s\n", msg);
© National Instruments Corp.
Be sure that the MAV
%s\n", buffer);
3-15
PCII/IIA and NI-488.2 MS-DOS
ibsta = 0x%x
");

Advertisement

Table of Contents
loading

This manual is also suitable for:

Gpib-pciia181065-01181065-02

Table of Contents