Agilent Technologies InfiniiVision 2000 X-Series Programmer's Manual page 908

Oscilloscopes
Hide thumbs Also See for InfiniiVision 2000 X-Series:
Table of Contents

Advertisement

38
Programming Examples
908
Console.WriteLine()
myScope = New AgInfiniiVision2000X(strScopeAddress)
myScope.Transport.DefaultTimeout.[Set](10000)
' Initialize - start from a known state.
Initialize()
' Capture data.
Capture()
' Analyze the captured waveform.
Analyze()
Console.WriteLine("Press any key to exit")
Console.ReadKey()
Catch err As System.ApplicationException
Console.WriteLine("*** SCPI.NET Error : " & err.Message)
Catch err As System.SystemException
Console.WriteLine("*** System Error Message : " & err.Message)
Catch err As System.Exception
System.Diagnostics.Debug.Fail("Unexpected Error")
Console.WriteLine("*** Unexpected Error : " & err.Message)
'myScope.Dispose();
Finally
End Try
End Sub
' Initialize the oscilloscope to a known state.
' --------------------------------------------------------------
Private Shared Sub Initialize()
Dim strResults As String
' Get and display the device's *IDN? string.
myScope.SCPI.IDN.Query(strResults)
Console.WriteLine("*IDN? result is: {0}", strResults)
' Clear status and load the default setup.
myScope.SCPI.CLS.Command()
myScope.SCPI.RST.Command()
End Sub
' Capture the waveform.
' --------------------------------------------------------------
Private Shared Sub Capture()
Dim strResults As String
Dim fResult As Double
' Use auto-scale to automatically configure oscilloscope.
myScope.SCPI.AUToscale.Command(Nothing, Nothing, Nothing, _
' Set trigger mode.
myScope.SCPI.TRIGger.MODE.Command("EDGE")
myScope.SCPI.TRIGger.MODE.Query(strResults)
Agilent InfiniiVision 2000 X-Series Oscilloscopes Programmer's Guide
Nothing, Nothing)

Advertisement

Table of Contents
loading

Table of Contents