Programming Examples
39
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
1205
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
AgInfiniiVision3000X_01_20.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
"InfiniiVision.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 Agilent.CommandExpert.ScpiNet.AgInfiniiVision3000X_01_20
Namespace InfiniiVision
Class ScpiNetInstrumentApp
Private Shared myScope As AgInfiniiVision3000X
Public Shared Sub Main(ByVal args As String())
Try
Dim strScopeAddress As String
'strScopeAddress = "a-mx3054a-60028.cos.agilent.com";
strScopeAddress = _
"TCPIP0::a-mx3054a-60028.cos.agilent.com::inst0::INSTR"
Console.WriteLine("Connecting to oscilloscope...")
Summary of Contents for InfiniiVision 3000 X-Series
Page 1: ...s1 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide...
Page 30: ...30 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide...
Page 54: ...54 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 68: ...68 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 218: ...218 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 6 Root Commands...
Page 242: ...242 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 8 BUS n Commands...
Page 280: ...280 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 11 DEMO Commands...
Page 288: ...288 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 12 DIGital d Commands...
Page 340: ...340 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 15 FUNCtion Commands...
Page 358: ...358 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 16 HARDcopy Commands...
Page 378: ...378 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 18 MARKer Commands...
Page 446: ...446 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 19 MEASure Commands...
Page 564: ...564 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 23 POWer Commands...
Page 842: ...842 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 29 TIMebase Commands...
Page 1054: ...1054 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 35 Error Messages...
Page 1076: ...1076 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 36 Status Reporting...
Page 1232: ...1232 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide Index...