
Programming Examples
38
Agilent InfiniiVision 2000 X-Series Oscilloscopes Programmer's Guide
907
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
AgInfiniiVision2000X_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.AgInfiniiVision2000X_01_20
Namespace InfiniiVision
Class ScpiNetInstrumentApp
Private Shared myScope As AgInfiniiVision2000X
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...")
Содержание InfiniiVision 2000 X-Series
Страница 1: ...s1 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide...
Страница 24: ...24 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide...
Страница 38: ...38 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 1 What s New...
Страница 48: ...48 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 2 Setting Up...
Страница 62: ...62 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 3 Getting Started...
Страница 120: ...120 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 4 Commands Quick Reference...
Страница 206: ...206 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 8 BUS n Commands...
Страница 242: ...242 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 11 DEMO Commands...
Страница 250: ...250 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 12 DIGital d Commands...
Страница 270: ...270 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 14 DVM Commands...
Страница 276: ...276 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 15 EXTernal Trigger Commands...
Страница 312: ...312 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 17 HARDcopy Commands...
Страница 332: ...332 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 19 MARKer Commands...
Страница 416: ...416 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 22 POD Commands...
Страница 424: ...424 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 23 RECall Commands...
Страница 446: ...446 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 24 SAVE Commands...
Страница 588: ...588 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 28 TIMebase Commands...
Страница 692: ...692 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 31 WGEN Commands...
Страница 758: ...758 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 34 Error Messages...
Страница 788: ...788 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 36 Synchronizing Acquisitions...
Страница 918: ...918 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 38 Programming Examples...