Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 766

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

12
Programming Examples
4
5
6
For more information, see the VISA COM Help that comes with Agilent IO
Libraries Suite 15.
'
' Agilent VISA COM Example in Visual Basic .NET
' -------------------------------------------------------------------
' This program illustrates most of the commonly used programming
' features of your Agilent oscilloscopes.
' -------------------------------------------------------------------
Imports System
Imports System.IO
Imports System.Text
Imports Ivi.Visa.Interop
Imports System.Runtime.InteropServices
Namespace InfiniiVision
766
Edit the program to use the VISA address of your oscilloscope.
Add a reference to the VISA COM 3.0 Type Library:
Right- click the project you wish to modify (not the solution) in the
a
Solution Explorer window of the Microsoft Visual Studio
environment.
Choose Add Reference....
b
In the Add Reference dialog, select the COM tab.
c
Select VISA COM 3.0 Type Library; then click OK.
d
Right- click the project you wish to modify (not the solution) in the
e
Solution Explorer window of the Microsoft Visual Studio environment
and choose Properties; then, select
"InfiniiVision.VisaComInstrumentApp" as the Startup object.
Build and run the program.
Class VisaComInstrumentApp
Private Shared myScope As VisaComInstrument
Public Shared Sub Main(ByVal args As String())
Try
myScope = New _
VisaComInstrument("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
Console.WriteLine("*** VISA Error Message : " + err.Message)
The commands in the extras function are
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents