Example Code
Main.cpp Application Code Using VXI Plug&Play
338
Agilent 81250 Parallel Bit Error Ratio Tester, Programming Reference, March 2006
Main.cpp Application Code
Using VXI Plug&Play
The following is an example of implementing plug & play functionality.
It is recommended that you use the plug & play functionality to
program the system.
// main.cpp
// This is a small demo program showing how to use
// the remote interface of the 81200A user software
//
// It demonstrates how to:
// - connect to a firmware server
// - set up ports and terminals,
// - apply levels / thresholds
// - import data segment
// - set up a sequence
// - set measurement mode
// - start measurement
// - find out when measurement is done
// - stop measurement
// - get captured data
// - export captured data to a file
//
// To simplify code the VXI Plug&Play interface is used.
//
// Any error that occurs is logged to stdout or a file.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hp81200.h"
#define SYSTEM_NAME1 "DSRA"
#define SETTING_NAME "prog_sample"
static ViSession hInstrument;
static FILE* fp;
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com