National Instruments GPIB-PCII Getting Started page 38

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

Advertisement

Writing an Advanced Program Using NI-488.2 Routines
if (strncmp(buffer, "FLUKE, 45", 9) == 0) {
fluke = result[loop];
printf("**** We found the Fluke ****\n");
break;
}
}
if (loop > num_listeners) {
printf("Did not find the Fluke!\n");
ibonl (0,0);
exit(1);
}
/*
Reset the Fluke.
*/
DevClear(0, fluke);
if (ibsta < 0) {
gpiberr("DevClear error");
ibonl (0,0);
exit(1);
}
Send(0, fluke, "*RST", 4L, NLend);
/*
Setup for a test.
*
SRQ when it has a message to send.
*/
Send(0, fluke, "VAC; AUTO; TRIGGER 2; *SRE 16", 29L, NLend);
if (ibsta < 0) {
gpiberr("Send setup error");
ibonl (0,0);
exit(1);
}
sum = 0.0;
for (m=0; m < 10 ; m++) {
/*
Trigger the Fluke.
*/
Send(0, fluke, "*TRG; VAL?", 10L, NLend);
if (ibsta < 0) {
gpiberr("Send trigger error");
ibonl (0,0);
exit(1);
}
/*
Wait for the Fluke to assert SRQ, meaning it is ready
*
with the measurement.
*/
WaitSRQ(0, &SRQasserted);
if (!SRQasserted) {
printf("SRQ is not asserted.
ready.\n");
PCII/IIA and NI-488.2 MS-DOS
Allow the Fluke to assert
The Fluke is not
3-14
© National Instruments Corp.
Chapter 3

Advertisement

Table of Contents
loading

This manual is also suitable for:

Gpib-pciia181065-01181065-02

Table of Contents