No part of this manual may be reproduced
in any form or by any means (including
electronic storage and retrieval or translation into a foreign language) without prior
agreement and written consent from Agilent Technologies, Inc. as governed by
United States and international copyright
laws.
Trademarks
Microsoft®, MS-DOS®, Windows®, Windows 2000®, and Windows XP® are U.S.
registered trademarks of Microsoft Corporation.
Adobe®, Acrobat®, and the Acrobat
Logo® are trademarks of Adobe Systems
Incorporated.
Manual Part Number
Version 02.10.0001
Edition
March 2, 2012
Available in electronic format only
Agilent Technologies, Inc.
1900 Garden of the Gods Road
Colorado Springs, CO 80907 USA
Warranty
The material contained in this document is provided “as is,” and is subject to being changed, without notice,
in future editions. Further, to the maximum extent permitted by applicable
law, Agilent disclaims all warranties,
either express or implied, with regard
to this manual and any information
contained herein, including but not
limited to the implied warranties of
merchantability and fitness for a particular purpose. Agilent shall not be
liable for errors or for incidental or
consequential damages in connection
with the furnishing, use, or performance of this document or of any
information contained herein. Should
Agilent and the user have a separate
written agreement with warranty
terms covering the material in this
document that conflict with these
terms, the warranty terms in the separate agreement shall control.
Technology Licenses
The hardware and/or software described in
this document are furnished under a
license and may be used or copied only in
accordance with the terms of such license.
Restricted Rights Legend
agency regulation or contract clause. Use,
duplication or disclosure of Software is
subject to Agilent Technologies’ standard
commercial license terms, and non-DOD
Departments and Agencies of the U.S. Government will receive no greater than
Restricted Rights as defined in FAR
52.227-19(c)(1-2) (June 1987). U.S. Government users will receive no greater than
Limited Rights as defined in FAR 52.227-14
(June 1987) or DFAR 252.227-7015 (b)(2)
(November 1995), as applicable in any
technical data.
Safety Notices
A CAUTION notice denotes a hazard. It calls attention to an operating procedure, practice, or the like
that, if not correctly performed or
adhered to, could result in damage
to the product or loss of important
data. Do not proceed beyond a
CAUTION notice until the indicated
conditions are fully understood and
met.
A WARNING notice denotes a
hazard. It calls attention to an
operating procedure, practice, or
the like that, if not correctly performed or adhered to, could result
in personal injury or death. Do not
proceed beyond a WARNING
notice until the indicated conditions are fully understood and met.
If software is for use in the performance of
a U.S. Government prime contract or subcontract, Software is delivered and
licensed as “Commercial computer software” as defined in DFAR 252.227-7014
(June 1995), or as a “commercial item” as
defined in FAR 2.101(a) or as “Restricted
computer software” as defined in FAR
52.227-19 (June 1987) or any equivalent
In This Book
This book is your guide to programming the 3000 X-Series oscilloscopes:
• Chapter 24, “:RECall Commands,” starting on page 565, describes
commands that recall previously saved oscilloscope setups, reference
waveforms, or masks.
• Chapter 25, “:SAVE Commands,” starting on page 573, describes
commands that save oscilloscope setups, screen images, and data.
• Chapter 26, “:SBUS<n> Commands,” starting on page 595, describes
commands that control oscilloscope functions associated with the serial
decode bus and serial triggering.
• Chapter 27, “:SEARch Commands,” starting on page 743, describes
commands that control oscilloscope functions associated with searching
for waveform events.
• Chapter 28, “:SYSTem Commands,” starting on page 817, describes
commands that control basic system functions of the oscilloscope.
• Chapter 29, “:TIMebase Commands,” starting on page 831, describes
commands that control all horizontal sweep functions.
• Chapter 30, “:TRIGger Commands,” starting on page 843, describes
commands that control the trigger modes and parameters for each
trigger type.
• Chapter 31, “:WAVeform Commands,” starting on page 923, describes
commands that provide access to waveform data.
• Chapter 32, “:WGEN Commands,” starting on page 959, describes
commands that control waveform generator (Option WGN) functions and
parameters.
• Chapter 33, “:WMEMory<r> Commands,” starting on page 985, describes
commands that control reference waveforms.
• Chapter 34, “Obsolete and Discontinued Commands,” starting on page
995, describes obsolete commands which still work but have been
replaced by newer commands and discontinued commands which are no
longer supported.
• Chapter 35, “Error Messages,” starting on page 1047, lists the
instrument error messages that can occur while programming the
oscilloscope.
The command descriptions in this reference show upper and lowercase
characters. For example, :AUToscale indicates that the entire command
name is :AUTOSCALE. The short form, :AUT, is also accepted by the
oscilloscope.
Then, there are chapters that describe programming topics and conceptual
information in more detail:
• Chapter 36, “Status Reporting,” starting on page 1055, describes the
oscilloscope's status registers and how to check the status of the
instrument.
• Chapter 37, “Synchronizing Acquisitions,” starting on page 1077,
describes how to wait for acquisitions to complete before querying
measurement results or performing other operations with the captured
data.
• Chapter 38, “More About Oscilloscope Commands,” starting on page
1087, contains additional information about oscilloscope programming
commands.
Finally, there is a chapter that contains programming examples:
• Chapter 39, “Programming Examples,” starting on page 1097.
Mixed-Signal
Oscilloscope
Channel
Differences
See Also• For more information on using the SICL, VISA, and VISA COM libraries
Because both the "analog channels only" oscilloscopes (DSO models) and
the mixed-signal oscilloscopes (MSO models) have analog channels, topics
that describe analog channels refer to all oscilloscope models. Whenever a
topic describes digital channels, that information applies only to the
mixed-signal oscilloscope models.
in general, see the documentation that comes with the Agilent IO
Libraries Suite.
• For information on controller PC interface configuration, see the
documentation for the interface card used (for example, the Agilent
82350B GPIB interface).
• For information on oscilloscope front-panel operation, see the User's
Guide.
• For detailed connectivity information, refer to the Agilent Technologies
USB/LAN/GPIB Connectivity Guide. For a printable electronic copy of
the Connectivity Guide, direct your Web browser to "www.agilent.com"
and search for "Connectivity Guide".
• For the latest versions of this and other manuals, see:
Referencing the IO Library58
Opening the Oscilloscope Connection via the IO Library59
Initializing the Interface and the Oscilloscope59
Using :AUToscale to Automate Oscilloscope Setup60
Using Other Oscilloscope Setup Commands60
Capturing Data with the :DIGitize Command61
Reading Query Responses from the Oscilloscope63
Reading Query Results into String Variables64
Reading Query Results into Numeric Variables64
Reading Definite-Length Block Query Response Data64
Sending Multiple Queries and Reading Results65
Checking Instrument Status66
Other Ways of Sending Commands67
Tel ne t Soc ke ts67
Sending SCPI Commands Using Browser Web Control67
Program Message Syntax 1089
Duplicate Mnemonics1093
Tree Traversal Rules and Multiple Commands1093
Query Return Values1095
All Oscilloscope Commands Are Sequential1096
39 Programming Examples
VISA COM Examples1098
VISA COM Example in Visual Basic1098
VISA COM Example in C#1107
VISA COM Example in Visual Basic .NET1116
VISA COM Example in Python for .NET or IronPython1124
Index
VISA Examples1131
VISA Example in C1131
VISA Example in Visual Basic1140
VISA Example in C#1150
VISA Example in Visual Basic .NET1161
VISA Example in Python1171
SICL Examples1178
SICL Example in C1178
SICL Example in Visual Basic1187
SCPI.NET Examples1198
SCPI.NET Example in C#1198
SCPI.NET Example in Visual Basic .NET1204
SCPI.NET Example in IronPython1210
What's New in Version 2.10 32
What's New in Version 2.00 33
What's New in Version 1.20 37
What's New in Version 1.10 39
Version 1.00 at Introduction 40
Command Differences From 7000B Series Oscilloscopes 41
s1
31
1What's New
What's New in Version 2.10
New features in version 2.10 of the InfiniiVision 3000 X-Series oscilloscope
software are:
• Support for adding an annotation to the display.
More detailed descriptions of the new and changed commands appear
below.
New Commands
CommandDescription
:DISPlay:ANNotation (see page 291)Turns screen annotation on or off.
:DISPlay:ANNotation:BACKground (see
page 292)
:DISPlay:ANNotation:COLor (see page 293)Specifies the color of the annotation.
:DISPlay:ANNotation:TEXT (see page 294)Specifies the annotation string, up to 254
Specifies the background of the annotation to
be either opaque, inverted, or transparent.
Sets the high-pass filter's -3 dB cutoff
frequency. Available with the
DSOX3ADVMATH advanced math license.
Sets the low-pass filter's -3 dB cutoff
frequency. Available with the
DSOX3ADVMATH advanced math license.
1What's New
CommandDescription
:FUNCtion:LINear:GAIN (see page 328)Specifies the 'A' value in the Ax + B operation.
Available with the DSOX3ADVMATH advanced
math license.
:FUNCtion:LINear:OFFSet (see page 329)Specifies the 'B' value in the Ax + B operation.
Available with the DSOX3ADVMATH advanced
math license.
:FUNCtion:TRENd:MEASurement (see
page 339)
:MEASure Power Commands (see page 447):MEASure commands available when the
:MEASure:STATistics:DISPlay (see page 424)Specifies whether the display of measurement
:POWer Commands (see page 507)Commands for the DSOX3PWR power
:PWRenable (Power Event Enable Register)
(see page 208)
:PWRRegister[:EVENt] (Power Event Event
Register) (see page 208)
:RECall:ARBitrary[:STARt] (see page 567)Recalls waveform generator arbitrary
Selects the measurement whose trend is
shown in the math waveform. Available with
the DSOX3ADVMATH advanced math license.
DSOX3PWR power measurements and
analysis application is licensed and enabled.
statistics is on or off.
measurements and analysis application.
For enabling bits in the Power Event Enable
Register. This status register control is
available when the DSOX3PWR power
measurements and analysis application is
licensed.
For reading power application status bits in the
Power Event Event Register. This query is
available when the DSOX3PWR power
measurements and analysis application is
licensed.
waveforms from a file.
:SAVE:ARBitrary[:STARt] (see page 576)Saves waveform generator arbitrary waveforms
to a file.
:SAVE:POWer[:STARt] (see page 585)Saves the power measurement application's
current harmonics analysis results to a file.
:SBUS<n>:A429 Commands (see page 600)Commands for ARINC 429 triggering and serial
decode.
:SBUS<n>:FLEXray Commands (see page 635)Commands for FlexRay triggering and serial
decode.
:SBUS<n>:M1553 Commands (see page 697)Commands for MIL-STD 1553 triggering and
:DEMO:FUNCtion (see page 274)The FMBurst, ARINc, FLEXray, MIL, and MIL2
functions are now available with the DSOXEDK
educator's kit license.
:FUNCtion:OPERation (see page 331)The MAGNify, ABSolute, SQUare, LN, LOG,
EXP, TEN, LOWPass, HIGHpass, DIVide, LINear,
TRENd, BTIMing, and BSTate operations are
now available with the DSOX3ADVMATH
advanced math measurements license.
:FUNCtion:SOURce1 (see page 336)The BUS<m> source is now available for the
bus charting operations available with the
DSOX3ADVMATH advanced math
measurements license.
:SBUS<n>:MODE (see page 599)The A429, M1553, and FLEXray modes are now
available with the DSOX3AERO (MIL-STD-1553
and ARINC 429) and DSOX3FLEX (FlexRay)
serial decode and triggering licenses.
:TRIGger:TV:MODE (see page 910)The LINE mode is added for the video
standards available with the extended Video
triggering license.
:TRIGger:TV:STANdard (see page 913)Lets you select additional video standards
:WGEN:FUNCtion (see page 970)The ARBitrary waveform type can now be
available with the extended Video triggering
license.
New command descriptions for Version 1.10 of the InfiniiVision
3000 X-Series oscilloscope software appear below.
New Commands
CommandDescription
:SYSTem:PRESet (see page 824)Now documented, this command is equivalent
What's New1
to the front panel [Default Setup] key which
leaves some user settings, like preferences,
unchanged. The *RST command is equivalent
to a factory default setup where no user
settings are left unchanged.
The Agilent InfiniiVision 3000 X- Series oscilloscopes were introduced with
version 1.00 of oscilloscope operating software.
The command set is most closely related to the InfiniiVision 7000B Series
oscilloscopes (and the 7000A Series, 6000 Series, and 54620/54640 Series
oscilloscopes before them). For more information, see “Command
Differences From 7000B Series Oscilloscopes" on page 41.
Command Differences From 7000B Series Oscilloscopes
The Agilent InfiniiVision 3000 X- Series oscilloscopes command set is most
closely related to the InfiniiVision 7000B Series oscilloscopes (and the
7000A Series, 6000 Series, and 54620/54640 Series oscilloscopes before
them).
The main differences between the version 1.00 programming command set
for the InfiniiVision 3000 X-Series oscilloscopes and the 6.10 programming
command set for the InfiniiVision 7000B Series oscilloscopes are related
to:
• Built- in waveform generator (with Option WGN license).
• Built- in demo signals (with Option EDU license that comes with the
N6455A Education Kit).
• Reference waveforms (in place of trace memory).
• Multiple serial decode waveforms.
• Serial decode now available on 2- channel oscilloscopes.
What's New1
New Commands
• Enhanced set of trigger types.
• Additional measurements.
• Different path name format for internal and USB storage device
locations.
More detailed descriptions of the new, changed, obsolete, and discontinued
commands appear below.
CommandDescription
:DEMO Commands (see
page 273)
:HARDcopy:NETWork
Commands (see page 341)
:MEASure:AREA (see
page 392)
:MEASure:BWIDth (see
page 393)
:MEASure:NEDGes (see
page 404)
Commands for using built-in demo signals (with the Option EDU
license that comes with the N6455A Education Kit).
For accessing network printers.
Measures the area between the waveform and the ground level.
Measures the burst width from the first edge on screen to the
last.
Step 1. Install Agilent IO Libraries Suite software 46
Step 2. Connect and set up the oscilloscope 47
Step 3. Verify the oscilloscope connection 49
This chapter explains how to install the Agilent IO Libraries Suite
software, connect the oscilloscope to the controller PC, set up the
oscilloscope, and verify the oscilloscope connection.
s1
45
2Setting Up
Step 1. Install Agilent IO Libraries Suite software
1 Download the Agilent IO Libraries Suite software from the Agilent web
site at:
• "http://www.agilent.com/find/iolib"
2 Run the setup file, and follow its installation instructions.
If automatic configuration is not supported, get the oscilloscope's
network parameters (hostname, domain, IP address, subnet mask,
gateway IP, DNS IP, etc.).
3 Connect the oscilloscope to the local area network (LAN) by inserting
LAN cable into the "LAN" port on the LAN/VGA option module.
4 Configure the oscilloscope's LAN interface:
a Press the Configure softkey until "LAN" is selected.
b Press the LAN Settings softkey.
c Press the Config softkey, and enable all the configuration options
supported by your network.
d If automatic configuration is not supported, press the Addresses
softkey.
Use the Modify softkey (and the other softkeys and the Entry knob)
to enter the IP Address, Subnet Mask, Gateway IP, and DNS IP
values.
When you are done, press the [Back up] key.
e Press the Host name softkey. Use the softkeys and the Entry knob to
enter the Host name.
When you are done, press the [Back up] key.
Using the GPIB Interface
1 Connect a GPIB cable from the controller PC's GPIB interface to the
"GPIB" port on the GPIB option module.
2 Configure the oscilloscope's GPIB interface:
a Press the Configure softkey until "GPIB" is selected.
b Use the Entry knob to select the Address value.
1 On the controller PC, click on the Agilent IO Control icon in the
taskbar and choose Agilent Connection Expert from the popup menu.
2 In the Agilent Connection Expert application, instruments connected to
the controller's USB and GPIB interfaces should automatically appear.
(You can click Refresh All to update the list of instruments on these
interfaces.)
Basic Oscilloscope Program Structure 56
Programming the Oscilloscope 58
Other Ways of Sending Commands 67
This chapter gives you an overview of programming the 3000 X-Series
oscilloscopes. It describes basic oscilloscope program structure and shows
how to program the oscilloscope using a few simple examples.
The getting started examples show how to send oscilloscope setup, data
capture, and query commands, and they show how to read query results.
Language for Program Examples
The programming examples in this guide are written in Visual Basic using the Agilent VISA
COM library.
s1
55
3Getting Started
Basic Oscilloscope Program Structure
The following figure shows the basic structure of every program you will
write for the oscilloscope.
Initializing
To ensure consistent, repeatable performance, you need to start the
program, controller, and oscilloscope in a known state. Without correct
initialization, your program may run correctly in one instance and not in
another. This might be due to changes made in configuration by previous
program runs or from the front panel of the oscilloscope.
• Program initialization defines and initializes variables, allocates
memory, or tests system configuration.
• Controller initialization ensures that the interface to the oscilloscope is
properly set up and ready for data transfer.
• Oscilloscope initialization sets the channel configuration, channel labels,
threshold voltages, trigger specification, trigger mode, timebase, and
acquisition type.
Capturing Data
Once you initialize the oscilloscope, you can begin capturing data for
analysis. Remember that while the oscilloscope is responding to commands
from the controller, it is not performing acquisitions. Also, when you
change the oscilloscope configuration, any data already captured will most
likely be rendered.
To collect data, you use the :DIGitize command. This command clears the
waveform buffers and starts the acquisition process. Acquisition continues
until acquisition memory is full, then stops. The acquired data is displayed
by the oscilloscope, and the captured data can be measured, stored in
acquisition memory in the oscilloscope, or transferred to the controller for
further analysis. Any additional commands sent while :DIGitize is working
are buffered until :DIGitize is complete.
You could also put the oscilloscope into run mode, then use a wait loop in
your program to ensure that the oscilloscope has completed at least one
acquisition before you make a measurement. Agilent does not recommend
this because the needed length of the wait loop may vary, causing your
program to fail. :DIGitize, on the other hand, ensures that data capture is
complete. Also, :DIGitize, when complete, stops the acquisition process so
that all measurements are on displayed data, not on a constantly changing
data set.
Analyzing Captured Data
After the oscilloscope has completed an acquisition, you can find out more
about the data, either by using the oscilloscope measurements or by
transferring the data to the controller for manipulation by your program.
Built- in measurements include: frequency, duty cycle, period, positive
pulse width, and negative pulse width.
Getting Started3
Using the :WAVeform commands, you can transfer the data to your
controller. You may want to display the data, compare it to a known good
measurement, or simply check logic patterns at various time intervals in
the acquisition.
• "Sending Multiple Queries and Reading Results" on page 65
• "Checking Instrument Status" on page 66
Referencing the IO Library
No matter which instrument programming library you use (SICL, VISA, or
VISA COM), you must reference the library from your program.
In C/C++, you must tell the compiler where to find the include and library
files (see the Agilent IO Libraries Suite documentation for more
information).
To reference the Agilent VISA COM library in Visual Basic for Applications
(VBA, which comes with Microsoft Office products like Excel):
1 Choose Tools>References... from the main menu.
2 In the References dialog, check the "VISA COM 3.0 Type Library".
To reference the Agilent VISA COM library in Microsoft Visual Basic 6.0:
1 Choose Project>References... from the main menu.
2 In the References dialog, check the "VISA COM 3.0 Type Library".
3 Click OK.
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.
Getting Started3
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 "Program
Message Syntax" on page 1089.
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 and set the interface timeout to 10 seconds
.
myScope.IO.Clear
myScope.IO.Timeout = 10000
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"
Information for Initializing the Instrument
The actual commands and syntax for initializing the instrument are discussed in Chapter 5,
“Common (*) Commands,” starting on page 153.
Refer to the Agilent IO Libraries Suite documentation for information on initializing the
interface.
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"
Using Other Oscilloscope Setup Commands
A typical oscilloscope setup would set the vertical range and offset voltage,
the horizontal range, delay time, delay reference, trigger mode, trigger
level, and slope. An example of the commands that might be sent to the
oscilloscope are:
Vertical is set to 16 V full- scale (2 V/div) with center of screen at 1 V and
probe attenuation set to 10. This example sets the time base at 1 ms
full- scale (100 ms/div) with a delay of 100 µs.
Example Oscilloscope Setup Code
This program demonstrates the basic command structure used to program
the oscilloscope.
' Initialize the instrument interface to a known state.
myScope.IO.Clear
myScope.IO.Timeout = 10000' Set interface timeout to 10 seconds.
' Initialize the instrument to a preset state.
myScope.WriteString "*RST"
' Set the time base mode to normal with the horizontal time at
' 50 ms/div with 0 s of delay referenced at the center of the
' graticule.
myScope.WriteString ":TIMebase:RANGe 5E-4"' Time base to 50 us/div.
myScope.WriteString ":TIMebase:DELay 0"' Delay to zero.
myScope.WriteString ":TIMebase:REFerence CENTer"' Display ref. at
' center.
' Set the vertical range to 1.6 volts full scale with center screen
' at -0.4 volts with 10:1 probe attenuation and DC coupling.
myScope.WriteString ":CHANnel1:PROBe 10"' Probe attenuation
myScope.WriteString ":CHANnel1:RANGe 1.6"' Vertical range
myScope.WriteString ":CHANnel1:OFFSet -0.4"' Offset to -0.4.
myScope.WriteString ":CHANnel1:COUPling DC"' Coupling to DC.
' Configure the instrument to trigger at -0.4 volts with normal
' triggering.
myScope.WriteString ":TRIGger:SWEep NORMal"' Normal triggering.
myScope.WriteString ":TRIGger:LEVel -0.4"' Trigger level to -0.4.
myScope.WriteString ":TRIGger:SLOPe POSitive" ' Trigger on pos. slope.
' Configure the instrument for normal acquisition.
myScope.WriteString ":ACQuire:TYPE NORMal"' Normal acquisition.
Capturing Data with the :DIGitize Command
The :DIGitize command captures data that meets the specifications set up
by the :ACQuire subsystem. When the digitize process is complete, the
acquisition is stopped. The captured data can then be measured by the
instrument or transferred to the controller for further analysis. The
captured data consists of two parts: the waveform data record, and the
preamble.
When you change the oscilloscope configuration, the waveform buffers are cleared. Before
doing a measurement, send the :DIGitize command to the oscilloscope to ensure new data
has been collected.
When you send the :DIGitize command to the oscilloscope, the specified
channel signal is digitized with the current :ACQuire parameters. To obtain
waveform data, you must specify the :WAVeform parameters for the
SOURce channel, the FORMat type, and the number of POINts prior to
sending the :WAVeform:DATA? query.
Set :TIMebase:MODE to MAIN when using :DIGitize
:TIMebase:MODE must be set to MAIN to perform a :DIGitize command or to perform any
:WAVeform subsystem query. A "Settings conflict" error message will be returned if these
commands are executed when MODE is set to ROLL, XY, or WINDow (zoomed). Sending the
*RST (reset) command will also set the time base mode to normal.
The number of data points comprising a waveform varies according to the
number requested in the :ACQuire subsystem. The :ACQuire subsystem
determines the number of data points, type of acquisition, and number of
averages used by the :DIGitize command. This allows you to specify exactly
what the digitized information contains.
The following program example shows a typical setup:
This setup places the instrument into the averaged mode with eight
averages. This means that when the :DIGitize command is received, the
command will execute until the signal has been averaged at least eight
times.
After receiving the :WAVeform:DATA? query, the instrument will start
passing the waveform information.
Digitized waveforms are passed from the instrument to the controller by
sending a numerical representation of each digitized point. The format of
the numerical representation is controlled with the :WAVeform:FORMat
command and may be selected as BYTE, WORD, or ASCii.
The easiest method of transferring a digitized waveform depends on data
NOTE
structures, formatting available and I/O capabilities. You must scale the
integers to determine the voltage value of each point. These integers are
passed starting with the left most point on the instrument's display.
For more information, see the waveform subsystem commands and
corresponding program code examples in Chapter 31, “:WAVeform
Commands,” starting on page 923.
Aborting a Digitize Operation Over the Programming Interface
When using the programming interface, you can abort a digitize operation by sending a
Device Clear over the bus (for example, myScope.IO.Clear).
Reading Query Responses from the Oscilloscope
After receiving a query (command header followed by a question mark),
the instrument interrogates the requested function and places the answer
in its output queue. The answer remains in the output queue until it is
read or another command is issued. When read, the answer is transmitted
across the interface to the designated listener (typically a controller).
Getting Started3
The statement for reading a query response message from an instrument's
output queue typically has a format specification for handling the response
message.
When using the VISA COM library in Visual Basic, you use different read
methods (ReadString, ReadNumber, ReadList, or ReadIEEEBlock) for the
various query response formats. For example, to read the result of the
query command :CHANnel1:COUPling? you would execute the statements:
myScope.WriteString ":CHANnel1:COUPling?"
Dim strQueryResult As String
strQueryResult = myScope.ReadString
This reads the current setting for the channel one coupling into the string
variable strQueryResult.
All results for queries (sent in one program message) must be read before
another program message is sent.
Sending another command before reading the result of the query clears
the output buffer and the current response. This also causes an error to
be placed in the error queue.
Executing a read statement before sending a query causes the controller to
wait indefinitely.
The format specification for handling response messages depends on the
programming language.
The output of the instrument may be numeric or character data depending
on what is queried. Refer to the specific command descriptions for the
formats and types of data returned from queries.
Express String Variables Using Exact Syntax
In Visual Basic, string variables are case sensitive and must be expressed exactly the same
each time they are used.
The following example shows numeric data being returned to a string
variable:
myScope.WriteString ":CHANnel1:RANGe?"
Dim strQueryResult As String
strQueryResult = myScope.ReadString
MsgBox "Range (string):" + strQueryResult
After running this program, the controller displays:
Range (string): +40.0E+00
Reading Query Results into Numeric Variables
The following example shows numeric data being returned to a numeric
variable:
myScope.WriteString ":CHANnel1:RANGe?"
Dim varQueryResult As Variant
varQueryResult = myScope.ReadNumber
MsgBox "Range (variant):" + CStr(varQueryResult)
After running this program, the controller displays:
Range (variant): 40
Reading Definite-Length Block Query Response Data
Definite- length block query response data allows any type of
device-dependent data to be transmitted over the system interface as a
series of 8- bit binary data bytes. This is particularly useful for sending
large quantities of data or 8- bit extended ASCII codes. The syntax is a
pound sign (#) followed by a non-zero digit representing the number of
digits in the decimal integer. After the non-zero digit is the decimal
integer that states the number of 8-bit data bytes being sent. This is
followed by the actual data.
For example, for transmitting 1000 bytes of data, the syntax would be:
The "8" states the number of digits that follow, and "00001000" states the
number of bytes to be transmitted.
The VISA COM library's ReadIEEEBlock and WriteIEEEBlock methods
understand the definite- length block syntax, so you can simply use
variables that contain the data:
' Read oscilloscope setup using ":SYSTem:SETup?" query.
myScope.WriteString ":SYSTem:SETup?"
Dim varQueryResult As Variant
varQueryResult = myScope.ReadIEEEBlock(BinaryType_UI1)
' Write learn string back to oscilloscope using ":SYSTem:SETup" command:
myScope.WriteIEEEBlock ":SYSTem:SETup ", varQueryResult
Sending Multiple Queries and Reading Results
You can send multiple queries to the instrument within a single command
string, but you must also read them back as a single query result. This can
be accomplished by reading them back into a single string variable,
multiple string variables, or multiple numeric variables.
For example, to read the :TIMebase:RANGe?;DELay? query result into a
single string variable, you could use the commands:
myScope.WriteString ":TIMebase:RANGe?;DELay?"
Dim strQueryResult As String
strQueryResult = myScope.ReadString
MsgBox "Timebase range; delay:" + strQueryResult
When you read the result of multiple queries into a single string variable,
each response is separated by a semicolon. For example, the output of the
previous example would be:
To read the :TIMebase:RANGe?;DELay? query result into multiple string
variables, you could use the ReadList method to read the query results
into a string array variable using the commands:
To read the :TIMebase:RANGe?;DELay? query result into multiple numeric
variables, you could use the ReadList method to read the query results
into a variant array variable using the commands:
myScope.WriteString ":TIMebase:RANGe?;DELay?"
Dim varResults() As Variant
varResults() = myScope.ReadList
MsgBox "Timebase range: " + FormatNumber(varResults(0) * 1000, 4) + _
Status registers track the current status of the instrument. By checking
the instrument status, you can find out whether an operation has been
completed, whether the instrument is receiving triggers, and more.
For more information, see Chapter 36, “Status Reporting,” starting on page
1055 which explains how to check the status of the instrument.
Standard Commands for Programmable Instrumentation (SCPI) can also be
sent via a Telnet socket or through the Browser Web Control:
• "Telnet Sockets" on page 67
• "Sending SCPI Commands Using Browser Web Control" on page 67
Telnet Sockets
The following information is provided for programmers who wish to
control the oscilloscope with SCPI commands in a Telnet session.
To connect to the oscilloscope via a telnet socket, issue the following
command:
telnet <hostname> 5024
where <hostname> is the hostname of the oscilloscope. This will give you a
command line with prompt.
Getting Started3
For a command line without a prompt, use port 5025. For example:
telnet <hostname> 5025
Sending SCPI Commands Using Browser Web Control
To send SCPI commands using the Browser Web Control feature, establish
a connection to the oscilloscope via LAN as described in the InfiniiVision 3000 X- Series Oscilloscopes User's Guide. When you make the connection
to the oscilloscope via LAN and the instrument's welcome page is
displayed, select the Browser Web Control tab, then select the Remote
<source> ::= {CHANnel<n> |
DIGital<d> | POD{1 | 2} | BUS{1 |
2} | FUNCtion | MATH | SBUS{1 |
2}} for MSO models
<n> ::= 1 to (# analog channels)
in NR1 format
<source> ::= {CHANnel<n> |
DIGital<d> | POD{1 | 2} | BUS{1 |
2} | FUNCtion | MATH | SBUS{1 |
2}} for MSO models
<n> ::= 1 to (# analog channels)
in NR1 format
<d> ::= 0 to (# digital channels
- 1) in NR1 format
4Commands Quick Reference
Table 4:ACQuire Commands Summary
CommandQueryOptions and Query Returns
:ACQuire:COMPlete
<complete> (see
page 221)
:ACQuire:COUNt
<count> (see
page 222)
:ACQuire:MODE <mode>
(see page 223)
n/a:ACQuire:POINts? (see
:ACQuire:SEGMented:AN
ALyze (see page 225)
:ACQuire:SEGMented:CO
UNt <count> (see
page 226)
:ACQuire:SEGMented:IN
Dex <index> (see
page 227)
n/a:ACQuire:SRATe? (see
:ACQuire:COMPlete?
(see page 221)
:ACQuire:COUNt? (see
page 222)
:ACQuire:MODE? (see
page 223)
page 224)
n/an/a (with Option SGM)
:ACQuire:SEGMented:CO
UNt? (see page 226)
:ACQuire:SEGMented:IN
Dex? (see page 227)
page 230)
<complete> ::= 100; an integer in
NR1 format
<count> ::= an integer from 2 to
65536 in NR1 format
<mode> ::= {RTIMe | SEGMented}
<# points> ::= an integer in NR1
format
<count> ::= an integer from 2 to
1000 in NR1 format (with Option
SGM)
<index> ::= an integer from 1 to
1000 in NR1 format (with Option
SGM)
<sample_rate> ::= sample rate
(samples/s) in NR3 format
:ACQuire:TYPE <type>
(see page 231)
:ACQuire:TYPE? (see
page 231)
<type> ::= {NORMal | AVERage |
HRESolution | PEAK}
Table 5:BUS<n> Commands Summary
CommandQueryOptions and Query Returns
:BUS<n>:BIT<m> {{0 |
OFF} | {1 | ON}} (see
page 235)
:BUS<n>:BITS
<channel_list>, {{0 |
OFF} | {1 | ON}} (see
page 236)
:BUS<n>:BIT<m>? (see
page 235)
:BUS<n>:BITS? (see
page 236)
{0 | 1}
<n> ::= 1 or 2; an integer in NR1
format
<m> ::= 0-15; an integer in NR1
format
<channel_list>, {0 | 1}
<channel_list> ::= (@<m>,<m>:<m>
...) where "," is separator and
":" is range
<n> ::= 1 or 2; an integer in NR1
format
<m> ::= 0-15; an integer in NR1
format
<range> ::= the full-scale
vertical axis value in NR3
format.
The range for ADD, SUBT, MULT is
8E-6 to 800E+3. The range for the
INTegrate function is 8E-9 to
400E+3.
The range for the DIFF function
is 80E-3 to 8.0E12 (depends on
current sweep speed).
The range for the FFT function is
8 to 800 dBV.
<level> ::= the value at center
screen in NR3 format.
The range of legal values is
+/-10 times the current
sensitivity of the selected
function.
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= area in
volt-seconds, NR3 format
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= burst width in
seconds, NR3 format
<source1,2> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::=
floating-point number delay time
in seconds in NR3 format
4Commands Quick Reference
Table 16 :MEASure Commands Summary (continued)
CommandQueryOptions and Query Returns
:MEASure:DUTYcycle
[<source>] (see
page 401)
:MEASure:FALLtime
[<source>] (see
page 402)
:MEASure:DUTYcycle?
[<source>] (see
page 401)
:MEASure:FALLtime?
[<source>] (see
page 402)
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>} for
DSO models
<source> ::= {CHANnel<n> |
DIGital<d> | FUNCtion | MATH |
WMEMory<r>} for MSO models
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<d> ::= 0 to (# digital channels
- 1) in NR1 format
<return_value> ::= ratio of
positive pulse width to period in
NR3 format
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>} for
DSO models
<source> ::= {CHANnel<n> |
DIGital<d> | FUNCtion | MATH |
WMEMory<r>} for MSO models
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<d> ::= 0 to (# digital channels
- 1) in NR1 format
<return_value> ::= time in
seconds between the lower and
upper thresholds in NR3 format
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= the percent of
the overshoot of the selected
waveform in NR3 format
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= the rising
edge count in NR3 format
4Commands Quick Reference
Table 16 :MEASure Commands Summary (continued)
CommandQueryOptions and Query Returns
:MEASure:PERiod
[<source>] (see
page 410)
:MEASure:PHASe
[<source1>]
[,<source2>] (see
page 411)
:MEASure:PPULses
[<source>] (see
page 412)
:MEASure:PERiod?
[<source>] (see
page 410)
:MEASure:PHASe?
[<source1>]
[,<source2>] (see
page 411)
:MEASure:PPULses?
[<source>] (see
page 412)
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>} for
DSO models
<source> ::= {CHANnel<n> |
DIGital<d> | FUNCtion | MATH |
WMEMory<r>} for MSO models
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<d> ::= 0 to (# digital channels
- 1) in NR1 format
<return_value> ::= waveform
period in seconds in NR3 format
<source1,2> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= the phase
angle value in degrees in NR3
format
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= the rising
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= the percent of
preshoot of the selected waveform
in NR3 format
Commands Quick Reference4
Table 16 :MEASure Commands Summary (continued)
CommandQueryOptions and Query Returns
:MEASure:PWIDth
[<source>] (see
page 414)
n/a:MEASure:RESults?
:MEASure:RISetime
[<source>] (see
page 418)
:MEASure:PWIDth?
[<source>] (see
page 414)
<result_list> (see
page 415)
:MEASure:RISetime?
[<source>] (see
page 418)
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>} for
DSO models
<source> ::= {CHANnel<n> |
DIGital<d> | FUNCtion | MATH |
WMEMory<r>} for MSO models
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<d> ::= 0 to (# digital channels
- 1) in NR1 format
<return_value> ::= width of
positive pulse in seconds in NR3
format
<result_list> ::=
comma-separated list of
measurement results
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= rise time in
seconds in NR3 format
:MEASure:SDEViation
[<source>] (see
page 419)
:MEASure:SHOW {1 |
ON} (see page 420)
:MEASure:SDEViation?
[<source>] (see
page 419)
:MEASure:SHOW? (see
page 420)
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= calculated
std deviation in NR3 format
:MEASure:STATistics:D
ISPlay {{0 | OFF} |
{1 | ON}} (see
page 424)
:MEASure:SOURce? (see
page 421)
:MEASure:STATistics?
(see page 423)
:MEASure:STATistics:D
ISPlay? (see
page 424)
<source1,2> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r> |
EXTernal} for DSO models
<source1,2> ::= {CHANnel<n> |
DIGital<d> | FUNCtion | MATH |
WMEMory<r> | EXTernal} for MSO
models
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<d> ::= 0 to (# digital channels
- 1) in NR1 format
<return_value> ::= {<source> |
NONE}
<type> ::= {{ON | 1} | CURRent |
MEAN | MINimum | MAXimum | STDDev
| COUNt}
ON ::= all statistics returned
{0 | 1}
:MEASure:STATistics:I
NCRement (see
page 425)
:MEASure:STATistics:M
COunt <setting> (see
page 426)
:MEASure:STATistics:R
ESet (see page 427)
:MEASure:STATistics:R
SDeviation {{0 | OFF}
| {1 | ON}} (see
page 428)
n/an/a
:MEASure:STATistics:M
COunt? (see page 426)
n/an/a
:MEASure:STATistics:R
SDeviation? (see
page 428)
<setting> ::= {INFinite |
<count>}
<count> ::= 2 to 2000 in NR1
format
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= maximum
voltage of the selected waveform
in NR3 format
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= minimum
voltage of the selected waveform
in NR3 format
Commands Quick Reference4
Table 16 :MEASure Commands Summary (continued)
CommandQueryOptions and Query Returns
:MEASure:VPP
[<source>] (see
page 438)
:MEASure:VRATio
[<interval>][,][<sour
ce1>] [,<source2>]
(see page 439)
:MEASure:VRMS
[<interval>][,]
[<type>][,]
[<source>] (see
page 440)
:MEASure:VPP?
[<source>] (see
page 438)
:MEASure:VRATio?
[<interval>][,][<sour
ce1>] [,<source2>]
(see page 439)
:MEASure:VRMS?
[<interval>][,]
[<type>][,]
[<source>] (see
page 440)
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= voltage
peak-to-peak of the selected
waveform in NR3 format
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= the ratio
value in dB in NR3 format
<interval> ::= {CYCLe | DISPlay}
<type> ::= {AC | DC}
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= calculated dc
RMS voltage in NR3 format
<vtime> ::= displayed time from
trigger in seconds in NR3 format
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>} for
DSO models
<source> ::= {CHANnel<n> |
DIGital<d> | FUNCtion | MATH |
WMEMory<r>} for MSO models
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<d> ::= 0 to (# digital channels
- 1) in NR1 format
<return_value> ::= voltage at the
specified time in NR3 format
4Commands Quick Reference
Table 16 :MEASure Commands Summary (continued)
CommandQueryOptions and Query Returns
:MEASure:VTOP
[<source>] (see
page 442)
:MEASure:WINDow
<type> (see page 443)
:MEASure:XMAX
[<source>] (see
page 444)
:MEASure:XMIN
[<source>] (see
page 445)
:MEASure:VTOP?
[<source>] (see
page 442)
:MEASure:WINDow? (see
page 443)
:MEASure:XMAX?
[<source>] (see
page 444)
:MEASure:XMIN?
[<source>] (see
page 445)
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= voltage at the
top of the waveform in NR3 format
<type> ::= {MAIN | ZOOM | AUTO}
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= horizontal
value of the maximum in NR3
format
<source> ::= {CHANnel<n> |
FUNCtion | MATH | WMEMory<r>}
<n> ::= 1 to (# analog channels)
in NR1 format
<r> ::= 1-2 in NR1 format
<return_value> ::= horizontal