Technical data

Table Of Contents
Sample Programs 38
Agilent Infiniium 9000 Series Oscilloscopes Programmer's Reference 1291
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 Ag9000A_3_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.Ag9000A_3_10
Namespace Infiniium
Class ScpiNetInstrumentApp
Private Shared myScope As Ag9000A
Public Shared Sub Main(ByVal args As String())
Try
Dim strScopeAddress As String
'strScopeAddress = "agilent-d9c8a49.cos.agilent.com";
strScopeAddress = _
"TCPIP0::agilent-d9c8a49.cos.agilent.com::inst0::INSTR"
Console.WriteLine("Connecting to oscilloscope...")
Console.WriteLine()
myScope = New Ag9000A(strScopeAddress)
myScope.Transport.DefaultTimeout.[Set](10000)