Keysight Technologies InfiniiVision MSO-X 4022A Programmer's Manual page 1475

Hide thumbs Also See for InfiniiVision MSO-X 4022A:
Table of Contents

Advertisement

/* Analyze the captured waveform.
* --------------------------------------------------------------- */
void analyze (void)
{
Keysight InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide
double wav_format;
double acq_type;
double wav_points;
double avg_count;
double x_increment;
double x_origin;
double x_reference;
double y_increment;
double y_origin;
double y_reference;
FILE *fp;
int num_bytes;
/* Number of bytes returned from instrument. */
int i;
/* Make a couple of 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.
* ------------------------------------------------------------- */
do_command(":HARDcopy:INKSaver OFF");
/* Read screen image. */
num_bytes = do_query_ieeeblock(":DISPlay:DATA? PNG, COLor");
printf("Screen image bytes: %d\n", num_bytes);
/* Write screen image bytes to file. */
fp = fopen ("c:\\scope\\data\\screen.png", "wb");
num_bytes = fwrite(ieeeblock_data, sizeof(unsigned char), num_bytes,
fp);
fclose (fp);
printf("Wrote screen image (%d bytes) to ", num_bytes);
printf("c:\\scope\\data\\screen.png.\n");
/* Download waveform data.
* ------------------------------------------------------------- */
/* Set the waveform points mode. */
do_command(":WAVeform:POINts:MODE RAW");
do_query_string(":WAVeform:POINts:MODE?");
printf("Waveform points mode: %s\n", str_result);
42
Programming Examples
1475

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the InfiniiVision MSO-X 4022A and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Infiniivision 4000 x seriesInfiniivision mso-x 4032aInfiniivision mso-x 4034aInfiniivision mso-x 4054aInfiniivision mso-x 4104aInfiniivision mso-x 4154a ... Show all

Table of Contents