Agilent Technologies 86100-90086 Sprinkler User Manual


 
2-35
Sample Programs
Listings of the Sample Programs
* Description: This routine closes device session.
*/
void close_IO ( )
{
ibonl ( scope,0 ); /* close device session */
} /* end close_IO ( ) */
multidatabase.c Sample Program
/*multidatabase.c*/
/*
* This example program demonstrates the use of the Multidatabase functionality of the
* Agilent 86100 DCA. The program sets up an acquitision of 200 waveforms on two
* channels, first serially, then in parallel. A mask test and simple
* measurements are made on each channel. NOTE: the timeout value must
* be set to a higher value (~30s) so that there is enough time to acquire the
* data.
*/
#include <stdio.h>//standard c++ io funcitons
#include <time.h>//time funcitons
//GPIB prototypes (from IO file)
void init_IO ( );
void write_IO ( char* );
int read_IO ( char*, unsigned long );
void close_IO ( );
//prototypes
void initialize();
int acquire_serial();
int acquire_parallel();
void main()
{
int serialTime, parallelTime; //declarations
init_IO(); //initial the interface and open GPIB communications
initialize(); //set up the instrument
serialTime = acquire_serial();//acquire the data in serial
parallelTime = acquire_parallel();//acquire the data in parallel
close_IO(); //close GPIB communications
printf("\nSerial Acquisition Time: %d ms\nParallel Acquisition Time: %d ms\n",
serialTime, parallelTime);//display acquisition times
printf("Time Savings: %d ms\n", serialTime-parallelTime);
//display the time savings
}//main()