Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 755

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
{
try
{
myScope = new
VisaComInstrument("USB0::2391::5957::MY47250010::0::INSTR");
Initialize();
/* The extras function contains miscellaneous commands that
* do not need to be executed for the proper operation of
* this example.
* shown for reference purposes only.
*/
// Extra();
// Uncomment to execute the extra function.
Capture();
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()
* --------------------------------------------------------------
* This function initializes both the interface and the
* oscilloscope to a known state.
*/
private static void Initialize()
{
string strResults;
/* RESET - This command puts the oscilloscope into a known
* state.
This statement is very important for programs to
* work as expected.
* commands are initialized by *RST.
* reinitialize them unless the default setting is not suitable
* for your application.
*/
myScope.DoCommand("*RST");
myScope.DoCommand("*CLS");
/* IDN - Ask for the device's *IDN string.
The commands in the extras function are
Most of the following initialization
It is not necessary to
// Reset the to the defaults.
// Clear the status data structures.
Programming Examples
755
12

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents