Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1091

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

Advertisement

'
' Agilent VISA Example in Visual Basic .NET
' -------------------------------------------------------------------
' This program illustrates a few commonly-used programming
' features of your Agilent Infiniium Series oscilloscope.
' -------------------------------------------------------------------
Imports System
Imports System.IO
Imports System.Text
Namespace Infiniium
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
Class VisaInstrumentApp
Private Shared myScope As VisaInstrument
Public Shared Sub Main(ByVal args As String())
Try
myScope = _
New VisaInstrument("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
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 StringBuilder
' 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.
38
Sample Programs
1091

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents