EasyManuals Logo

Agilent Technologies InfiniiVision 5000 Series Programmer's Guide

Agilent Technologies InfiniiVision 5000 Series
788 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #759 background imageLoading...
Page #759 background image
Programming Examples 12
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide 759
DataArray = File.ReadAllBytes("c:\\scope\\config\\setup.dat");
Console.WriteLine("Read setup string ({0} bytes) from file.",
DataArray.Length);
// Restore setup string.
myScope.DoCommandIEEEBlock(":SYSTem:SETup", DataArray);
Console.WriteLine("Restored setup string.");
/* IMAGE_TRANSFER - In this example, we query for the screen
* data with the ":DISPLAY:DATA?" query. The .png format
* data is saved to a file in the local file system.
*/
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.
myScope.SetTimeoutSeconds(15);
// Get the screen data in PNG format.
ResultsArray = myScope.DoQueryIEEEBlock(
":DISPlay:DATA? PNG, SCReen, COLor");
nBytes = ResultsArray.Length;
Console.WriteLine("Read screen image ({0} bytes).", nBytes);
// Store the screen data in a file.
File.WriteAllBytes("c:\\scope\\data\\screen.png",
ResultsArray);
Console.WriteLine("Wrote screen image ({0} bytes) to file.",
nBytes);
// Return I/O timeout to five seconds.
myScope.SetTimeoutSeconds(5);
/* MEASURE - The commands in the MEASURE subsystem are used to
* make measurements on displayed waveforms.
*/
// Set source to measure.
myScope.DoCommand(":MEASure:SOURce CHANnel1");
// Query for frequency.
double fResults;
fResults = myScope.DoQueryValue(":MEASure:FREQuency?");
Console.WriteLine("The frequency is: {0:F4} kHz",
fResults / 1000);
// Query for peak to peak voltage.
fResults = myScope.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.

Table of Contents

Other manuals for Agilent Technologies InfiniiVision 5000 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies InfiniiVision 5000 Series and is the answer not in the manual?

Agilent Technologies InfiniiVision 5000 Series Specifications

General IconGeneral
BrandAgilent Technologies
ModelInfiniiVision 5000 Series
CategoryTest Equipment
LanguageEnglish

Related product manuals