1372
Keysight InfiniiVision 3000T X-Series Oscilloscopes Programmer's Guide
42
Programming Examples
{
printf("Acquire type: HRESolution\n");
}
wav_points = dbl_results[2];
printf("Waveform points: %e\n", wav_points);
avg_count = dbl_results[3];
printf("Waveform average count: %e\n", avg_count);
x_increment = dbl_results[4];
printf("Waveform X increment: %e\n", x_increment);
x_origin = dbl_results[5];
printf("Waveform X origin: %e\n", x_origin);
x_reference = dbl_results[6];
printf("Waveform X reference: %e\n", x_reference);
y_increment = dbl_results[7];
printf("Waveform Y increment: %e\n", y_increment);
y_origin = dbl_results[8];
printf("Waveform Y origin: %e\n", y_origin);
y_reference = dbl_results[9];
printf("Waveform Y reference: %e\n", y_reference);
/* Read waveform data. */
num_bytes = do_query_ieeeblock(":WAVeform:DATA?");
printf("Number of data values: %d\n", num_bytes);
/* Open file for output. */
fp = fopen("c:\\scope\\data\\waveform_data.csv", "wb");
/* Output waveform data in CSV format. */
for (i = 0; i < num_bytes - 1; i++)
{
/* Write time value, voltage value. */
fprintf(fp, "%9f, %6f\n",
x_ ((float)i * x_increment),
(((float)ieeeblock_data[i] - y_reference) * y_increment)
+ y_origin);
}
/* Close output file. */
fclose(fp);
printf("Waveform format BYTE data written to ");
printf("c:\\scope\\data\\waveform_data.csv.\n");
}
/* Send a command to the instrument.
* --------------------------------------------------------------- */
void do_command(command)
char *command;
{
char message[80];
Summary of Contents for InfiniiVision 3000T X Series
Page 1: ...Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide...
Page 40: ...40 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 1 What s New...
Page 50: ...50 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 64: ...64 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 254: ...254 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 8 BUS n Commands...
Page 306: ...306 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 12 DEMO Commands...
Page 364: ...364 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 17 FFT Commands...
Page 442: ...442 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 21 MARKer Commands...
Page 524: ...524 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 22 MEASure Commands...
Page 656: ...656 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 26 POWer Commands...
Page 666: ...666 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 27 RECall Commands...
Page 888: ...888 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 29 SBUS n Commands...
Page 978: ...978 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 30 SEARch Commands...
Page 1240: ...1240 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 38 Error Messages...