Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1042

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

38
Sample Programs
Imports System.Runtime.InteropServices
Namespace Infiniium
1042
Class VisaComInstrumentApp
Private Shared myScope As VisaComInstrument
Public Shared Sub Main(ByVal args As String())
Try
myScope = New
VisaComInstrument("TCPIP0::130.29.71.191::inst0::INSTR")
myScope.SetTimeoutSeconds(10)
' Initialize - start from a known state.
Initialize()
' Capture data.
Capture()
' Analyze the captured waveform.
Analyze()
Catch err As System.ApplicationException
Console.WriteLine("*** VISA Error Message : " + 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)
Finally
myScope.Close()
End Try
End Sub
' Initialize the oscilloscope to a known state.
' --------------------------------------------------------------
Private Shared Sub Initialize()
Dim strResults As String
' Clear status.
myScope.DoCommand("*CLS")
' Get and display the device's *IDN? string.
strResults = myScope.DoQueryString("*IDN?")
Console.WriteLine("*IDN? result is: {0}", strResults)
' Load the default setup.
myScope.DoCommand("*RST")
End Sub
' Capture the waveform.
' --------------------------------------------------------------
Private Shared Sub Capture()
' Set probe attenuation factor.
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
_

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents