Technical data

Sample Programs 35
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference 1053
// Store the screen data to a file.
string strPath;
strPath = "c:\\scope\\data\\screen.png";
FileStream fStream = File.Open(strPath, FileMode.Create);
fStream.Write(byteResultsArray, 0, nLength);
fStream.Close();
Console.WriteLine("Screen image ({0} bytes) written to {1}",
nLength, strPath);
// Download waveform data.
// -----------------------------------------------------------
// Get the waveform points mode.
myScope.SCPI.WAVeform.TYPE.Query(out strResults);
Console.WriteLine("Waveform points mode: {0}", strResults);
// Get the number of waveform points.
int nPointsAvail;
myScope.SCPI.WAVeform.POINts.Query(out nPointsAvail);
Console.WriteLine("Waveform points: {0}", nPointsAvail);
// Set the waveform source.
myScope.SCPI.WAVeform.SOURce.Command("CHANnel1");
myScope.SCPI.WAVeform.SOURce.Query(out strResults);
Console.WriteLine("Waveform source: {0}", strResults);
// Choose the format of the data returned:
myScope.SCPI.WAVeform.FORMat.Command("WORD");
myScope.SCPI.WAVeform.FORMat.Query(out strResults);
Console.WriteLine("Waveform format: {0}", strResults);
myScope.SCPI.WAVeform.BYTeorder.Command("LSBFirst");
myScope.SCPI.WAVeform.BYTeorder.Query(out strResults);
Console.WriteLine("Waveform byte order: {0}", strResults);
// Display the waveform settings from preamble:
Dictionary<string, string> dctWavFormat =
new Dictionary<string, string>()
{
{"0", "ASCii"},
{"1", "BYTE"},
{"2", "WORD"},
{"3", "LONG"},
{"4", "LONGLONG"},
};
Dictionary<string, string> dctAcqType =
new Dictionary<string, string>()
{
{"1", "RAW"},
{"2", "AVERage"},
{"3", "VHIStogram"},
{"4", "HHIStogram"},
{"6", "INTerpolate"},
{"10", "PDETect"},
};
Dictionary<string, string> dctAcqMode =