Programming Examples
12
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
823
private static VisaComInstrument myScope;
public static void Main(string[] args)
{
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.
The commands in the extras function are
* 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.
Most of the following initialization
* commands are initialized by *RST.
It is not necessary to
* reinitialize them unless the default setting is not suitable
* for your application.
*/
myScope.DoCommand("*RST");
// Reset the to the defaults.
Содержание InfiniiVision 7000A Series
Страница 1: ...Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide...
Страница 34: ...34 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 1 What s New...
Страница 44: ...44 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 2 Setting Up...
Страница 58: ...58 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 3 Getting Started...
Страница 652: ...652 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 5 Commands by Subsystem...
Страница 750: ...750 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 8 Error Messages...
Страница 784: ...784 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 10 Synchronizing Acquisitions...
Страница 810: ...810 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 11 More About Oscilloscope Commands...
Страница 922: ...922 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide Index...