Agilent Technologies InfiniiVision 7000A Series Programmer's Manual page 878

Table of Contents

Advertisement

12
Programming Examples
6
For more information, see the tutorial on using VISA in Microsoft .NET in
the VISA Help that comes with Agilent IO Libraries Suite 15.
'
' Agilent VISA Example in Visual Basic .NET
' -------------------------------------------------------------------
' This program illustrates most of the commonly-used programming
' features of your Agilent oscilloscope.
' -------------------------------------------------------------------
Imports System
Imports System.IO
Imports System.Text
Namespace InfiniiVision
878
Build and run the program.
Class VisaInstrumentApp
Private Shared oscp As VisaInstrument
Public Shared Sub Main(ByVal args As String())
Try
oscp = _
New VisaInstrument("USB0::2391::5957::MY47250010::0::INSTR")
Initialize()
' The extras function contains miscellaneous commands that
' do not need to be executed for the proper operation of
' this example.
' shown for reference purposes only.
' Extra()
' Uncomment to execute the extra function.
Capture()
Analyze()
Catch err As System.ApplicationException
MsgBox("*** Error : " & err.Message, vbExclamation, _
"VISA Error Message")
Exit Sub
Catch err As System.SystemException
MsgBox("*** Error : " & err.Message, vbExclamation, _
"System Error Message")
Exit Sub
Catch err As System.Exception
Debug.Fail("Unexpected Error")
MsgBox("*** Error : " & err.Message, vbExclamation, _
"Unexpected Error")
Exit Sub
Finally
oscp.Close()
End Try
End Sub
' Initialize()
' --------------------------------------------------------------
' This function initializes both the interface and the
' oscilloscope to a known state.
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
The commands in the extras function are

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents