Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1063

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

Advertisement

}
/* Analyze the captured waveform.
* --------------------------------------------------------------- */
void analyze (void)
{
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
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.
* ------------------------------------------------------------- */
/* Read screen image. */
num_values = do_query_ieeeblock(":DISPlay:DATA? PNG");
printf("Screen image bytes: %d\n", num_values);
/* Write screen image bytes to file. */
fp = fopen ("c:\\scope\\data\\screen.png", "wb");
num_values = fwrite(ieeeblock_data, sizeof(unsigned char), num_values,
fp);
fclose (fp);
printf("Wrote screen image (%d bytes) to ", num_values);
printf("c:\\scope\\data\\screen.bmp.\n");
/* Download waveform data.
* ------------------------------------------------------------- */
38
Sample Programs
1063

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents