Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1032

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

38
Sample Programs
1032
VisaComInstrument("TCPIP0::130.29.71.191::inst0::INSTR");
myScope.SetTimeoutSeconds(10);
// Initialize - start from a known state.
Initialize();
// Capture data.
Capture();
// Analyze the captured waveform.
Analyze();
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
catch (System.ApplicationException err)
{
Console.WriteLine("*** VISA COM Error : " + err.Message);
}
catch (System.SystemException err)
{
Console.WriteLine("*** System Error Message : " + err.Message);
}
catch (System.Exception err)
{
System.Diagnostics.Debug.Fail("Unexpected Error");
Console.WriteLine("*** Unexpected Error : " + err.Message);
}
finally
{
myScope.Close();
}
}
/*
* Initialize the oscilloscope to a known state.
* --------------------------------------------------------------
*/
private static void Initialize()
{
string strResults;
// Clear status.
myScope.DoCommand("*CLS");
// Get and display the device's *IDN? string.
strResults = myScope.DoQueryString("*IDN?");
Console.WriteLine("*IDN? result is: {0}", strResults);
// Load the default setup.
myScope.DoCommand("*RST");
}
/*
* Capture the waveform.
* --------------------------------------------------------------
*/
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents