Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication
supersedes that in all previously published material. Specifications and price change privileges reserved.
TEKTRONIX and TEK are registered trademarks of Tektronix, Inc.
TekSecure is a trademark of Tektronix, Inc.
2 Series MSO Programmer Manual. Released April 2022.
Contacting Tektronix
Tektronix, Inc.
14150 SW Karl Braun Drive
P.O. Box 500
Beaverton, OR 97077
USA
For product information, sales, service, and te chnical support:
In North America, c all 1-800-833-9200.
Worldwide, visit www.tek.com to find contacts in your area.
mand group ........................... .................................. .....................2-62
ii2 Series MSO Programmer Manual
Preface
This programmer guide provides you with the information required to use
Programmable Interface commands to remotely control your instrument.
The programmer manual is divided into the following major topics:
Getting started. This topic introduces you to the programming information
and provides basic information about setting up your instrument for remote
control.
Command syntax. This topic provides an overview of the command syntax
that you use to communicate with the instrument and other general information
about com
enter commands, constructed mnemonics, and argument types.
mands, such as how commands and queries are constructed, how to
Command
groups. Each group consists of an overview of the commands in that group and
a table that lists all the commands and queries for that group. You can click a
command in the listing to display a detailed description of the command.
Commands listed in alphabetical order. This topic contains all commands
listed in alphabetical order. Command details, syntax, and examples are
provided.
Status and events. This topic discusses the status and event reporting system
for the programming interfaces. This system informs you of certain significant
events that occur within the instrument. Topics that are discussed include
isters, queues, event handling sequences, synchronization methods, and
reg
messages that the instrument might return, including error messages.
pendices. These topics contain miscellaneous information, such as a list
Ap
of reserved words, a table of the factory initialization (default) settings, and
interface specifications that can be helpful when using commands to remotely
control the instrument.
groups. This topic contains all the commands listed in functional
2 Series MSO Programmer Manualiii
Preface
iv2 Series MSO Programmer Manual
Getting Started
This manual explains the use of commands to remotely control your instrument.
With this information, you can write computer programs to perform functions,
such as setti
statistical calculations, and exporting data for use in other programs.
ng the front-panel controls, taking measurements, performing
Familiarit
download the User Manual from the Tektronix website at www.tek.com.
NOTE. Most examples in this document assume that both HEADer and VERBose
are set to ON.
y with the User Manual for your instrument is assumed. You can
SettingUpRemoteCommunicationsHardware
You can remotely control communications between your instrument and a PC
via Ethernet or USB cables.
Ethernet
If you are using Ethernet, start by connecting an appropriate Ethernet cable to the
Ethernet port (RJ-45 connector) on the side of your instrument. This connects the
instrument to a 10BASE-T/100BASE-T/1000BASE-T local area network.
To change the Ethernet settings on your instrument, do the following:
1. Select the Utility drop-down menu.
2. Sel
3. Select the LAN panel.
ect the I/O menu.
4. In the menu, if you are on a DHCP Ethernet network that supplies the IPaddress automatically by a DHCP, tap Auto.
5. In the menu, if you want to supply your own network settings, tap Manual
to set a hard coded TCP/IP address.
SB
U
2 Series MSO Programmer Manual1-1
If you are using USB, start by connecting the appropriate USB cable to the USB
2.0 device port on the side of your instrument. This port requires that the cable
connected from the port to the host computer meets the USB 2.0 specification.
Typically, such cables should be 3 feet or shorter in length, but this is determined
by the q uality of the cable and, with higher quality cables, this length can be
extended. (It is also dependent upon the drive capability of the host USB port
to which the instrument is connected.) The use of high quality short cables is
recommended to avoid USB connection problems.
Getting Started
With USB, the sy
stem automatically configures itself. To verify that the USB is
enabled:
1. Select the Uti
lity drop-down menu.
2. Select the I/O menu.
3. Touch USB Device Port to open the USB Device Port configuration menu.
4. If USB is disabled, tap USB Device Port to enable the USB Device port.
After c onnection, the host, with appropriate software, can list the instrument as a
USB device with the following parameters: (See Table 1-1.)
Table 1-1: USB Device Parameters
ParameterValue
Manufacturer ID0x0699 (decimal 1689)
Product ID0x105
(You can s end the
USBTMC:
query to read the value)
Serial numberSerial number
Manufacturer description
Interface description“USBTMC-USB488”
“Tektr
PRODUCTID:HEXadecimal?
onix”
ing Up Remote Communications Software
Sett
Connect your instrument directly to a computer to let the PC analyze your data,
collect s creen images, or to control the instrument using a program of your own
ation. Three ways to connect your instrument to a computer are through the
cre
VISA drivers, or via a socket server.
Using VISA
VISA lets you use your MS-Windows computer to acquire data from your
nstrument for use in an analysis package that runs on your PC, such as Microsoft
i
Excel, National Instruments LabVIEW, Tektronix OpenChoice Desktop software,
or your own custom software. You can use a common communications
connection, such as USB or Ethernet, to connect the computer to the instrument.
To set up VISA communications between your instrument and a computer:
1-22 Series MSO Programmer Manual
Getting Started
1. Load the VISA dr
as OpenChoice Desktop. You will find the drivers and OpenChoice Desktop
software on the appropriate CD that comes with your instrument or at the
Tektronix software finder Web page (www.tektronix.com\downloads).
2. Connect the instrument to your computer with the appropriate USB or
Ethernet cable. Cycle the power on the instrument.
3. Select the Utility drop-down menu
4. Select I/O menu.
5. If you are using USB, the system sets itself up automatically for you, if
USB is enabled. Check USB DEVICE PORT panel to be sure that USB is
enabled. If it is not enabled, toggle the On/Off button to On.
6. To use Ethernet, select the LAN panel. Use the controls to
network settings, as needed. For more information, see the e*Scope setup
information below.
7. If you wa nt to change socket server parameters, select the Socket Server
panel and enter new values through the resulting panel controls.
8. Run your application software on your computer.
ivers on your computer. Also, load your application, such
adjust your
Quick Tips
Using a Socket Server
The USB 2.0 device port is the correct USB port for computer connectivity.
Use the side USB 2.0 host ports to connect your instrument to USB flash
drives, hard drives, keyboards or mice. Use the USB Device port to conn
your instrument to a PC.
There are two USB 2.0 host ports and a USB 2.0 device port on the side of
the instrument. Printers are not supported on host ports. PictBridge printers
are not supported on the device port.
A socket server provides two-way communication over an Internet Protocol-based
computer network.
instrument talk to a remote-terminal device or computer.
To set up and use a socket server between your instrument and a remote terminal
or computer:
1. Connect the instrument to your computer network with an appropriate
Ethernet cable.
2. Select the Utility drop-down menu.
3. Select the I/O menu.
4. Tap Socket Server.
You can use your instrument’s socket server feature to let your
ect
5. On the resulting Socket Server panel, tap the top entry to toggle the Socket
Server On.
2 Series MSO Programmer Manual1-3
Getting Started
6. Choose whether
the protocol should be None or Te rmina l . A communication
session run by a human at a keyboard typically uses a terminal protocol.
An automated session might handle its own communications without using
such a protocol.
7. If required, change the port number by rotating multipurpose knob a.
8. If required, press OK to set the new port n umber.
9. After setting up the socket server parameters, you can now have the computer
“talk” to the instrument. If you are running an MS Windows PC, you could
run its default client with its command-like interface. One way to do this is
by typing “
Telnet ” in the Run window. The Telnet window will open on
the PC.
NOTE. On MS Windows 10, you must fi rst enable Telnet in order for it to work.
10. Start a terminal session between your computer and your instrument by typing
in an open command with the instrument LAN address and port #. You can
obtain the LAN address by pushing the LAN panel to view the resulting LAN
setting panel. You can obtain the port # by tapping the Socket Server panel
and viewing the Port item.
For example, if the instrument IP address was
# was the default of
4000, you could open a session by writing into the MS
123.45.67.89 and the port
Windows Telnet screen:
open 123.45.67.89 4000
The instrument will send a help screen to the computer when it is done
connecting.
11. You can now type in a standard query, as found in the programmer manual,
such as
*idn?
The Telnet session window will respond by displaying a character string
describing your instrument. You can type in more queries and view more
results o
n this Telnet session window. You can find the syntax for relevant
queries and related status codes in other sections of this manual.
NOTE. Do not use the computer’s backspace key during an MS Windows' Telnet
session with the instrument.
Socket Server Terminal Protocol Mode Commands. Following are Tektronix
ument Control Terminal Session Control commands:
Instr
!t <timeout> : set the response timeout in milliseconds.
!d : send device clear to the instrument.
1-42 Series MSO Programmer Manual
Getting Started
!r : read respon
!h : print this usage info.
NOTE. Comman
read automatically.
Documentation
Documenta
tion for your instrument is available for download at www.tek.com.
Dynamic programmatic interface
This prog
recognize certain commands until the objects referenced by those commands
actually exist. For example, commands related to measurements are not
recognized until measurements are added. Therefore, the response to a *LRN?
query will not normally include the instrument's complete command set.
The following command groups are not available when the instrument is in its
default state:
rammatic interface is dynamic. This means the instrument will not
Measurement
se from instrument.
ds containing a ? are treated as queries, and the responses are
Implicit activation
Math
Bus
ch and Mark
Sear
Plot
Adding an instance of one of those components will cause all commands
related to that component to be recognized. For example, sending the
ASUrement:ADDNew command adds a measurement at which point the
ME
measurement commands will be recognized. Conversely, once all instances of a
component have been deleted, the commands related to that component will no
longer be recognized.
When you send a command or query related to a dynamic object (such as
Math1, Bus3, or Meas2) to the instrument and that instance does not yet exist,
the instrument:
creates a default instance with the name you specified
adds all relevant commands and queries to the set of recognized commands
responds to the command or query
2 Series MSO Programmer Manual1-5
Getting Started
Example 1
Example 2
*RST followed b
the default state, the instrument does not have any math waveforms. However
querying :MATH:MATH1:DEFinition? will add MATH1 with the default math
expression Ch1 - Ch2. Then the query will return the expected result. Note that if
Ch1 or Ch2 is not active, they will be activated as part of this action. A *LRN
issued after this will return MATH commands in addition to other available
commands.
*RST followed by :MEASUrement:MEAS3:TYPE? createsameasurement
named MEAS3 and returns its type. Since the default type is Period, you
will get Period as the response. A *LRN issued after this will return all
MEASUrement:MEAS3 commands in addition to other available commands.
Not all commands in these groups start implicit activation. ADDNew, DELete,
and LIST commands do not result in implicit activation.
y a *LRN? will not return any MATH<x> commands because in
Creating, deleting, and listing dynamic instances
You can create a new default instance of a dynamic feature by using the ADDNew
command. For example, :MEASUrement:ADDNew "Meas1" will create a new
measurement named Meas1. Meas1 will be a Period measurement since the
default type for measurements is Period. Note that you can change Meas1 type
to any other supported type using :MEASUrement:MEAS1:TYPE command.
The DELete command deletes the named dynamic instance. For example
:BUS:DELete “B2” will delete a bus named B2 if it exists. You can delete only
one instance at a time. The LIST command returns a list of all dynamic instances
currently in existence. For example, if you have added three measurements named
Meas1, Meas2 and Meas3, :MEASUrement:LIST? returns MEAS1, MEAS2,
MEAS3.
Backwards Compatibility
2 Series MSO instruments have implicit backwards compatibility built
into the command set. Many commands from previous scope generations
can be successfully processed by modern scopes. In particular, the
MSO/DPO5000/7000/70000 command set has been partially migrated to the new
generation. Use the following table to check if a legacy command is supported
and how it will be interpreted by a 2 Series MSO.
The left column indicates the legacy command and the right column indicates
the command that will be executed on a 2 Series MSO. Some functions on the
scope have been simplified, so multiple legacy commands are m apped to a single
modern command.
In addition to these implicit aliases, the 2 Series MSO also contain a PI Translator
feature. This allows users to define custom command processing to improve
1-62 Series MSO Programmer Manual
Getting Started
compatibility
with legacy automation code. Please refer to the Programming
Interface Translator Technical Brief on tek.com for more information.
You can control the operations and functions of the instrument through the
Ethernet port or the USB 2.0 device port using commands and queries. The related
topics liste
also describe the conventions that the instrument uses to process them. See the
Command Groups topic in the table of contents for a listing of the commands by
command group, or use the index to locate a specific command.
d below describe the syntax of these commands and queries. The topics
Backus-Naur Form
Notation
This documentation describes the commands and queries using Backus-Naur
Form (BNF) notation. Refer to the following table for the symbols that are used.
Table 2-1: Symbols for Backus-Naur Form
SymbolMeaning
<>
=
|Exclusive OR
{ }Group; one element is required
[]
.. .
Command and Query Structure
mmands consist of set commands and query commands (usually called
Co
commands and queries). Commands modify instrument settings or tell the
instrument to perform a specific action. Queries cause the instrument to return
data and status information.
Most commands have both a set form and a query form. The query form of the
command differs from the set form by its question mark at the end. For example,
the set command
commands have both a set and a query form. Some commands have set only and
some have query only.
Defined element
Is defined as
Optional; can be omitted
Previous element(s) may be repeated
ACQuire:MODe has a query form ACQuire:MODe?.Notall
Messages
2 Series MSO Programmer Manual2-1
A command message is a command or query name followed by a ny information
the instrument needs to execute the command or query. Command messages may
contain five element types, defined in the following table.
Command Syntax
Commands
Table 2-2: Comm
SymbolMeaning
<Header>
<Mnemonic>
<Argument
<Comma>A single c
<Space>
Comman
>
ds cause the instrument to perform a specific function or change one of
and Message Elements
This is the basic command name. If the header ends with a question
mark, the command is a query. The header may begin with a colon
(:) characte
the beginning colon is required. Never use the beginning colon with
command headers beginning with a star (*).
This is a header subfunction. Some command headers have only one
mnemonic. I
character always separates them from each other.
This is a qu
Some commands have no arguments while others have multiple
arguments. A <space> separates arguments from the header. A
<comma> se
commands. Optionally, there may be white space characters before
and after the comma.
A white space character is used between a command header and the
related argument. Optionally, a white space may consist of multiple
white sp
r. If the command is concatenated with other commands,
f a command header has multiple mnemonics, a colon (:)
antity, quality, restriction, or limit associated with the header.
parates arguments from each other.
omma is used between arguments of multiple-argument
ace characters.
the settings. Commands have the structure:
eader>[<Space><Argument>[<Comma> <Argument>]...]
[:]<H
A command header consists of one or more mnemonics arranged in a hierarchical
ee structure. The first mnemonic is the base or root of the tree and each
or tr
subsequent mnemonic is a level or branch off the previous one. Commands at a
higher level in the tree may affect those at a lower level. The leading colon (:)
always returns you to the base of the command tree.
You can specify a query command at any level within the command tree unless
otherwise noted. These branch queries return information about all the mnemonics
below the specified branch or level.
Use the HEADer command to control whether the instrument returns headers as
part of the query response. If header is on, the query response returns command
headers, then formats itself as a valid set command. When header is off, the
response includes only the values. This may make it easier to parse and e
information from the response. The table below shows the difference in responses.
Table 2-3: Comparison of Header Off and Header On Responses
QueryHeader OffHeader On
TIME?
ACQuire:NUMAVg?
he instrument to return status or setting information. Queries
xtract the
"14:30:00":TIME “14:30:00”
100
:ACQUIRE:NUMAVG 100
Clearing the instrument output queue
You can clear the Output Queue and reset the instrument a new command or query
by using the selected Device Clear (DCL) function.
Command Entry
The following rules apply when entering commands:
You can enter commands in upper or lower case.
You can precede any command with white space characters. White s pace
characters include any combination o f the ASCII control characters 00 through
09 and 0B through 20 hexadecimal (0 through 9 and 11 through 32 decimal).
The instrument ignores commands consisting of any combination of white
space characters and line feeds.
Abbreviating
You can abbreviate many instrument commands. Each command in this
documentation shows the minimum acceptable abbreviations in capitals. For
example, you can enter the command
or acq:numa.
ACQuire:NUMAvg simply as ACQ:NUMA
2 Series MSO Programmer Manual2-3
Command Syntax
Concatenating
Abbreviation r
ules may change over time as new instrument models are
introduced. Thus, for the most robust code, use the full spelling.
If you use the
EADer
H
command to have command headers included as part
of query responses, you can further control whether the returned headers are
abbreviated or are full-length with the
You c a n conc
atenate any combination of set commands and queries using a
VERBose command.
semicolon (;). The instrument executes concatenated commands in the order
received.
When concatenating commands and queries, you must follow these rules:
1. Separate
completely different headers by a semicolon and by the beginning
colon on all commands except the first one. For example, the commands
TRIGger:MODe NORMal and ACQuire:NUMAVg 8, can be concatenated
into the following single command:
TRIGger:MODe NORMal;:ACQuire:NUMAVg 8
2. If concatenated commands have headers that differ by only the last mnemonic,
you can abbreviate the second command and eliminate the beginning colon.
For example, you can concatenate the commands
ACQuire:MODe ENVelope
and ACQuire:NUMAVg 8 into a single command:
ACQuire:MODe ENVelope; NUMAVg 8
The longer version works equally well:
ACQuire:MODe ENVelope;:ACQuire:NUMAVg 8
3. Nev
er precede a star (*) command with a colon:
ACQuire:STATE 1;*OPC
Any commands that follow will be processed as if the star command was
not there so the commands,
ill set the acquisition mode to envelope and set the number of acquisitions
w
ACQuire:MODe ENVelope;*OPC;NUMAVg 8
for averaging to 8.
4. When you concatenate queries, the responses to all the queries are
concatenated into a single response message. For example, if the display
graticule is set to Full and the display style is set to dotsonly, the concatenated
query
DISplay:GRAticule?;STYle? will return the following.
If the header is on:
DISPLAY:GRATICULE FULL;:DISPLAY:STYLE DOTSONLY
Iftheheaderisoff:
2-42 Series MSO Programmer Manual
Command Syntax
FULL;DOTSONLY
1. Set commands and queries may be concatenated in the same message. For
example,
ACQuire:MODe SAMple;NUMAVg?;STATE?
is a valid message that sets the acquisition mode to sample. The message then
queries the number of acquisitions for averaging and the acquisition state.
Concatenat
ed commands and queries are executed in the order received.
Here are some invalid concatenations:
DISPlay:STYle DOTsonly OFF;ACQuire:NUMAVg 8 (no colon before
ACQuire)
DISPlay:GRAticule FULL;:STYle DOTSONLY OFF (extra colon before
STYle.
DISPlay:GRAticule FULL;:*TRG (colon before a star (*) command)
Terminating
This documentation uses <EOM> (End of Message) to represent a message
terminator.
Table 2-4: End of Message Terminator
Symb
<EOM
The end-of-message terminator must be the END message (EOI asserted
concurrently with the last data byte). The last data byte may be an ASCII line
feed (LF) character.
This instrument does not support ASCII LF only message termination. The
instrument always terminates outgoing messages with LF and EOI.
Constructed Mnemonics
Some header mnemonics specify one of a range of mnemonics. For example,
a channel mnemonic can be CH1, CH2, CH3, CH4, CH5, CH6, CH7, or CH8
depending on the number of FlexChannels in your instrument. You use these
mnemonics in the command just as you do any other mnemonic. For example,
there is a
command. In the command descriptions, this list of choices is abbreviated as
CH<x>.
ol
>
CH1:POSition command, and there is also a CH2:POSition
ing
Mean
Message terminator
Bus Mnemonics
Commands specify the bus to use as a mnemonic in the header.
2 Series MSO Programmer Manual2-5
Command Syntax
Channel Mnemonics
Cursor Position
Mnemonics
Table 2-5: Bus M
SymbolMeaning
B<x>
nemonics
A bus specifier; <x> is ≥1.
Commands specify the channel to use as a mnemonic in the header.
Table 2-6: Channel Mnemonics
SymbolMeaning
CH<x>A channel specifier; <x> is 1 through 8 and is limited by the number of
FlexChannels in your instrument.
When cursors are displayed, commands may specify which cursor of the pair to
use.
Table 2-7: Cursor Mnemonics
SymbolMeaning
CURSOR<x>
A cursor selector; <x> is m ust be 1 or 2.
Math Specifier Mnemonics
Measurement Specifier
Mnemonics
Reference Waveform
Mnemonics
Commands can specify the mathematical waveform to use as a mnemonic in
the header.
Table 2-8: Math Specifier Mnemonics
SymbolMeaning
MATH<x>
A math waveform specifier; <x> is ≥1.
Commands can specify which measurement to set or query as a mnemonic in
the header.
Table 2-9: Measurement Specifier Mnemonics
SymbolMeaning
MEAS<x>A measurement specifier; <x> is ≥1.
Commands can specify the reference waveform to use as a mnemonic in the
header.
Table 2-10: Reference Waveform Mnemonics
SymbolMeaning
REF<x>
A reference w aveform specifier; <x> is ≥1.
2-62 Series MSO Programmer Manual
Command Syntax
View Mnemonics
Search Mne
monics
Zoom Mnemonics
Commands can sp
ecify the view to use as a mnemonic in the header.
Table 2-11: Waveview Mnemonics
SymbolMeaning
WAVEView<x>
PLOTView<x>A plotview specifier; <x> must be equal to 1.
MATHFFTView<x>
A waveview specifier; <x> must be equal to 1.
A mathfftview specifier; <x> must be equal to 1.
Commands can specify a se arch to use as a mnemonic in the heade r.
Table 2-12: Search Mnemonics
SymbolMeaning
SEARCH<
Comman
x>
A Search
ds can specify a zoom to use as a mnemonic in the header.
specifier; <x> is ≥1.
Table 2-13: Zoom Mnemonics
Argument Types
Enumeration
Numeric
SymbolMeaning
ZOOM<x>A zoom specifier; <x> must be equal to 1.
Commands use arguments such as enumeration, numeric, quoted string and block.
h of these arguments are listed in detail below.
Eac
Enter these arguments as unquoted text words. Like key words, enumeration
arguments follow the same convention where the portion indicated in uppercase is
equired and that in lowercase is optional.
r
For example:
ACQuire:MODe SAMple
Many instrument commands require numeric arguments. The syntax shows the
format that the instrument returns in response to a query. This is also the preferred
format when sending the command to the instrument, though any of the formats
will be accepted. This documentation represents these arguments as described
below.
2 Series MSO Programmer Manual2-7
Command Syntax
Quoted String
Table 2-14: Num
SymbolMeaning
<NR1>
<NR2>Floating poi
<NR3>Floating point value with an exponent
<bin>
eric Arguments
Signed integer value
nt value without an exponent
Signed or unsigned integer in binary format
Most numeric arguments will be automatically forced to a valid setting, by either
rounding or truncating, when an invalid number is input, unless otherwise noted
in the command description.
Some commands accept or return data in the form of a quoted string, which is
simply a group of ASCII characters enclosed by a single quote (') or double quote
("). The following is an example of a quoted string:
string"
. This documentation represents these arguments as follows:
"This is a quoted
Table 2-15: Quoted String Argument
SymbolMeaning
<QString>Quoted string of ASCII text
ted string can include any character defined in the 7-bit ASCII character
A quo
set. Follow these rules when you use quoted strings:
Block
1. Use the same type of quote character to open and close the string. For
example:
"this is a valid string".
2. You can mix quotation marks within a string a s long as you follow the
previous rule. For example:
"this is an 'acceptable' string".
3. You can include a quote character within a string b y repeating the quote. For
example:
"here is a "" mark".
4. Strings can have upper or lower case characters.
5. A carriage return or line feed embedded in a quoted string does not terminate
the string. The return is treated as another character in the string.
6. The maximum length of a quoted string returned from a query is 1000
characters.
Here are some invalid strings:
"Invalid string argument' (quotes are not of the same type)
"test<EOI>" (termination character is embedded in the string)
Some commands use a block argument form to define a range or type of value,
as definedinthetablebelow.
2-82 Series MSO Programmer Manual
Command Syntax
Table 2-16: Blo
SymbolMeaning
<NZDig>
<Dig>
<DChar>A character with the hexadecimal equivalent of 00 through FF (0
<Block>
ck Argument
A nonzero digit character in the range of 1–9
A digit character, in the range of 0–9
through 255 decimal)
A block of data bytes defined as: <Block> ::=
{#<NZDig>
<NZDig> specifies the number of <Dig> elements that follow. Taken together,
the <NZDig> and <Dig> elements form a decimal integer that specifies how
many <DChar> elements follow.
2 Series MSO Programmer Manual2-9
Command Syntax
2-102 Series MSO Programmer Manual
Loading...
+ 761 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.