1154
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
39
Programming Examples
Console.WriteLine("Vertial amplitude: {0:F2} V", fResult);
// Download the screen image.
// -----------------------------------------------------------
myScope.DoCommand(":HARDcopy:INKSaver OFF");
// Get the screen data.
nLength = myScope.DoQueryIEEEBlock(":DISPlay:DATA? PNG, COLor",
out ResultsArray);
// Store the screen data to a file.
strPath = "c:\\scope\\data\\screen.png";
FileStream fStream = File.Open(strPath, FileMode.Create);
fStream.Write(ResultsArray, 0, nLength);
fStream.Close();
Console.WriteLine("Screen image ({0} bytes) written to {1}",
nLength, strPath);
// Download waveform data.
// -----------------------------------------------------------
// Set the waveform points mode.
myScope.DoCommand(":WAVeform:POINts:MODE RAW");
Console.WriteLine("Waveform points mode: {0}",
myScope.DoQueryString(":WAVeform:POINts:MODE?"));
// Get the number of waveform points available.
myScope.DoCommand(":WAVeform:POINts 10240");
Console.WriteLine("Waveform points available: {0}",
myScope.DoQueryString(":WAVeform:POINts?"));
// Set the waveform source.
myScope.DoCommand(":WAVeform:SOURce CHANnel1");
Console.WriteLine("Waveform source: {0}",
myScope.DoQueryString(":WAVeform:SOURce?"));
// Choose the format of the data returned (WORD, BYTE, ASCII):
myScope.DoCommand(":WAVeform:FORMat BYTE");
Console.WriteLine("Waveform format: {0}",
myScope.DoQueryString(":WAVeform:FORMat?"));
// Display the waveform settings:
double[] fResultsArray;
fResultsArray = myScope.DoQueryNumbers(":WAVeform:PREamble?");
double fFormat = fResultsArray[0];
if (fFormat == 0.0)
{
Console.WriteLine("Waveform format: BYTE");
}
else if (fFormat == 1.0)
{
Console.WriteLine("Waveform format: WORD");
}
else if (fFormat == 2.0)
{
Console.WriteLine("Waveform format: ASCii");
Summary of Contents for InfiniiVision 3000 X-Series
Page 1: ...s1 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide...
Page 30: ...30 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide...
Page 54: ...54 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 68: ...68 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 218: ...218 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 6 Root Commands...
Page 242: ...242 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 8 BUS n Commands...
Page 280: ...280 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 11 DEMO Commands...
Page 288: ...288 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 12 DIGital d Commands...
Page 340: ...340 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 15 FUNCtion Commands...
Page 358: ...358 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 16 HARDcopy Commands...
Page 378: ...378 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 18 MARKer Commands...
Page 446: ...446 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 19 MEASure Commands...
Page 564: ...564 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 23 POWer Commands...
Page 842: ...842 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 29 TIMebase Commands...
Page 1054: ...1054 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 35 Error Messages...
Page 1076: ...1076 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 36 Status Reporting...
Page 1232: ...1232 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide Index...