Technical data
1056 Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
35 Sample Programs
SCPI.NET Example in Visual Basic .NET
To compile and run this example in Microsoft Visual Studio 2008:
1 Install the Agilent Command Expert software and the command set for
the oscilloscope.
2 Open Visual Studio.
3 Create a new Visual Basic, Windows, Console Application project.
4 Cut- and- paste the code that follows into the Visual Basic .NET source
file.
5 Edit the program to use the VISA address of your oscilloscope.
6 Add a reference to the SCPI.NET 3.0 driver:
a Right- click the project you wish to modify (not the solution) in the
Solution Explorer window of the Microsoft Visual Studio
environment.
b Choose Add Reference....
c In the Add Reference dialog, select the Browse tab, and navigate to
the ScpiNetDrivers folder.
• Windows XP: C:\Documents and Settings\All Users\Agilent\
Command Expert\ScpiNetDrivers
• Windows 7: C:\ProgramData\Agilent\Command Expert\
ScpiNetDrivers
d Select the .dll file for your oscilloscope, for example
AgInfiniium90000_1_10.dll; then, click OK.
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 "Infiniium.ScpiNetInstrumentApp"
as the Startup object.
7 Build and run the program.
For more information, see the SCPI.NET driver help that comes with
Agilent Command Expert.
'
' Agilent SCPI.NET 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 System.Collections.Generic
Imports Agilent.CommandExpert.ScpiNet.AgInfiniium90000_3_10










