Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1153

X-series
Hide thumbs Also See for InfiniiVision 3000:
Table of Contents

Advertisement

).
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
myScope.DoQueryString(":CHANnel1:OFFSet?"));
// Set horizontal scale and position.
myScope.DoCommand(":TIMebase:SCALe 0.0002");
Console.WriteLine("Timebase scale: {0}",
myScope.DoQueryString(":TIMebase:SCALe?"));
myScope.DoCommand(":TIMebase:POSition 0.0");
Console.WriteLine("Timebase position: {0}",
myScope.DoQueryString(":TIMebase:POSition?"));
// Set the acquisition type (NORMal, PEAK, AVERage, or HRESolution
myScope.DoCommand(":ACQuire:TYPE NORMal");
Console.WriteLine("Acquire type: {0}",
myScope.DoQueryString(":ACQuire:TYPE?"));
// Or, configure by loading a previously saved setup.
byte[] DataArray;
int nBytesWritten;
// Read setup string from file.
strPath = "c:\\scope\\config\\setup.stp";
DataArray = File.ReadAllBytes(strPath);
// Restore setup string.
nBytesWritten = myScope.DoCommandIEEEBlock(":SYSTem:SETup",
DataArray);
Console.WriteLine("Setup bytes restored: {0}", nBytesWritten);
// Capture an acquisition using :DIGitize.
myScope.DoCommand(":DIGitize CHANnel1");
}
/*
* Analyze the captured waveform.
* --------------------------------------------------------------
*/
private static void Analyze()
{
byte[] ResultsArray;
int nLength;
// Number of bytes returned from instrument.
string strPath;
// Make a couple of measurements.
// -----------------------------------------------------------
myScope.DoCommand(":MEASure:SOURce CHANnel1");
Console.WriteLine("Measure source: {0}",
myScope.DoQueryString(":MEASure:SOURce?"));
double fResult;
myScope.DoCommand(":MEASure:FREQuency");
fResult = myScope.DoQueryNumber(":MEASure:FREQuency?");
Console.WriteLine("Frequency: {0:F4} kHz", fResult / 1000);
myScope.DoCommand(":MEASure:VAMPlitude");
fResult = myScope.DoQueryNumber(":MEASure:VAMPlitude?");
// Results array.
Programming Examples
1153
39

Advertisement

Table of Contents
loading

Table of Contents