Visa Com Example In Visual Basic .Net - Agilent Technologies InfiniiVision 3000 Programmer's Manual

X-series
Hide thumbs Also See for InfiniiVision 3000:
Table of Contents

Advertisement

39
Programming Examples
}

VISA COM Example in Visual Basic .NET

To compile and run this example in Microsoft Visual Studio 2008:
1
2
3
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 a few commonly used programming
' features of your Agilent oscilloscope.
' -------------------------------------------------------------------
Imports System
Imports System.IO
Imports System.Text
Imports Ivi.Visa.Interop
Imports System.Runtime.InteropServices
Namespace InfiniiVision
1116
}
catch { }
}
}
Open Visual Studio.
Create a new Visual Basic, Windows, Console Application project.
Cut- and- paste the code that follows into the C# source file.
Edit the program to use the VISA address of your oscilloscope.
Add a reference to the VISA COM 3.0 Type Library:
a
Right- click the project you wish to modify (not the solution) in the
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
e
Right- click the project you wish to modify (not the solution) in the
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
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents