Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 723

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
*/
Console.WriteLine("Transferring screen image to " +
"c:\\scope\\data\\screen.png");
if (File.Exists("c:\\scope\\data\\screen.png"))
File.Delete("c:\\scope\\data\\screen.png");
// Increase I/O timeout to fifteen seconds.
oscp.SetTimeoutSeconds(15);
// Get the screen data in PNG format.
nLength = oscp.DoQueryIEEEBlock(
":DISPlay:DATA? PNG, SCReen, COLor", out ResultsArray);
Console.WriteLine("Read screen image ({0} bytes).", nLength);
// Store the screen data in a file.
File.WriteAllBytes("c:\\scope\\data\\screen.png",
ResultsArray);
Console.WriteLine("Wrote screen image ({0} bytes) to file.",
nLength);
// Return I/O timeout to five seconds.
oscp.SetTimeoutSeconds(5);
/* MEASURE - The commands in the MEASURE subsystem are used to
* make measurements on displayed waveforms.
*/
// Set source to measure.
oscp.DoCommand(":MEASure:SOURce CHANnel1");
// Query for frequency.
double fResults;
fResults = oscp.DoQueryValue(":MEASure:FREQuency?");
Console.WriteLine("The frequency is: {0:F4} kHz",
fResults / 1000);
// Query for peak to peak voltage.
fResults = oscp.DoQueryValue(":MEASure:VPP?");
Console.WriteLine("The peak to peak voltage is: {0:F2} V",
fResults);
/* WAVEFORM_DATA - Get waveform data from oscilloscope. To
* obtain waveform data, you must specify the WAVEFORM
* parameters for the waveform data prior to sending the
* ":WAVEFORM:DATA?" query.
*
* Once these parameters have been sent, the
* ":WAVEFORM:PREAMBLE?" query provides information concerning
* the vertical and horizontal scaling of the waveform data.
*
* With the preamble information you can then use the
* ":WAVEFORM:DATA?" query and read the data block in the
* correct format.
*/
/* WAVE_FORMAT - Sets the data transmission mode for waveform
* data output.
This command controls how the data is
Programming Examples
723
12

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents