Fast Measurements (Ex. #3)
Sample program to perform fast measurements on the '9X' using GET,
DISP:ENAB OFF and FORMAT REAL.
Written for National AT-GPIB/TNT for Windows NT and later.
/*
**
** Sample program to perform fast measurements on the '9X'
** using GET, DISP:ENAB OFF and FORMAT REAL
**
** Written for National AT-GPIB/TNT for Windows NT and later
*/
#include <windows.h>
#include <stdio.h>
#include <time.h>
#include “decl-32.h”
void ibwrite(int counter, const char *string);
void sleep (long mswait);
time_t StartMain, Start, Stop, StopMain;
typedef union {
double d;
char c[8];
} r2d;
void main() {
int address = 10;
int i, j, counter; /* file descriptor for counter */
char reading[30];
char buf[100];
r2d Result;
printf (“Connecting to the '9X' on address %d using
National Instruments GPIB card.\n”, address);
if ((counter = ibdev(0, address, 0, T10s, 1, 0)) < 0) {
printf(“Could not connect to counter”);
exit(1);
}
sleep(100);
ibclr(counter);
sleep(100);
Programming Examples
4-8 Fast Measurements (Ex. #3)