EasyManuals Logo

National Instruments NI-488.2 NI-488.2 User Manual

National Instruments NI-488.2 NI-488.2
134 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #79 background imageLoading...
Page #79 background image
Chapter 8 NI-488.2 Programming Techniques
© National Instruments Corporation 8-7 NI-488.2 User Manual
0); // EOS mode disabled
if (ud < 0) {
printf ("ibdev failed.\n");
return 0;
}
// Issue a request to the device to send the data. If the ERR bit
// is set in ibsta, then print an error message that the call failed
// and exit the program.
ibwrt (ud, "SEND DATA", 9L);
if (ibsta & ERR) {
printf ("unable to write to device.\n");
return 0;
}
// set up the asynchronous event notification on RQS
ibnotify (ud, RQS, MyCallback, NULL);
if (ibsta & ERR) {
printf ("ibnotify call failed.\n");
return 0;
}
while ((ReadingsTaken < 1000) && !(DeviceError)) {
// Your application does useful work here. For example, it
// might process the device readings or do any other useful work.
}
// disable notification
ibnotify (ud, 0, NULL, NULL);
// Call the ibonl function to disable the hardware and software.
ibonl (ud, 0);
return 1;
}
int __stdcall MyCallback (int LocalUd, int LocalIbsta, int LocalIberr,
long LocalIbcntl, void *RefData)
{
char SpollByte;
char ReadBuffer[40];

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the National Instruments NI-488.2 NI-488.2 and is the answer not in the manual?

National Instruments NI-488.2 NI-488.2 Specifications

General IconGeneral
BrandNational Instruments
ModelNI-488.2 NI-488.2
CategorySoftware
LanguageEnglish