
812
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
12
Programming Examples
VISA COM Examples
•
"VISA COM Example in Visual Basic"
•
•
"VISA COM Example in Visual Basic .NET"
VISA COM Example in Visual Basic
To run this example in Visual Basic for Applications (VBA):
1
Start the application that provides Visual Basic for Applications (for
example, Microsoft Excel).
2
Press ALT+F11 to launch the Visual Basic editor.
3
Reference the Agilent VISA COM library:
a
Choose
Tools>References...
from the main menu.
b
In the References dialog, check the "VISA COM 3.0 Type Library".
c
Click
OK
.
4
Choose
Insert>Module
.
5
Cut- and- paste the code that follows into the editor.
6
Edit the program to use the VISA address of your oscilloscope, and save
the changes.
7
Run the program.
'
' Agilent VISA COM Example in Visual Basic
' -------------------------------------------------------------------
' This program illustrates most of the commonly used programming
' features of your Agilent oscilloscopes.
' -------------------------------------------------------------------
Option Explicit
Public myMgr As VisaComLib.ResourceManager
Public myScope As VisaComLib.FormattedIO488
Public varQueryResult As Variant
Public strQueryResult As String
'
' MAIN PROGRAM
' -------------------------------------------------------------------
' This example shows the fundamental parts of a program (initialize,
' capture, analyze).
'
' The commands sent to the oscilloscope are written in both long and
' short form.
Both forms are acceptable.
'
' The input signal is the probe compensation signal from the front
' panel of the oscilloscope connected to channel 1.
Summary of Contents for InfiniiVision 7000A Series
Page 1: ...Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide...
Page 34: ...34 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 1 What s New...
Page 44: ...44 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 58: ...58 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 750: ...750 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 8 Error Messages...
Page 922: ...922 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide Index...