20 Agilent 6000 Series Oscilloscopes Programmer’s Quick Start Guide
2Getting Started
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:
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>")
' Clear the interface buffer.
myScope.IO.Clear
When you are using GPIB, CLEAR also resets the oscilloscope’s parser. The
parser is the program which reads in the instructions which you send it.
After clearing the interface, initialize the instrument to a preset state:
myScope.WriteString “*RST"
Using :AUToscale to Automate Oscilloscope Setup
The :AUToscale command performs a very useful function for unknown
waveforms by setting up the vertical channel, time base, and trigger level of
the instrument.
The syntax for the autoscale command is:
myScope.WriteString “:AUTOSCALE"
NOTE Information for Initializing the Instrument
The actual commands and syntax for initializing the instrument are discussed in the
common commands section of the online Programmer’s Reference.
Refer to the Agilent IO Libraries Suite documentation for information on initializing the
interface.