Visa Com Examples; Visa Com Example In Visual Basic - Agilent Technologies Infiniium 90000 Series Programmer's Manual

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

38
Sample Programs

VISA COM Examples

VISA COM Example in Visual Basic

To run this example in Visual Basic for Applications (VBA):
1
2
3
4
5
6
7
'
' Agilent VISA COM Example in Visual Basic
' -------------------------------------------------------------------
' This program illustrates a few commonly-used programming
' features of your Agilent Infiniium Series oscilloscope.
' -------------------------------------------------------------------
Option Explicit
Public myMgr As VisaComLib.ResourceManager
Public myScope As VisaComLib.FormattedIO488
Public varQueryResult As Variant
Public strQueryResult As String
' For Sleep subroutine.
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'
' Main Program
' -------------------------------------------------------------------
1020
"VISA COM Example in Visual Basic"
"VISA COM Example in C#"
"VISA COM Example in Visual Basic .NET"
"VISA COM Example in Python"
Start the application that provides Visual Basic for Applications (for
example, Microsoft Excel).
Press ALT+F11 to launch the Visual Basic editor.
Reference the Agilent VISA COM library:
Choose Tools>References... from the main menu.
a
In the References dialog, check:
b
VISA COM 3.0 Type Library
Microsoft Scripting Runtime
Click OK.
c
Choose Insert>Module.
Cut- and- paste the code that follows into the editor.
Edit the program to use the VISA address of your oscilloscope, and save
the changes.
Run the program.
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
on page 1020
on page 1031
on page 1041
on page 1051

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents