Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1151

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

Advertisement

using System.Text;
namespace InfiniiVision
{
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
class VisaInstrumentApp
{
private static VisaInstrument myScope;
public static void Main(string[] args)
{
try
{
myScope = new
VisaInstrument("USB0::0x0957::0x17A6::US50210029::0::INSTR");
myScope.SetTimeoutSeconds(10);
// Initialize - start from a known state.
Initialize();
// Capture data.
Capture();
// Analyze the captured waveform.
Analyze();
}
catch (System.ApplicationException err)
{
Console.WriteLine("*** VISA Error Message : " + 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()
{
StringBuilder strResults;
// Get and display the device's *IDN? string.
strResults = myScope.DoQueryString("*IDN?");
Console.WriteLine("*IDN? result is: {0}", strResults);
Programming Examples
1151
39

Advertisement

Table of Contents
loading

Table of Contents