Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1108

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

Advertisement

39
Programming Examples
);
1108
myScope = new
VisaComInstrument("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 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;
// Get and display the device's *IDN? string.
strResults = myScope.DoQueryString("*IDN?");
Console.WriteLine("*IDN? result is: {0}", strResults);
// Clear status and load the default setup.
myScope.DoCommand("*CLS");
myScope.DoCommand("*RST");
}
/*
* Capture the waveform.
* --------------------------------------------------------------
*/
private static void Capture()
{
// Use auto-scale to automatically configure oscilloscope.
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents