Tektronix MSO22, MSO24 Programmer Manual

xx
2 Series Mixed Signal Oscilloscope
ZZZ
MSO22, MSO24
Programmer Manual
*P077177601*
077-1776-01
xx
2 Series Mixed Signal Oscilloscope
ZZZ
MSO22, MSO24
Supports FW version 1.42.5 and above
www.tek.com
077-1776-01
Copyright © Tektronix. All rights reserved. Licensed software products are owned by Tektronix or its subsidiaries or suppliers, and are protected by national copyright laws and international treaty provisions.
Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication supersedes that in all previously published material. Specications 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 nd contacts in your area.
Table of Contents
Preface .............................................................................................................. iii
Getting Started . ..... . ..... . ..... . ..... . ... . . . .... . ..... . ..... . ..... . ..... . ..... . ..... . ... . . ..... . ..... . ..... . ..... 1-1
Setting Up Remote Communications Hardware . ..... . .... . ..... . ..... . ... . . . .... . ..... . ..... . ... . . ..... 1-1
Ethernet .................................................................................................. 1-1
USB....................................................................................................... 1-1
Setting Up Remote Communications Software . .... . ..... . ..... . ..... . ..... . .... . ..... . ..... . ..... . ... . . 1-2
Using VISA... ................................ ................................ ........................... 1-2
Using a Socket Server .................................................................................. 1-3
Documentation ....................... ................................ .................................. . 1-5
Dynamic programmatic interface .......................................................................... 1-5
Implicit activation ........................................................................................... 1-5
Creating, deleting, and listing dynamic instances ............................. ........................... 1-6
Backwards Compatibility ..... . ..... . ..... . ..... . ..... . .... . . .... . ..... . ..... . ..... . ..... . ..... . .... . ..... . . 1-6
Command Syntax.......................................... ................................ ....................... 2-1
Command and Query Structure ............................................................................ 2-1
Clearing the instrument output queue ............................ .................................. ....... 2-3
Command Entry.............................................................................................. 2-3
Constructed Mnemonics .................................................................................... 2-5
Argument Types......... ................................ .................................. ................... 2-7
Command groups...................... ................................ ................................ ......... 2-11
Acquisition command group . ..... . ..... . ... . . ..... . ..... . ..... . ..... . ... . . . .... . ..... . ..... . ..... . ..... . 2-11
Act On Event command group.. ................................ ................................ ......... 2-11
AFG Command Group.................................................................................... 2-13
Alias command group ..................................................................................... 2-14
Battery command group................................................................................... 2-14
Bus command group.......................................... .................................. ........... 2-15
Calibration command group....... .................................. ................................ ..... 2-19
Callouts command group ............................ .................................. ................... 2-20
Cursor command group .. ................................ ................................ ................. 2-21
Digital command group ................ .................................. ................................ . 2-26
Display control command group......................................................................... 2-27
Ethernet Command Group................................................................................ 2-30
File system command group.............................................................................. 2-31
Horizontal command group.... ................................ ................................ ........... 2-33
Mask command group.................. .................................. ................................ . 2-34
Math command group .......... .................................. ................................ ......... 2-35
Measurement command group ........................................................................... 2-37
Miscellaneous command group .......................................................................... 2-47
Pattern Generator group................ .................................. ................................ . 2-50
2 Series MSO Programmer Manual i
Table of Contents
Plot command gr
Save and Recall command group ........................................................................ 2-52
Save On command Group ................................................................................ 2-53
Search and Mark command group ....................................................................... 2-54
Self Test command group.... .................................. ................................ ........... 2-60
Status and Error command group........................................................................ 2-61
Trigger com
Vertical command group .................................................................................. 2-66
Waveform Transfer command group .................................................................... 2-68
Zoom command group .................................................................................... 2-72
Commands listed in alphabetical order.......................................... ............................. 2-73
Status and Events ................................................................................................. 3-1
Registe
Queues ........................................................................................................ 3-4
Event Handling Sequence................................................................................... 3-5
Synchronization Methods............................ ................................ ....................... 3-5
Appendix A: Character Set..................................................................................... A-1
Appendix B: Reserved Words.................................................................................. B-1
Appe
Default Setup ............................ ................................ ................................ .... C-1
Appendix D: Waveform Transfer (WFMOutpre and CURVe Query) Examples ......................... D-1
Example 1: Analog Waveform (Channels 1–4) ................. ................................ ........ D-1
Example 2: Digital Waveform ............................................................................ D-3
Example 3: Digital with 4 Bytes Per Point and Zoom Off............................................. D-5
Ex
Example 5: Digital with 4 Bytes Per Point and Zoom On ....... .................................. .. D-10
Example 6: RF Frequency Domain Waveform............................................ ............ D-12
Example 7: Baseband IQ Waveform ..................... ................................ .............. D-14
Appendix E: Search and Trigger Command Sequence Examples........................ .................. E-1
Example 1: Single Threshold Edge Search ................................ .............................. E-1
Example 2: Single Threshold Edge Trigger ..... ................................ ........................ E-1
Example 3: Dual Threshold Runt Search ........ ................................ ........................ E-2
Example 4: Single Threshold Logic Search on Three Waveforms.................................... E-3
Glossary
Index
rs ...................................................................................................... 3-1
ndix C: Factory Defaults ................................................................................. C-1
ample 4: Digital with 8 Bytes Per Point and Zoom Off ............................................. D-7
oup ......................... ................................ ............................. 2-51
mand group ........................... .................................. ..................... 2-62
ii 2 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 signicant 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 specications 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 Manual iii
Preface
iv 2 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 IP address 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 Manual 1-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 specication. 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 congures 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 conguration 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
Parameter Value
Manufacturer ID 0x0699 (decimal 1689)
Product ID 0x105
(You can s end the USBTMC: query to read the value)
Serial number Serial 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-2 2 Series MSO Programmer Manual
Getting Started
1. Load the VISA dr as OpenChoice Desktop. You will nd the drivers and OpenChoice Desktop software on the appropriate CD that comes with your instrument or at the Tektronix software nder 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 ash 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 Manual 1-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 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 nd 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-4 2 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 specied
adds all relevant commands and queries to the set of recognized commands
responds to the command or query
2 Series MSO Programmer Manual 1-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 simplied, 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 dene custom command processing to improve
1-6 2 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.
Legacy oscilloscope command
:BUS:B<n>:CAN:BITRate:VALue :BUS:B<n>:CAN:BITRate:CUSTom
:BUS:B<n>:CAN:FD:BITRate:VALue :BUS:B<n>:CAN:FD:BITRate:CUSTom
:MEASUrement:MEAS<n>:EDGEQUALier :MEASUrement:MEAS<n>:SOUrce<n>
:MEASUrement:MEAS<n>:ACQTime :MEASUrement:MEAS<n>:WAITTime
:DPOJET:GATing :MEASUrement:MEAS<n>:GATing
:BUS:B<n>:I2C:SCLk:SOUrce :BUS:B<n>:I2C:CLOCk:SOUrce
:BUS:B<n>:I2C:ADDRess:RWINClude :BUS:B<n>:I2C:DATa:SOUrce
:MEASUrement:MEAS<n>:FUNDAMENTALFreq :MEASUrement:MEAS<n>:FREQ
:BUS:B<n>:LIN:VALue :BUS:B<n>:LIN:BITRate:CUSTom
:MATH:MATH<n>:SPECTral:UNWRap :MATH:MATH<n>:SPECTral:WRAP:STATE
:MATH:MATH<n>:SPECTral:UNWRap:DEGrees :MATH:MATH<n>:SPECTral:WRAP:DEGrees
:DPOJET:INTERp :MEASUrement:INTERp
:BUS:B<n>:RS232C:TX:SOUrce :BUS:B<n>:RS232C:SOUrce
:BUS:B<n>:RS232C:TX:SOUrce:THReshold :BUS:B<n>:RS232C:SOUrce:THReshold
2 Series MSO command alias
:BUS:B<n>:SPI:SCLk:SOUrce :BUS:B<n>:SPI:CLOCk:SOUrce
:BUS:B<n>:SPI:MOSi:INPut :BUS:B<n>:SPI:DATa:SOUrce
:BUS:B<n>:SPI:SS:SOUrce :BUS:B<n>:SPI:SELect:SOUrce
:BUS:B<n>:SPI:MOSi:THReshold :BUS:B<n>:SPI:DATa:THReshold
:BUS:B<n>:SPI:SCLk:POLarity :BUS:B<n>:SPI:CLOCk:POLarity
:BUS:B<n>:SPI:MOSi:DATa:POLarity :BUS:B<n>:SPI:DATa:POLarity
:BUS:B<n>:SPI:SS:POLarity :BUS:B<n>:SPI:SELect:POLarity
:TRIGger:A:BUS:B<n>:SPI:DATa:IN:VALue
:TRIGger:A:BUS:B<n>:SPI:DATa:MISO:VALue
:TRIGger:A:BUS:B<n>:SPI:DATa:OUT:VALue
:TRIGger:A:BUS:B<n>:SPI:DATa:MOSI:VALue"
:MEASUrement:MEAS<n>:DELay:DIREction :MEASUrement:MEAS<n>:TOEDGESEARCHDIRec
:MATH:MATH<n>:POSITION :DISplay:WAVEView<n>:MATH:MATH<n>:VERTical:POSition
:MATH:MATH<n>:SCAle :DISplay:WAVEView<n>:MATH:MATH<n>:VERTical:SCAle
:REF:REF<n>:POSITION :DISplay:WAVEView<n>:REF:REF<n>:VERTical:POSition
:REF:REF<n>:SCAle :DISplay:WAVEView<n>:REF:REF<n>:VERTical:SCAle
CH<x>:YUNits CH<x>:PROBEFunc:EXTUnits
:TRIGger:A:BUS:B<n>:SPI:DATa:VALue
2 Series MSO Programmer Manual 1-7
Getting Started
:CURSor:VBArs:POSITIONA
:CURSor:VBArs:POSA"
:CURSor:VBA
:CURSor:VBArs:POSB"
:CURSor:HBArs:POSITIONA :DISplay:WAVEView<n>:CURSor:CURSOR:HBArs:APOSition
:CURSor:H
:CURSor:SCREEN:XPOSITIONA :DISplay:WAVEView<n>:CURSor:CURSOR:SCREEN:AXPOSition
:CURSor:SCREEN:XPOSITIONB :DISplay:WAVEView<n>:CURSor:CURSOR:SCREEN:BXPOSition
:CURSor
:CURSor:SCREEN:YPOSITIONB :DISplay:WAVEView<n>:CURSor:CURSOR:SCREEN:BYPOSition
:CURSor:WAVEform:POSITIONA :DISplay:WAVEView<n>:CURSor:CURSOR:WAVEform:APOSition
:CURS
:CURSor:SOURCEA :DISplay:WAVEView<n>:CURSor:CURSOR:ASOUrce
:CURSor:SOURCEB :DISplay:WAVEView<n>:CURSor:CURSOR:BSOUrce
RSor:VBArs:UNIts
:CU
:CURSor:HBArs:UNITA :DISplay:WAVEView<n>:CURSor:CURSOR:HBArs:AUNIts
:CURSor:HBArs:UNITA
rs:POSITIONB
BArs:POSITIONB
:SCREEN:YPOSITIONA
or:WAVEform:POSITIONB
:DISplay:WAVEView<n>:CURSor:CURSOR:VBArs:APOSition
:DISplay:WA
:DISplay:
:DISpla
:DISp
Splay:WAVEView<n>:CURSor:CURSOR:VBArs:UNIts
:DI
:DISplay:WAVEView<n>:CURSor:CURSOR:HBArs:AUNIts
VEView<n>:CURSor:CURSOR:VBArs:BPOSition
WAVEView<n>:CURSor:CURSOR:HBArs:BPOSition
y:WAVEView<n>:CURSor:CURSOR:SCREEN:AYPOSition
lay:WAVEView<n>:CURSor:CURSOR:WAVEform:BPOSition
CURSor:HBArs:UNIts
:
:CURSor:HBArs:UNITB :DISplay:WAVEView<n>:CURSor:CURSOR:HBArs:BUNIts
:CURSor:VBArs:ALTERNATEA :DISplay:WAVEView<n>:CURSor:CURSOR:VBArs:ALTERNATEA
:CURSor:VBArs:ALTERNATEB :DISplay:WAVEView<n>:CURSor:CURSOR:VBArs:ALTERNATEB
:CURSor:VBArs:DELTa :DISplay:WAVEView<n>:CURSor:CURSOR:VBArs:DELTa
:CURSor:WAVEform:HDELTa"
:CURSor:HBArs:DELTa
:CURSor:WAVEform:VDELTa"
:CURSor:VBArs:DELTa
:CURSor:DDT :DISplay:WAVEView<n>:CURSor:CURSOR :D DT
:CURSor:ONEOVERDELTATVALUE :DISplay:WAVEView<n>:CURSor:CURSOR:ONEOVERDELTATVALUE
:CURSor:FUNCtion :DISplay:WAVEView<n>:CURSor:CURSOR :FU N Ction
:CURSor:STATE
:CURSor:CURSOR:STATE"
:CURSor:MODe :DISplay:WAVEView<n>:CURSor:CURS OR :MOD e
:BUS:B<n>:POSition :DISplay:WAVEView<n>:BUS:B<n>:VERTical:POSition
:DISplay:WAVEView<n>:CURSor:CURSOR:HBArs:DELTa
:DISplay:WAVEView<n>:CURSor:CURSOR:VBArs:DELTa
:DISplay:WAVEView<n>:CURSor:CURSOR:STATE
1-8 2 Series MSO Programmer Manual
Getting Started
:ZOOm:HORizontal:POSition
:ZOOm:ZOOM<n>:HORizontal:POSition"
:ZOOm:HORiz
:ZOOm:ZOOM<n>:HORizontal:SCALe"
:ZOOm:VERTical:POSition
:ZOOm:ZOO
:ZOOm:VERTical:SCALe
:ZOOm:ZOOM<n>:VERTical:SCALe"
:ZOOm:S
:ZOOm:ZOOM<n>:STATe"
:BUS:B<n>:STATE :DISplay:GLObal:B<n>:STATE
CH1:S
:MATH:MATH<n>:STATE :DISplay:GLObal:MATH<n>:STATE
:REF:REF<n>:STATE :DISplay:GLObal:REF<n>:STATE
M:REM<n>:STATE
:RE
:PLOT:PLOT<n>:STATE :DISplay:GLObal:PLOT<n>:STATE
:DISplay:INTENSITy:WAVEform(:ANALYsis|:FASTAcq) :DISplay:WAVEView<n>:INTENSITy:WAVEform
ontal:SCALe
M<n>:VERTical:POSition"
TATe
TATE
:DISplay:WAVEView<n>:ZOOM:ZOOM<n>:HORizontal:POSition
:DISplay:WA
:DISplay:WAVEView<n>:ZOOM:ZOOM<n>:VERTical:POSition
:DISplay:WAVEView<n>:ZOOM:ZOOM<n>:VERTical:SCALe
:DISpla
DISpl
Splay:GLObal:REM<n>:STATE
:DI
VEView<n>:ZOOM:ZOOM<n>:HORizontal:SCALe
y:WAVEView<n>:ZOOM:ZOOM<n>:STATe
ay:GLObal:CH1:STATE
DISplay:INTENSITy:GRATicule
:
:DISplay:STYle :DISplay:WAVEView<n>:STYle
:DISplay:GRAticule :DISplay:WAVEView<n>:GRAticule
:DISplay:FILTer :DISplay:WAVEView<n>:FILTer
:DISplay:VIEWStyle :DISplay:WAVEView<n>:VIEWStyle
:HORizontal:DELay:POSition
:HORizontal:MAIn:POSition"
:HORizontal:DELay:POSition
:HORizontal:MODe:SCAle
:HORizontal:SECdiv
:HORizontal:MAIn:SCAle
:HORizontal:MAIn:SECdiv
:HORizontal:DELay:SCAle
:HORizontal:DELay:SECdiv"
:HORizontal:MAIn:UNIts:STRing :HORizontal:MAIn:UNIts
:HORizontal:DELay:STATE
:HORizontal:MAIn:DELay:MODe"
DISplay:WAVEView<n>:INTENSITy:GRATicule
:
:HORizontal:POSition
:HORizontal:SCAle
:HORizontal:DELay:MODe
2 Series MSO Programmer Manual 1-9
Getting Started
:HORizontal:DELay:TIMe(:RUNSAfter|:TRIGAfter)
:HORizontal:MAIn:DELay:TIMe"
:CH1:VOLTS CH1:SCAle
:HORizontal:MODe:SAMPLERate
:HORizontal:MAIn:SAMPLERate
:HORizont
:HORizontal:DIGital:SAMPLERate:MAIn"
:HORizontal:MODe:RECOrdlength
:HORizo
:HORizontal:DIGital:RECOrdlength
:HORizontal:DIGital:RECOrdlength:MAIn
:HORi
:CH<X>:AMPSViavolts:ENABle :CH<X>:PROBEFunc:EXTUnits:STATE
:CH<X>:AMPSViavolts:FACTor :CH<X>:SCALERATio
:SA
:SAVEON:WAVEform:SOURce :SAVEONEVent:WAVEform:SOUrce
:SAVEON:IMAGe:FILEFormat :SAVEONEVent:IMAGe:FILEFormat
al:DIGital:SAMPLERate
ntal:RESOlution
zontal:ACQLENGTH"
VEON:WAVEform:FILEFormat
:HORizontal:DELay:TIMe
:HORizontal:SAMPLERate
:HORizontal:RECOrdlengt
VEONEVent:WAVEform:FILEFormat
:SA
SAVEON:FILE:NAME
:
:SAVEON:FILE:NAME :SAVEONEVent:FILEName
:TRIGger:A:PULse:WIDth:WHEn :TRIGger:A:PULSEWidth:WHEn
:TRIGger:A:PULse:WIDth:POLarity :TRIGger:A:PULSEWidth:POLarity
:TRIGger:A:PULse:WIDth:HIGHLimit :TRIGger:A:PULSEWidth:HIGHLimit
:TRIGger:A:PULse:WIDth:LOWLimit
:TRIGger:A:PULSEWidth:WIDth"
:TRIGger:A:PULse:RUNT:WHEn :TRIGger:A:RUNT:WHEn
:TRIGger:A:PULse:RUNT:POLarity :TRIGger:A:RUNT:POLarity
:TRIGger:A:PULse:RUNT:WIDth :TRIGger:A:RUNT:WIDth
:TRIGger:A:PULse:TIMEOut:POLarity :TRIGger:A:TIMEOut:POLarity
:TRIGger:A:PULse:TIMEOut:TIMe :TRIGger:A:TIMEOut:TIMe
:TRIGger:A:RISEFall:SOUrce :TRIGger:A:TRANsition:SOUrce
:TRIGger:A:RISEFall:WHEn
:TRIGger:A:PULse:TRANsition:WHEn"
:TRIGger:A:RISEFall:WHEn
:TRIGger:A:PULse:TRANsition:WHEn"
SAVEONEVent:FILEName
:
:TRIGger:A:PULSEWidth:LOWLimit
:TRIGger:A:TRANsition:WHEn
:TRIGger:A:TRANsition:WHEn
1-10 2 Series MSO Programmer Manual
Getting Started
:TRIGger:A:RISEFall:POLarity
:TRIGger:A:PULse:TRANsition:POLarity"
:TRIGger:A:
:TRIGger:A:PULse:TRANsition:POLarity"
:TRIGger:A:RISEFall:DELTatime
:TRIGger:
:TRIGger:A:RISEFall:DELTatime
:TRIGger:A:PULse:TRANsition:DELTatime"
:TRIGge
:TRIGger:A:LOGIc:SETHold:CLOCk:EDGE :TRIGger:A:SET H old:C LOC k:ED GE
:TRIGger:A:LOGIc:SETHold:SETTime :TRIGger:A:SETHold:SETTime
:TRIG
:TRIGger:A:LOGIc:PATtern:WHEn :TRIGger:A:LOGIc:WHEn
:TRIGger:A:LOGIc:PATtern:DELTatime :TRIGger:A:LOGIc:DELTatime
IGger:A:LOGIc:STATE:CLOck:SOUrce
:TR
:TRIGger:A:LOGIc:INPut:CLOCk:EDGE :TRIGger:A:LOGIc:POLarity
:TRIGger:A:BUS:B<n>:CAN:ADDRess:MODe :TRIGger:A:BUS:B<n>:CAN:IDentier:MODe
RISEFall:POLarity
A:PULse:TRANsition:DELTatime"
r:A:LOGIc:SETHold:CLOCk:SOUrce
ger:A:LOGIc:SETHold:HOLDTime
:TRIGger:A:TRANsition:POLarity
:TRIGger:A:
:TRIGger:A:TRANsition:DELTatime
:TRIGger:A:TRANsition:DELTatime
:TRIGge
:TRIG
IGger:A:LOGIc:INPut:CLOCk:SOUrce
:TR
TRANsition:POLarity
r:A:SETHold:CLOCk:SOUrce
ger:A:SETHold:HOLDTime
TRIGger:A:BUS:B<n>:CAN:ADDRess:VALue
:
:TRIGger:A:BUS:B<n>:PARallel:VALue :TRIGger:A:BUS:B<n>:PARallel:DATa:VALue
:TRIGger:A:BUS:B<n>:RS232C:RX:DATa:VALue :TRIGger:A:BUS:B<n>:RS232C:DATa:VALue
:TRIGger:A:BUS:B<n>:RS232C:RX:DATa:VALue :TRIGger:A:BUS:B<n>:RS232C:DATa:VALue
:TRIGger:A:BUS:B<n>:RS232C:RX:DATa:SIZe :TRIGger:A:BUS:B<n>:RS232C:DATa:SIZe
TRIGger:A:BUS:B<n>:CAN:IDentier:VALue
:
2 Series MSO Programmer Manual 1-11
Getting Started
1-12 2 Series MSO Programmer Manual
Command Syntax
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 specic 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
Symbol Meaning
<>
=
| 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 specic 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.
Dened element
Is dened 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 Manual 2-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 ve element types, dened in the following table.
Command Syntax
Commands
Table 2-2: Comm
Symbol Meaning
<Header>
<Mnemonic>
<Argument
<Comma> A single c
<Space>
Comman
>
ds cause the instrument to perform a specic 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 rst 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.
2-2 2 Series MSO Programmer Manual
Command Syntax
Queries
Headers
Queries cause t have the structure:
[:]<Header>
[:]<Header>[<Space><Argument> [<Comma><Argument>]...]
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 specied 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
Query Header Off Header 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 Manual 2-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 rst 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-4 2 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 Manual 2-5
Command Syntax
Channel Mnemonics
Cursor Position
Mnemonics
Table 2-5: Bus M
Symbol Meaning
B<x>
nemonics
A bus specier; <x> is 1.
Commands specify the channel to use as a mnemonic in the header.
Table 2-6: Channel Mnemonics
Symbol Meaning
CH<x> A channel specier; <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
Symbol Meaning
CURSOR<x>
A cursor selector; <x> is m ust be 1 or 2.
Math Specier Mnemonics
Measurement Specier
Mnemonics
Reference Waveform
Mnemonics
Commands can specify the mathematical waveform to use as a mnemonic in the header.
Table 2-8: Math Specier Mnemonics
Symbol Meaning
MATH<x>
A math waveform specier; <x> is 1.
Commands can specify which measurement to set or query as a mnemonic in the header.
Table 2-9: Measurement Specier Mnemonics
Symbol Meaning
MEAS<x> A measurement specier; <x> is 1.
Commands can specify the reference waveform to use as a mnemonic in the header.
Table 2-10: Reference Waveform Mnemonics
Symbol Meaning
REF<x>
A reference w aveform specier; <x> is 1.
2-6 2 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
Symbol Meaning
WAVEView<x>
PLOTView<x> A plotview specier; <x> must be equal to 1.
MATHFFTView<x>
A waveview specier; <x> must be equal to 1.
A mathfftview specier; <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
Symbol Meaning
SEARCH<
Comman
x>
A Search
ds can specify a zoom to use as a mnemonic in the header.
specier; <x> is 1.
Table 2-13: Zoom Mnemonics
Argument Types
Enumeration
Numeric
Symbol Meaning
ZOOM<x> A zoom specier; <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 Manual 2-7
Command Syntax
Quoted String
Table 2-14: Num
Symbol Meaning
<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
Symbol Meaning
<QString> Quoted string of ASCII text
ted string can include any character dened 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 dene a range or type of value, as denedinthetablebelow.
2-8 2 Series MSO Programmer Manual
Command Syntax
Table 2-16: Blo
Symbol Meaning
<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 dened as: <Block> ::= {#<NZDig>
<Dig>[<Dig>...][<DChar>...]|#0[<DChar>...]<terminator>}
<NZDig> species the number of <Dig> elements that follow. Taken together, the <NZDig> and <Dig> elements form a decimal integer that species how many <DChar> elements follow.
2 Series MSO Programmer Manual 2-9
Command Syntax
2-10 2 Series MSO Programmer Manual
+ 761 hidden pages