TBS2000B Series
Digital Oscilloscopes
Programmer Manual
*P077114903*
077-1149-03
TBS2000B Series
Digital Oscilloscopes
Programmer Manual
www.tek.com
077-1149-03
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. Specifications and price change privileges reserved.
TEKTRONIX and TEK are registered trademarks of Tektronix, Inc.
Contacting Tektronix
Tektronix, Inc.
14150 SW Karl Braun Drive
P.O. Box 500
Beaverton, OR 97077
USA
For product information, sales, service, and technical support:
■
In North America, call 1-800-833-9200.
■
Worldwide, visit www.tek.com to find contacts in your area.
Table of Contents
TBS2000B Series Programmer Manual ............................................................................................ 0
Getting Started
Setting Up Remote Communications Software .............................................................................. 1
Using a Socket Server ............................................................................................................... 1
Command Syntax
Command Syntax ........................................................................................................................... 3
Command and Query Structure ...................................................................................................... 4
Commands ................................................................................................................................. 5
Queries ....................................................................................................................................... 5
Headers in Query Responses ..................................................................................................... 6
Clearing the Output Queue ........................................................................................................ 6
Command Entry .............................................................................................................................. 6
Abbreviating Commands ........................................................................................................... 7
Concatenating Commands ......................................................................................................... 7
Message Terminators ................................................................................................................ 8
Constructed Mnemonics ................................................................................................................. 9
Reference Waveform Mnemonics ............................................................................................. 9
Waveform Mnemonics .............................................................................................................. 9
Cursor Position Mnemonic ...................................................................................................... 10
Measurement Specifier Mnemonics ........................................................................................ 10
Argument Types ........................................................................................................................... 10
Numeric Arguments ................................................................................................................ 10
Quoted String Arguments ........................................................................................................ 11
Block Arguments ..................................................................................................................... 11
Command groups
Alias command group ................................................................................................................... 13
Acquisition command group ........................................................................................................ 14
Calibration and Diagnostic command group ................................................................................ 14
Cursor command group ................................................................................................................ 15
Display command group ............................................................................................................... 16
Ethernet command group .............................................................................................................. 17
FFT command group .................................................................................................................... 18
TBS2000B Series Programmer Manual i
Table of Contents
File system command group ......................................................................................................... 18
Help everywhere command group ................................................................................................ 19
Horizontal command group .......................................................................................................... 20
Mark command group .................................................................................................................. 21
Math command group ................................................................................................................... 22
Measurement command group ..................................................................................................... 23
Miscellaneous command group .................................................................................................... 25
Save and Recall command group ................................................................................................. 27
Search command group ................................................................................................................ 28
Status and Error command group ................................................................................................. 29
Trigger command group ............................................................................................................... 30
Vertical command group .............................................................................................................. 32
Waveform command group .......................................................................................................... 34
Zoom command group .................................................................................................................. 39
A commands
ACQuire? ...................................................................................................................................... 41
ACQuire:MAXSamplerate? ......................................................................................................... 42
ACQuire:MODe ........................................................................................................................... 42
ACQuire:NUMACq? .................................................................................................................... 44
ACQuire:NUMAVg ..................................................................................................................... 45
ACQuire:STATE .......................................................................................................................... 45
ACQuire:STOPAfter .................................................................................................................... 46
ALIas ............................................................................................................................................ 47
ALIas:CATalog? .......................................................................................................................... 48
ALIas:DEFine ............................................................................................................................... 49
ALIas:DELEte .............................................................................................................................. 50
ALIas:DELEte:ALL ..................................................................................................................... 50
ALIas:DELEte[:NAMe] ............................................................................................................... 51
ALIas[:STATE] ............................................................................................................................ 51
ALLEv? ........................................................................................................................................ 52
AUTOSet ...................................................................................................................................... 53
AUTOSet:ENABLE ..................................................................................................................... 53
B commands
BUSY? .......................................................................................................................................... 55
C commands
ii TBS2000B Series Programmer Manual
*CAL? .......................................................................................................................................... 57
CALibrate:INTERNAL ................................................................................................................ 58
CALibrate:INTERNal:STARt ...................................................................................................... 58
CALibrate:INTERNal:STATus? .................................................................................................. 59
CALibrate:RESults? ..................................................................................................................... 60
CALibrate:RESults:SPC? ............................................................................................................ 60
CH<x>? ........................................................................................................................................ 61
CH<x>:AMPSVIAVOLTs:ENABLe ........................................................................................... 62
CH<x>:AMPSVIAVOLTs :Factor ............................................................................................... 63
CH<x>:BANdwidth ..................................................................................................................... 63
CH<x>:COUPling ........................................................................................................................ 64
CH<x>:DESKew .......................................................................................................................... 65
CH<x>:INVert .............................................................................................................................. 66
CH<x>:LABel .............................................................................................................................. 66
CH<x>:OFFSet ............................................................................................................................. 67
CH<x>:POSition .......................................................................................................................... 68
CH<x>:PRObe ............................................................................................................................. 69
CH<x>:PRObe:AUTOZero .......................................................................................................... 70
CH<x>:PRObe:DEGAUss ........................................................................................................... 70
CH<x>:PRObe:DEGAUss:STATE? ............................................................................................ 71
CH<x>:PRObe:FORCEDRange .................................................................................................. 72
CH<x>:PRObe:GAIN ................................................................................................................. 73
CH<x>:PRObe:ID? ...................................................................................................................... 74
CH<x>:PRObe:ID:SERnumber? .................................................................................................. 74
CH<x>:PRObe:ID:TYPE? ........................................................................................................... 75
CH<x>:PRObe:SIGnal ................................................................................................................. 75
CH<x>:PRObe:UNIts? ................................................................................................................. 76
CH<x>:SCAle .............................................................................................................................. 76
CH<x>:VOLts .............................................................................................................................. 77
CH<x>:YUNit .............................................................................................................................. 78
CLEARMenu ................................................................................................................................ 79
*CLS ............................................................................................................................................. 79
CURSor? ....................................................................................................................................... 80
CURSor:ENABLE ........................................................................................................................ 81
CURSor:FUNCtion ...................................................................................................................... 82
CURSor:HBArs? .......................................................................................................................... 83
CURSor:HBArs:DELTa? ............................................................................................................. 83
CURSor:HBArs:POSITION<x> .................................................................................................. 84
CURSor:HBArs:UNIts ................................................................................................................. 85
Table of Contents
TBS2000B Series Programmer Manual iii
Table of Contents
CURSor:HBArs:USE ................................................................................................................... 85
CURSor:MODe ............................................................................................................................ 86
CURSor:VBArs? .......................................................................................................................... 87
CURSor:VBArs:ALTERNATE<x>? ........................................................................................... 87
CURSor:VBArs:DELTa? ............................................................................................................. 88
CURSor:VBArs:HPOS<x>? ........................................................................................................ 89
CURSor:VBArs:POSITION<x> .................................................................................................. 89
CURSor:VBArs:UNIts ................................................................................................................. 90
CURSor:VBArs:VDELTa? .......................................................................................................... 91
CURVe ......................................................................................................................................... 92
D commands
DATa ............................................................................................................................................ 95
DATa:DESTination ...................................................................................................................... 96
DATa:SOUrce .............................................................................................................................. 97
DATa:STARt ................................................................................................................................ 98
DATa:STOP ................................................................................................................................. 99
DATa:WIDth .............................................................................................................................. 100
DATE .......................................................................................................................................... 101
DESE .......................................................................................................................................... 102
DIAg:FAN .................................................................................................................................. 103
DIAg:LOOP:OPTion .................................................................................................................. 103
DIAg:LOOP:OPTion:NTIMes ................................................................................................... 104
DIAg:LOOP:STOP .................................................................................................................... 104
DIAg:RESUlt:FLAg? ................................................................................................................. 105
DIAg:RESUlt:LOG? .................................................................................................................. 105
DIAg:SELect .............................................................................................................................. 106
DIAg:SELect:<function> ........................................................................................................... 107
DIAg:STATE .............................................................................................................................. 107
DIAg:TEMPVAL ....................................................................................................................... 108
DISplay:GRAticule .................................................................................................................... 108
DISplay:INTENSITy:BACKLight ............................................................................................. 109
DISplay:PERSistence:STATe ................................................................................................... 110
DISplay:PERSistence:VALUe .................................................................................................. 110
E commands
ERRLOG:FIRST? ...................................................................................................................... 113
ERRLOG:NEXT? ....................................................................................................................... 113
iv TBS2000B Series Programmer Manual
*ESE ........................................................................................................................................... 114
*ESR? ......................................................................................................................................... 115
ETHERnet:DHCPbootp .............................................................................................................. 116
ETHERnet:DNS:IPADDress ...................................................................................................... 117
ETHERnet:DOMAINname ........................................................................................................ 117
ETHERnet:ENET:ADDress? ..................................................................................................... 118
ETHERnet:GATEWay:IPADDress ............................................................................................ 118
ETHERnet:HTTPPort ................................................................................................................. 119
ETHERnet:IPADDress ............................................................................................................... 120
ETHERnet:NAME ...................................................................................................................... 120
ETHERnet:PASSWord ............................................................................................................... 121
ETHERnet:PING ........................................................................................................................ 121
ETHERnet:PING:STATUS? ...................................................................................................... 122
ETHERnet:SUBNETMask ......................................................................................................... 123
EVENT? ..................................................................................................................................... 123
EVMsg? ...................................................................................................................................... 124
EVQty? ....................................................................................................................................... 125
Table of Contents
F commands
FACtory ...................................................................................................................................... 127
FEAEN:PASSWORD ................................................................................................................ 128
FFT? ............................................................................................................................................ 129
FFT:HORizontal:POSition ......................................................................................................... 129
FFT:HORizontal:SCAle ............................................................................................................. 130
FFT:SOURce .............................................................................................................................. 130
FFT:SRCWFM ........................................................................................................................... 131
FFT:VERTical:POSition ............................................................................................................ 132
FFT:VERTical:SCAle ................................................................................................................ 132
FFT:VERTical:UNIts ................................................................................................................. 133
FFT:VType ................................................................................................................................. 133
FFT:WINdow ............................................................................................................................. 134
FILESystem? .............................................................................................................................. 134
FILESystem:CWD ...................................................................................................................... 135
FILESystem:DELEte .................................................................................................................. 136
FILESystem:DIR? ...................................................................................................................... 137
FILESystem:FORMat ................................................................................................................. 138
FILESystem:FREESpace? .......................................................................................................... 138
FILESystem:MKDir ................................................................................................................... 139
FILESystem:READFile .............................................................................................................. 140
TBS2000B Series Programmer Manual v
Table of Contents
FILESystem:REName ................................................................................................................ 140
FILESystem:RMDir ................................................................................................................... 141
FILESystem:WRITEFile ............................................................................................................ 142
FPAnel:PRESS ........................................................................................................................... 143
FPAnel:TURN ............................................................................................................................ 145
FWUpdate:Update ...................................................................................................................... 146
H commands
HDR ............................................................................................................................................ 147
HEADer ...................................................................................................................................... 147
HELPevery:ACQuire .................................................................................................................. 148
HELPevery:ALL ........................................................................................................................ 149
HELPevery:CURsor ................................................................................................................... 149
HELPevery:FFT ......................................................................................................................... 150
HELPevery:MATH .................................................................................................................... 150
HELPevery:MEASUrement ....................................................................................................... 151
HELPevery:REFerence .............................................................................................................. 152
HELPevery:SEARCH ................................................................................................................ 152
HELPevery:TRIGger .................................................................................................................. 153
HELPevery:UTIlity .................................................................................................................... 154
HELPevery:VERtical ................................................................................................................. 154
HORizontal? ............................................................................................................................... 155
HORizontal:ACQLENGTH ....................................................................................................... 156
HORizontal:DIVisions ............................................................................................................... 156
HORizontal[:MAIn][:DELay]:POSition .................................................................................... 157
HORizontal:MAIn:DELay:MODe ............................................................................................. 158
HORizontal:MAIn:DELay:STATe ............................................................................................ 159
HORizontal[:MAIn]:DELay:TIMe ............................................................................................ 160
HORizontal[:MAIn]:SAMPLERate ........................................................................................... 160
HORizontal[:MAIn]:SCAle ........................................................................................................ 161
HORizontal[:MAIn]:SECdiv ...................................................................................................... 162
HORizontal:MAIn:UNIts[:STRing] ........................................................................................... 162
HORizontal:PREViewstate ........................................................................................................ 163
HORizontal:RECOrdlength ........................................................................................................ 163
HORizontal:RECOrdlength:Auto ............................................................................................... 164
HORizontal:RESOlution ............................................................................................................ 165
HORizontal:ROLL ..................................................................................................................... 165
HORizontal:TRIGger:POSition .................................................................................................. 166
vi TBS2000B Series Programmer Manual
I commands
ID? .............................................................................................................................................. 167
*IDN? ......................................................................................................................................... 168
L commands
LANGuage .................................................................................................................................. 169
LOCk .......................................................................................................................................... 170
*LRN? ........................................................................................................................................ 170
M commands
MARK ........................................................................................................................................ 171
MARK:CREATE ........................................................................................................................ 172
MARK:DELEte .......................................................................................................................... 173
MARK:FREE? ............................................................................................................................ 174
MARK:SELected:END? ............................................................................................................ 174
MARK:SELected:FOCUS? ........................................................................................................ 174
MARK:SELected:MARKSINCOLumn? ................................................................................... 175
MARK:SELected:OWNer? ........................................................................................................ 175
MARK:SELected:SOURCE? ..................................................................................................... 176
MARK:SELected:STARt? ......................................................................................................... 176
MARK:SELected:STATe? ......................................................................................................... 176
MARK:SELected:ZOOm:POSition? .......................................................................................... 177
MARK:TOTal? ........................................................................................................................... 177
MATH? ....................................................................................................................................... 177
MATH:DEFINE ......................................................................................................................... 178
MATH:HORizontal:POSition .................................................................................................... 179
MATH:HORizontal:SCALe ....................................................................................................... 180
MATH:HORizontal:UNIts ......................................................................................................... 180
MATH:LABel ............................................................................................................................ 181
MATH:VERtical:POSition ......................................................................................................... 182
MATH:VERtical:SCAle ............................................................................................................. 182
MATH:VERTical:UNIts ............................................................................................................ 183
MEASUrement? ......................................................................................................................... 184
MEASUrement:CLEARSNapshot ............................................................................................. 185
MEASUrement:ENABLE .......................................................................................................... 185
MEASUrement:GATing ............................................................................................................. 186
MEASUrement:IMMed? ............................................................................................................ 187
Table of Contents
TBS2000B Series Programmer Manual vii
Table of Contents
MEASUrement:IMMed:DELay? .............................................................................................. 187
MEASUrement:IMMed:DELay:EDGE<x> ............................................................................... 188
MEASUrement:IMMed:SOUrce1 .............................................................................................. 189
MEASUrement:IMMed:SOUrce2 .............................................................................................. 190
MEASUrement:IMMed:TYPe ................................................................................................... 191
MEASUrement:IMMed:UNIts? ................................................................................................. 193
MEASUrement:IMMed:VALue? ............................................................................................... 194
MEASUrement:MEAS<x>? ....................................................................................................... 195
MEASUrement:MEAS<x>:DELay? .......................................................................................... 195
MEASUrement:MEAS<x>:DELay:EDGE<x> ......................................................................... 196
MEASUrement:MEAS<x>:SOUrce1 ........................................................................................ 196
MEASUrement:MEAS<x>:SOUrce2 ........................................................................................ 197
MEASUrement:MEAS<x>:STATE ........................................................................................... 198
MEASUrement:MEAS<x>:TYPe .............................................................................................. 199
MEASUrement:MEAS<x>:UNIts? ............................................................................................ 202
MEASUrement:MEAS<x>:VALue? .......................................................................................... 203
MEASUrement:REFLevel? ........................................................................................................ 204
MEASUrement:REFLevel:ABSolute:LOW .............................................................................. 204
MEASUrement:REFLevel:ABSolute:MID1 .............................................................................. 205
MEASUrement:REFLevel:ABSolute:MID2 .............................................................................. 206
MEASUrement:REFLevel:METHod ......................................................................................... 207
MEASUrement:REFLevel:PERCent:HIGH .............................................................................. 208
MEASUrement:REFLevel:PERCent:LOW ............................................................................... 209
MEASUrement:REFLevel:PERCent:MID1 ............................................................................... 210
MEASUrement:REFLevel:PERCent:MID2 ............................................................................... 211
MEASUrement:SNAPSHOT ..................................................................................................... 212
MEASUrement:SOURCESNAPShot ......................................................................................... 212
O commands
*OPC .......................................................................................................................................... 213
P commands
*PSC ........................................................................................................................................... 215
R commands
*RCL .......................................................................................................................................... 217
RECAll:SETUp .......................................................................................................................... 218
RECAll:WAVEForm .................................................................................................................. 219
viii TBS2000B Series Programmer Manual
REF<x>? .................................................................................................................................... 220
REF<x>:DATE? ........................................................................................................................ 220
REF<x>:TIMe? ......................................................................................................................... 221
REF<x>:HORizontal:DELay:TIMe? ......................................................................................... 221
REF<x>:HORizontal:SCAle? ................................................................................................... 222
REF<x>:POSition? .................................................................................................................... 222
REF<x>:VERTical:POSition? .................................................................................................... 223
REF<x>:VERTical:SCAle? ........................................................................................................ 223
*RST ........................................................................................................................................... 224
S commands
*SAV .......................................................................................................................................... 225
SAVe:ASSIgn:TYPe .................................................................................................................. 226
SAVe:IMAge .............................................................................................................................. 226
SAVe:IMAge:FILEFormat ......................................................................................................... 227
SAVe:IMAGe:LAYout .............................................................................................................. 228
SAVe:SETUp ............................................................................................................................. 229
SAVe:WAVEform ...................................................................................................................... 230
SAVe:WAVEform:FILEFormat ................................................................................................ 231
SEARCH .................................................................................................................................... 232
SEARCH:SEARCH<x>:COPy .................................................................................................. 232
SEARCH:SEARCH<x>:STATE ............................................................................................... 233
SEARCH:SEARCH<x>:TOTAL ............................................................................................... 234
SEARCH:SEARCH<x>:TRIGger:A:LEVel .............................................................................. 234
SEARCH:SEARCH<x>:TRIGger:A:LEVel:CH<x> ................................................................. 235
SEARCH:SEARCH<x>:TRIGger:A:LOWerthreshold:MATH ................................................ 235
SEARCH:SEARCH<x>:TRIGger:A:LOWerthreshold:REF<x> .............................................. 236
SEARCH:SEARCH<x>:TRIGger:A:TYPe ............................................................................... 236
SEARCH:SEARCH<x>:TRIGger:A:EDGE:SLOpe ................................................................. 237
SEARCH:SEARCH<x>:TRIGger:A:EDGE:SOUrce ................................................................ 238
SEARCH:SEARCH<x>:TRIGger:A:LOWerthreshold:CH<x> ................................................ 238
SEARCH:SEARCH<x>:TRIGger:A:PULSEWidth:POLarity .................................................. 239
SEARCH:SEARCH<x>:TRIGger:A:PULSEWidth:SOUrce .................................................... 239
SEARCH:SEARCH<x>:TRIGger:A:PULSEWidth:WHEn ...................................................... 240
SEARCH:SEARCH<x>:TRIGger:A:PULSEWidth:WIDth ...................................................... 240
SEARCH:SEARCH<x>:TRIGger:A:RUNT:POLarity .............................................................. 241
SEARCH:SEARCH<x>:TRIGger:A:RUNT:SOUrce ................................................................ 241
SEARCH:SEARCH<x>:TRIGger:A:RUNT:WHEn ................................................................. 242
SEARCH:SEARCH<x>:TRIGger:A:RUNT:WIDth ................................................................. 243
Table of Contents
TBS2000B Series Programmer Manual ix
Table of Contents
SEARCH:SEARCH<x>:TRIGger:A:UPPerthreshold:CH<x> .................................................. 243
SELect:CH<x> ........................................................................................................................... 244
SELect:CONTROl ...................................................................................................................... 245
SELect:FFT ................................................................................................................................ 246
SELect:MATH ............................................................................................................................ 247
SELect:REF<x> .......................................................................................................................... 248
SET? ........................................................................................................................................... 249
SETUP<x>:DATE? .................................................................................................................... 250
SETUP<x>:TIME? (Query Only) .............................................................................................. 250
SOCKETServer:SOCKETCURRENTPOrt? .............................................................................. 251
SOCKETServer:SOCKETPOrt .................................................................................................. 251
SOCKETServer:SOCKETPROtocol .......................................................................................... 252
SOCKETServer:SOCKETSTAtus ............................................................................................. 254
SOCKETServer:SOCKETSTORE ............................................................................................. 255
*SRE ........................................................................................................................................... 256
*STB? ......................................................................................................................................... 257
T commands
TEKSecure .................................................................................................................................. 259
TIMe ........................................................................................................................................... 259
TRIGger ...................................................................................................................................... 260
TRIGger:A .................................................................................................................................. 261
TRIGger:A:EDGE? .................................................................................................................... 262
TRIGger:A:EDGE:COUPling .................................................................................................... 262
TRIGger:A:EDGE:SLOpe .......................................................................................................... 263
TRIGger:A:EDGE:SOUrce ........................................................................................................ 264
TRIGger:A:HOLDOff? .............................................................................................................. 265
TRIGger:A:HOLDOff:TIMe ...................................................................................................... 265
TRIGger:A:LEVel ...................................................................................................................... 266
TRIGger:A:LEVel:CH<x> ......................................................................................................... 267
TRIGger:A:LOWerthreshold:CH<x> ........................................................................................ 267
TRIGger:A:MODe ...................................................................................................................... 268
TRIGger:A:PULse? .................................................................................................................... 269
TRIGger:A:PULse:CLAss .......................................................................................................... 270
TRIGger:A:PULSE:Width? ........................................................................................................ 271
TRIGger:A:PULse:WIDth:POLarity .......................................................................................... 271
TRIGger:A:PULSEWidth:SOUrce ............................................................................................ 272
TRIGger:A:PULse:WIDth:WHEN ............................................................................................ 272
TRIGger:A:PULse:WIDth:WIDth ............................................................................................. 274
x TBS2000B Series Programmer Manual
TRIGger:A:RUNT? .................................................................................................................... 275
TRIGger:A:RUNT:POLarity ...................................................................................................... 275
TRIGger:A:RUNT:SOUrce ........................................................................................................ 276
TRIGger:A:RUNT:WHEn .......................................................................................................... 277
TRIGger:A:RUNT:WIDth .......................................................................................................... 278
TRIGger:A:TYPe ....................................................................................................................... 278
TRIGger:A:UPPerthreshold:CH<x> .......................................................................................... 279
TRIGger:FREQuency? ............................................................................................................... 280
TRIGger:STATE? ...................................................................................................................... 280
U commands
UNLock ...................................................................................................................................... 283
V commands
Table of Contents
VERBose .................................................................................................................................... 285
W commands
*WAI .......................................................................................................................................... 287
WAVFrm? .................................................................................................................................. 288
WFMInpre? ................................................................................................................................ 288
WFMInpre:BIT_Nr .................................................................................................................... 289
WFMInpre:BYT_Nr ................................................................................................................... 290
WFMInpre:ENCdg ..................................................................................................................... 290
WFMInpre:NR_Pt? .................................................................................................................... 291
WFMInpre:XINcr ....................................................................................................................... 292
WFMInpre:XUNit ...................................................................................................................... 292
WFMInpre:XZEro ...................................................................................................................... 293
WFMInpre:YMUlt ...................................................................................................................... 294
WFMInpre:YOFf ........................................................................................................................ 295
WFMInpre:YUNit ...................................................................................................................... 296
WFMInpre:YZEro ...................................................................................................................... 297
WFMOutpre? .............................................................................................................................. 298
WFMOutpre:BIT_Nr .................................................................................................................. 298
WFMOutpre:BN_Fmt ................................................................................................................ 299
WFMOutpre:BYT_Nr ................................................................................................................ 300
WFMOutpre:ENCdg .................................................................................................................. 301
WFMOutpre:NR_Pt? .................................................................................................................. 302
WFMOutpre:RECOrdlength? ..................................................................................................... 302
TBS2000B Series Programmer Manual xi
Table of Contents
WFMOutpre:WFId? ................................................................................................................... 303
WFMOutpre:XINcr? .................................................................................................................. 304
WFMOutpre:XUNit? .................................................................................................................. 304
WFMOutpre:XZEro? .................................................................................................................. 305
WFMOutpre:YMUlt? ................................................................................................................. 306
WFMOutpre:YOFf? ................................................................................................................... 306
WFMOutpre:YUNit? .................................................................................................................. 307
WFMOutpre:YZEro? .................................................................................................................. 308
Z commands
ZOOM? ....................................................................................................................................... 309
ZOOm{:MODe|:STATE} .......................................................................................................... 309
ZOOm:ZOOM1? ........................................................................................................................ 310
ZOOM:ZOOM1:FACtor ............................................................................................................ 311
ZOOM:ZOOM1:HORizontal:POSition ..................................................................................... 311
ZOOM:ZOOM1:HORizontal:SCAle ......................................................................................... 312
ZOOm:ZOOM1:POSition .......................................................................................................... 313
ZOOm:ZOOM1:SCAle .............................................................................................................. 313
ZOOM:ZOOM1:STATE ............................................................................................................ 314
Status and Events
Registers ..................................................................................................................................... 315
Overview ............................................................................................................................... 315
Status Registers ..................................................................................................................... 315
Enable Registers .................................................................................................................... 318
*PSC Command .................................................................................................................... 319
Queues ........................................................................................................................................ 319
Output Queue ........................................................................................................................ 319
Event Queue .......................................................................................................................... 320
Event Handling Sequence ........................................................................................................... 320
Synchronization Methods ........................................................................................................... 322
Overview ............................................................................................................................... 322
Using the *WAI Command ................................................................................................... 324
Using the BUSY Query ......................................................................................................... 324
Using the *OPC Command ................................................................................................... 325
Using the *OPC? Query ........................................................................................................ 327
Messages ............................................................................................................................... 328
No Event ................................................................................................................................ 328
xii TBS2000B Series Programmer Manual
Table of Contents
Command Error ..................................................................................................................... 328
Execution Error ..................................................................................................................... 329
Device Error .......................................................................................................................... 332
System Event ......................................................................................................................... 332
Execution Warning ................................................................................................................ 333
Internal Warning .................................................................................................................... 333
Programming Examples
ASCII Code Chart
Factory setup
TBS2000B Series Oscilloscopes ................................................................................................ 339
Reserved words
Glossary
Glossary terms ............................................................................................................................ 343
TBS2000B Series Programmer Manual xiii
Table of Contents
xiv TBS2000B Series Programmer Manual
Getting Started
This manual contains information on how to remotely control and operate your
instrument through communications protocol and commands.
Refer to the instrument user manual for information on how to configure and test
your instrument remote connectivity (USB or Ethernet).
Download the latest version of the programmer manual from www.tek.com/
downloads for up-to-date command syntax information.
Setting Up Remote Communications Software
Using a Socket Server
A socket server provides two-way communication over an Internet Protocolbased computer network. You can use your oscilloscope’s socket server feature
to let your oscilloscope talk to a remote-terminal device or computer.
Follow the steps to set up and use a socket server between your oscilloscope and
a remote terminal or computer:
1. Connect the oscilloscope to your computer network with an appropriate
Ethernet cable.
2. Push Utility.
3. Select Config using Bezel button.
4. Turn multipurpose knob and select Socket Server.
5. Push the Socket Server.
6. On the resulting Socket Server side menu, push the top entry to highlight
Enabled.
7. Choose whether the protocol should be None or Terminal.
A communication session run manually by using a keyboard typically uses a
terminal protocol. An automated session might handle its own
communications without using such a protocol.
8. If required, change the port number by pushing Select Port rotating
multipurpose knob and pushing to set the value.
9. Press Set Port to set the new port number.
10. After setting up the socket server parameters, configure the computer to
communicate to the oscilloscope. If you are using 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 7, you must first enable Telnet in order for it to work.
TBS2000B Series Programmer Manual 1
Getting Started
11. Start a terminal session between your computer and your oscilloscope by
typing in an open command with the oscilloscope's LAN address and port #.
You can obtain the LAN address by pushing the Ethernet configure from
Config menu and the resulting LAN Settings menu item to view the resulting
LAN Setting screen. You can obtain the port # by pushing the Socket Server
menu item under Config menu and viewing the Current Port menu item.
For example, if the oscilloscope IP address was 123.45.67.89 and the port #
was the default of 4000, you could open a session by writing into the MS
Windows Telnet screen:
o 123.45.67.89 4000
12. 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 on 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 oscilloscope.
2 TBS2000B Series Programmer Manual
Command Syntax
You can control the instrument through the Ethernet or USB interface using a
large group of commands and queries.
This section describes the syntax these commands and queries use and the
conventions the instrument uses to process them. The commands and queries
themselves are listed in the Command Descriptions section.
Command Syntax
Table 1: Instrument communication protocol
You transmit commands to the instrument using the enhanced American Standard
Code for Information Interchange (ASCII) character encoding. Appendix A
contains a chart of the ASCII character set.
The Backus Naur Form (BNF) notation is used in this manual to describe
commands and queries.
Model or option GPIB RS-232 USB
TBS2000B Yes
1
No Yes
Table 2: BNF notation
Symbol Meaning
< > Defined element
::= Is defined as
| Exclusive OR
{ } Group; one element is required
[ ] Optional; can be omitted
. . . Previous element(s) may be repeated
( ) Comment
1
Function available with a TEK-USB-488 adapter.
TBS2000B Series Programmer Manual 3
Command Syntax
Command and Query Structure
Commands consist of set commands and query commands (usually simply called
commands and queries). Commands change instrument settings or perform a
specific action. Queries cause the instrument to return data and information about
its status.
Most commands have both a set form and a query form. The query form of the
command is the same as the set form except that it ends with a question mark.
For example, the set command ACQuire:MODe has a query form
ACQuire:MODe. Not all commands have both a set and a query form; some
commands are set only and some are query only.
A few commands do both a set and query action. For example, the *CAL?
command runs a self-calibration program on the instrument, then returns the
result of the calibration.
A command message is a command or query name, followed by any information
the instrument needs to execute the command or query. Command messages
consist of five different element types.
Table 3: Command message elements
Symbol Meaning
<Header> The basic command name. If the header ends
with a question mark, the command is a query.
The header may begin with a colon (:) character;
if the command is concatenated with other
commands the beginning colon is required. The
beginning colon can never be used with
command headers beginning with a star (*).
<Mnemonic> A header subfunction. Some command headers
have only one mnemonic. If a command header
has multiple mnemonics, they are always
separated from each other by a colon (:)
character.
<Argument> A quantity, quality, restriction, or limit associated
with the header. Not all commands have an
argument, while other commands have multiple
arguments. Arguments are separated from the
header by a <Space>. Arguments are separated
from each other by a <Comma>.
<Comma> A single comma between arguments of multiple-
argument commands. It may optionally have
white space characters before and after the
comma.
<Space> A white space character between command
header and argument. It may optionally consist
of multiple white space characters.
The following figure shows the five command message elements.
4 TBS2000B Series Programmer Manual
Command Syntax
Figure 1: Command message elements
Commands
Queries
Commands cause the instrument to perform a specific function or change one of
its settings. Commands have the structure:
[:]<Header>[<Space><Argument>[<Comma><Argument>]...]
A command header is made up of one or more mnemonics arranged in a
hierarchical or tree structure. The first mnemonic is the base or root of the tree
and each subsequent mnemonic is a level or branch off of 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.
Queries cause the instrument to return information about its status or settings.
Queries 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 specified branch or level.
For example, MEASUrement:MEAS<x>:UNIts? returns the measurement units,
while MEASUrement:MEAS<x>:TYPe? returns the measurement type selected
for the measurement, and MEASUrement:MEAS<x>? returns all the
measurement parameters for the specified measurement.
TBS2000B Series Programmer Manual 5
Command Syntax
Headers in Query
Responses
Clearing the Output Queue
You can control whether the instrument returns headers as part of the query
response. Use the HEADer command to control this feature. If header is on, the
instrument returns command headers as part of the query and formats the query
response as a valid set command. When header is off, the instrument sends back
only the values in the response. This format can make it easier to parse and
extract the information from the response.
Table 4: Comparison of Header Off and Header On responses
Query Header Off response Header On response
ACQuire:NUMAVg 64 ACQUIRE:NUMAVG 64
CHx1:COUPling DC CH1:COUPLING DC
To clear the output queue and reset the instrument to accept a new command or
query, send a Device Clear (DCL) from a GPIB host.
From an RS-232 host, send a break signal. The RS-232 interface responds by
returning the ASCII string "DCL."
From a USB host, send an INITIATE_CLEAR followed by a
CHECK_CLEAR_STATUS. The USB interface responds to
CHECK_CLEAR_STATUS with STATUS_SUCCESS when it is finished
clearing the output queue.
Command Entry
Follow these general rules when entering commands:
■
Enter commands in upper or lower case.
■
You can precede any command with white space characters. White space
characters include any combination of the ASCII control characters
00 through 09 and 0B through 20 hexadecimal (0 through 9 and 11 through
32 decimal).
■
The instrument ignores commands that consists of just a combination of
white space characters and line feeds.
6 TBS2000B Series Programmer Manual
Command Syntax
Abbreviating Commands
Concatenating Commands
You can abbreviate many instrument commands. These abbreviations are shown
in capital letters in the command listing in the Command Groups section and
Command Descriptions section. For example, the command ACQuire:NUMAvg
can be entered simply as ACQ:NUMA or acq:numa.
If you use the HEADer command to have command headers included as part of
query responses, you can also control whether the returned headers are
abbreviated or are full-length using the VERBose command.
You can concatenate any combination of set commands and queries using a
semicolon (;). The instrument executes concatenated commands in the order
received. When concatenating commands and queries you must follow these
rules:
■
Completely different headers must be separated by both a semicolon and by
the beginning colon on all commands but the first. For example, the
commands TRIGger:MODe NORMal and ACQuire:NUMAVg 16 can be
concatenated into a single command:
TRIGger:MODe NORMal;:ACQuire:NUMAVg 16
■
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, the commands ACQuire:MODe AVErage and
ACQuire:NUMAVg 16 could be concatenated into a single command:
ACQuire:MODe AVErage; NUMAVg 16
The longer version works equally well:
ACQuire:MODe AVErage;:ACQuire:NUMAVg 16
■
Never precede a star (*) command with a colon or semicolon:
ACQuire:MODe AVErage;*TRG
The instrument processes commands that follow the star command as if the
star command was not there, so:
ACQuire:MODe AVErage;*TRG;NUMAVg 16
sets the acquisition mode to average and sets acquisition averaging to 16. The
*TRG command is ignored.
■
When you concatenate queries, the responses to all queries are combined into
a single response message. For example, if channel 1 coupling is set to DC
and the bandwidth is set to 20 MHz, the concatenated query:
CH1:COUPling;BANdwidth
returns CH1:COUPLING DC;:CH1:BANDWIDTH ON if header is on, or
DC;ON if header is off.
■
You can concatenate set commands and queries in the same message. For
example:
ACQuire:MODe AVErage;NUMAVg;STATE
TBS2000B Series Programmer Manual 7
Command Syntax
is a valid message that sets the acquisition mode to average, queries the
number of acquisitions for averaging, and then queries the acquisition state.
The instrument executes concatenated commands and queries in the order it
receives them.
■
Any query that returns arbitrary data, such as ID, must be the last query when
part of a concatenated command. If the query is not last, the instrument
generates event message 440.
Here are some INVALID concatenation examples:
■
CH1:COUPling DC;ACQuire:NUMAVg 16 (missing colon before ACQuire)
■
CH1:COUPling DC;:BANDwidth ON (invalid colon before BANDwidth)
■
CH1:COUPling DC;:*TRG (invalid colon before a star (*) command)
■
HORizontal:MAIn:POSition 0;MAIn:SCAle 1E-13 (levels of mnemonics are
different; either remove the second occurrence of MAIn:, or put HORizontal:
in front of MAIN:SCAle)
Message Terminators
This manual uses the term <EOM> (End of message) to represent a message
terminator.
GPIB End of Message (EOM) Terminators. GPIB EOM terminators can be the
END message (EOI asserted concurrently with the last data byte), the ASCII
code for line feed (LF) sent as the last data byte, or both. The instrument always
terminates messages with LF and EOI. White space is allowed before the
terminator; for example, CR LF is acceptable.
USB End of Message (EOM) Terminators. The EOM bit must be set in the USB
header of the last transfer of a command message
See the USB Test and Measurement Class Specification (USBTMC) section
3.2.1 for details. The instrument terminates messages by setting the EOM bit in
the USB header of the last transfer of a message to the host (USBTMC
Specification section 3.3.1), and by terminating messages with a LF. White
space is allowed before the terminator; for example, CR LF is acceptable.
8 TBS2000B Series Programmer Manual
Command Syntax
Constructed Mnemonics
Some header mnemonics specify one of a range of mnemonics. For example, a
channel mnemonic could be CH2. You can use these mnemonics in the command
just as you do any other mnemonic. For example, there is a CH1:VOLts
command and there is also a CH2:VOLts command. In the command
descriptions, this list of choices is abbreviated CH<x>.
Channel mnemonics
Reference Waveform
Mnemonics
Waveform Mnemonics
Commands specify the channel to use as a mnemonic in the header.
Symbol Meaning
CH<x> 2-channel models: A channel specifier; <x> is
1 or 2.
4-channel models: A channel specifier; <x> is 1,
2, 3, or 4.
Commands can specify the reference waveform to use as a mnemonic in the
header.
Symbol Meaning
REF<x> 2-channel models: A reference waveform
specifier; <x> is 1 or 2.
4-channel models: A reference waveform
specifier; <x> is 1 or 2.
In some commands you can specify a waveform without regard to its type:
channel waveform, math waveform, or reference waveform. The "y" is the same
as "x" in Reference Waveform Mnemonics.
Symbol Meaning
<wfm> Can be CH<x>, MATH, or REF<y>
TBS2000B Series Programmer Manual 9
Command Syntax
Cursor Position Mnemonic
Measurement Specifier
Mnemonics
Argument Types
When the instrument displays cursors, commands may specify which cursor of
the pair to use.
Symbol Meaning
POSITION<x> A cursor selector;<x> is 1 or 2.
Commands can specify which measurement to set or query as a mnemonic in the
header. The instrument can display up to six automated measurements.
Symbol Meaning
MEAS<x> A measurement specifier; <x> is 1-6.
A command argument can be in one of several forms. The individual descriptions
of each command tell which argument types to use with that command.
Numeric Arguments
Many instrument commands require numeric arguments.
Table 5: Types of numeric arguments
Symbol Meaning
<NR1> Signed integer value
<NR2> Floating point value without an exponent
<NR3> Floating point value with an exponent
The syntax shown is the data format that the instrument returns in response to a
query. This format is also the preferred format when sending a command to the
instrument.
When you enter an incorrect numeric argument, the instrument automatically
forces the numeric argument to a correct value.
Table 6: Instrument handling of incorrect numeric arguments
Argument value Instrument response
Numeric argument is less than lowest correct
value for that command
Numeric argument is greater than the highest
correct value for that command
Numeric value is between two correct values Rounds the entered value to the nearest correct
Sets the specified command to the lowest
correct value and executes the command
Sets the specified command to the highest
correct value and executes the command
value and executes the command
10 TBS2000B Series Programmer Manual
Command Syntax
Quoted String Arguments
Some commands accept or return data in the form of a quoted string, which is
simply a group of ASCII characters enclosed by single quotes (') or double quotes
("). For example:
"this is a quoted string"
Symbol Meaning
<QString> Quoted string of ASCII text
Follow these rules when you use quoted strings:
1. A quoted string can include any character defined in the 7-bit ASCII
character set. ASCII Code Chart on page 337.
2. Use the same type of quote character to open and close the string:
"this is a valid string"
3. You can mix quotation marks within a string if you follow the previous rule:
"this is an 'acceptable' string"
4. You can include a quote character within a string simply by repeating the
quote. For example,
"here is a "" mark"
Block Arguments
5. Strings can have upper or lower case characters.
6. If you use a GPIB network, you cannot terminate a quoted string with the
END message before the closing delimiter.
7. A carriage return or line feed embedded in a quoted string does not terminate
the string, but is treated as just another character in the string.
8. The maximum length of a quoted string returned from a query is
1000 characters.
Here are some examples of invalid strings:
"Invalid string argument' (quotes are not of the same type)
"test<EOI>" (termination character is embedded in the string)
Several instrument commands use a block argument form.
TBS2000B Series Programmer Manual 11
Command Syntax
Table 7: Parts of a block argument
Symbol Meaning
<NZDig> A nonzero digit character, in the range
1-9 Specifies the number of <Dig> elements that
follow
<Dig> A digit character, in the range 0-9
<DChar> A character with the hex equivalent of
00 through FF hexadecimal (0 through
255 decimal)
<Block> A block of data bytes, defined as:
<Block> := { #<NZDig><Dig>[<Dig>...]
[<DChar>...] | #0[<DChar>...]<terminator> }
The following figure shows an example of a block argument.
Figure 2: Block argument example
<NZDig> specifies the number of <Dig> elements that follow. Taken together,
the <Dig> elements form a decimal integer that specifies how many <DChar>
elements follow.
#0 means that the <Block> is an indefinite length block. The <terminator> ends
the block. You should not use indefinite length blocks with RS-232, because
there is no way to include a <terminator> character as a <DChar> character.
The first occurrence of a <terminator> character signals the end of the block and
any subsequent <DChar> characters will be interpreted as a syntax error. With
the GPIB, the EOI line signals the last byte. With the USB, the EOM bit signals
the last byte.
12 TBS2000B Series Programmer Manual