Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1114

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

38
Sample Programs
}
/* Analyze the captured waveform.
* --------------------------------------------------------------- */
void analyze (void)
{
1114
do_query_string(":ACQuire:MODE?");
printf("Acquire mode: %s\n", str_result);
/* Or, configure by loading a previously saved setup.
* ------------------------------------------------------------- */
/* Read setup string from file. */
fp = fopen ("c:\\scope\\config\\setup.stp", "rb");
num_values = fread (ieeeblock_data, sizeof(unsigned char),
IEEEBLOCK_SPACE, fp);
fclose (fp);
printf("Read setup string (%d bytes) from file ", num_values);
printf("c:\\scope\\config\\setup.stp.\n");
/* Restore setup string. */
num_values = do_command_ieeeblock(":SYSTem:SETup", num_values);
printf("Restored setup string (%d bytes).\n", num_values);
/* Set the desired number of waveform points,
* and capture an acquisition. */
do_command(":ACQuire:POINts 32000");
do_command(":DIGitize");
double wav_format;
double acq_type;
double wav_points;
double avg_count;
double x_increment;
double x_origin;
double y_increment;
double y_origin;
FILE *fp;
int num_values;
/* Number of bytes returned from instrument. */
int i;
/* Make measurements.
* ------------------------------------------------------------- */
do_command(":MEASure:SOURce CHANnel1");
do_query_string(":MEASure:SOURce?");
printf("Measure source: %s\n", str_result);
do_command(":MEASure:FREQuency");
do_query_number(":MEASure:FREQuency?");
printf("Frequency: %.4f kHz\n", num_result / 1000);
do_command(":MEASure:VAMPlitude");
do_query_number(":MEASure:VAMPlitude?");
printf("Vertical amplitude: %.2f V\n", num_result);
/* Download the screen image.
* ------------------------------------------------------------- */
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents