Programming Examples
40
Keysight InfiniiVision M9241/42/43A PXIe Oscilloscopes SCPI Programmer's Guide
1491
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\Keysight\Command
Expert\ScpiNetDrivers
•
Windows 7: C:\ProgramData\Keysight\Command Expert\ScpiNetDrivers
d
Select the .dll file for your oscilloscope, for example
AgInfiniiVision3000X_02_00.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 Keysight
Command Expert.
'
' Keysight SCPI.NET Example in Visual Basic .NET
' -------------------------------------------------------------------
' This program illustrates a few commonly used programming
' features of your Keysight oscilloscope.
' -------------------------------------------------------------------
Imports System
Imports System.IO
Imports System.Text
Imports Keysight.CommandExpert.ScpiNet.AgInfiniiVision3000X_02_00
Namespace InfiniiVision
Class ScpiNetInstrumentApp
Private Shared myScope As AgInfiniiVision3000X
Public Shared Sub Main(ByVal args As String())
Try
Dim strScopeAddress As String
strScopeAddress = _
"TCPIP0::10.112.94.136::hislip9-0.0::INSTR"
Console.WriteLine("Connecting to oscilloscope...")
Console.WriteLine()
myScope = New AgInfiniiVision3000X(strScopeAddress)
myScope.Transport.DefaultTimeout.[Set](10000)
' Initialize - start from a known state.
Initialize()
' Capture data.