Technical data

Sample Programs 35
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference 1057
Namespace Infiniium
Class ScpiNetInstrumentApp
Private Shared myScope As AgInfiniium90000
Public Shared Sub Main(ByVal args As String())
Try
Dim strScopeAddress As String
'strScopeAddress = "labi-trex-lp11.cos.agilent.com";
strScopeAddress = _
"TCPIP0::labi-trex-lp11.cos.agilent.com::inst0::INSTR"
Console.WriteLine("Connecting to oscilloscope...")
Console.WriteLine()
myScope = New AgInfiniium90000(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.
' --------------------------------------------------------------