Agilent Technologies 2000 X-Series Wartungshandbuch Seite 853

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 930
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 852
Programming Examples 38
Agilent InfiniiVision 2000 X-Series Oscilloscopes Programmer's Guide 853
using System.Text;
namespace InfiniiVision
{
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);
Seitenansicht 852
1 2 ... 848 849 850 851 852 853 854 855 856 857 858 ... 929 930

Kommentare zu diesen Handbüchern

Keine Kommentare