Opening The Oscilloscope Connection Via The Io Library; Initializing The Interface And The Oscilloscope; Getting Started - Agilent Technologies InfiniiVision 5000 Series Programmer's Manual

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

3
To reference the Agilent VISA COM library in Microsoft Visual Basic 6.0:
1
2
3

Opening the Oscilloscope Connection via the IO Library

PC controllers communicate with the oscilloscope by sending and receiving
messages over a remote interface. Once you have opened a connection to
the oscilloscope over the remote interface, programming instructions
normally appear as ASCII character strings embedded inside write
statements of the programing language. Read statements are used to read
query responses from the oscilloscope.
For example, when using the Agilent VISA COM library in Visual Basic
(after opening the connection to the instrument using the
ResourceManager object's Open method), the FormattedIO488 object's
WriteString, WriteNumber, WriteList, or WriteIEEEBlock methods are used
for sending commands and queries. After a query is sent, the response is
read using the ReadString, ReadNumber, ReadList, or ReadIEEEBlock
methods.
The following Visual Basic statements open the connection and send a
command that turns on the oscilloscope's label display.
Dim myMgr As VisaComLib.ResourceManager
Dim myScope As VisaComLib.FormattedIO488
Set myMgr = New VisaComLib.ResourceManager
Set myScope = New VisaComLib.FormattedIO488
' Open the connection to the oscilloscope. Get the VISA Address from the
' Agilent Connection Expert (installed with Agilent IO Libraries Suite).
Set myScope.IO = myMgr.Open("<VISA Address>")
' Send a command.
myScope.WriteString ":DISPlay:LABel ON"
The ":DISPLAY:LABEL ON" in the above example is called a program
message. Program messages are explained in more detail in
Message Syntax"

Initializing the Interface and the Oscilloscope

To make sure the bus and all appropriate interfaces are in a known state,
begin every program with an initialization statement. When using the
Agilent VISA COM library, you can use the resource session object's Clear
method to clears the interface buffer:
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
Click OK.
Choose Project>References... from the main menu.
In the References dialog, check the "VISA COM 3.0 Type Library".
Click OK.
on page 659.
3

Getting Started

"Program
45

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents