Oscilloscope Programmer Guide
Oscilloscope Programmer Guide
5000 Series
Oscilloscopes
Programmer's Guide
Notices
Agilent Technologies, Inc. 2007-2008
Version 05.15.0000
Trademarks
Microsoft, MS-DOS, Windows, Windows 2000, and Windows XP are U.S.
registered trademarks of Microsoft Corporation.
Adobe, Acrobat, and the Acrobat
Logo are trademarks of Adobe Systems
Incorporated.
Edition
July 31, 2008
Available in electronic format only
Agilent Technologies, Inc.
1900 Garden of the Gods Road
Colorado Springs, CO 80907 USA
Warranty
The material contained in this document is provided as is, and is subject to being changed, without notice,
in future editions. Further, to the maximum extent permitted by applicable
law, Agilent disclaims all warranties,
either express or implied, with regard
to this manual and any information
contained herein, including but not
limited to the implied warranties of
merchantability and fitness for a particular purpose. Agilent shall not be
liable for errors or for incidental or
consequential damages in connection
with the furnishing, use, or performance of this document or of any
information contained herein. Should
Agilent and the user have a separate
written agreement with warranty
terms covering the material in this
document that conflict with these
terms, the warranty terms in the separate agreement shall control.
Technology Licenses
The hardware and/or software described in
this document are furnished under a
license and may be used or copied only in
accordance with the terms of such license.
Safety Notices
CAUTION
A CAUTION notice denotes a hazard. It calls attention to an operating procedure, practice, or the like
that, if not correctly performed or
adhered to, could result in damage
to the product or loss of important
data. Do not proceed beyond a
CAUTION notice until the indicated
conditions are fully understood and
met.
WA R N I N G
A WARNING notice denotes a
hazard. It calls attention to an
operating procedure, practice, or
the like that, if not correctly performed or adhered to, could result
in personal injury or death. Do not
proceed beyond a WARNING
notice until the indicated conditions are fully understood and met.
In This Book
This book is your guide to programming the 5000 Series oscilloscopes:
Table 1
Channels
4 analog
DSO5054A
DSO5034A
DSO5014A
2 analog
DSO5052A
DSO5032A
DSO5012A
The first few chapters describe how to set up and get started:
Chapter 1, "What's New" on page 19, describes programming command
changes in the latest version of oscilloscope software.
Chapter 2, "Setting Up" on page 27, describes the steps you must take
before you can program the oscilloscope.
Chapter 3, "Getting Started" on page 37, gives a general overview of
oscilloscope program structure and shows how to program the
oscilloscope using a few simple examples.
Chapter 4, "Commands Quick Reference" on page 51, is a brief listing of
the 5000 Series oscilloscope commands and syntax.
The next chapters provide reference information:
Chapter 5, "Commands by Subsystem" on page 89, describes the set of
commands that belong to an individual subsystem and explains the
function of each command. Command arguments and syntax are
described. Some command descriptions have example code.
Chapter 6, "Commands A- Z" on page 477, contains an alphabetical
listing of all command elements.
Chapter 7, "Obsolete and Discontinued Commands" on page 501,
describes obsolete commands which still work but have been replaced
by newer commands and discontinued commands which are no longer
supported.
Chapter 8, "Error Messages" on page 545, lists the instrument error
messages that can occur while programming the oscilloscope.
The command descriptions in this reference show upper and lowercase
characters. For example, :AUToscale indicates that the entire command
name is :AUTOSCALE. The short form, :AUT, is also accepted by the
oscilloscope.
Then, there are chapters that describe programming topics and conceptual
information in more detail:
Chapter 9, "Status Reporting" on page 553, describes the oscilloscope's
status registers and how to check the status of the instrument.
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
For more information on using the SICL, VISA, and VISA COM libraries
in general, see the documentation that comes with the Agilent IO
Libraries Suite.
For information on controller PC interface configuration, see the
documentation for the interface card used (for example, the Agilent
82350A GPIB interface).
For information on oscilloscope front- panel operation, see the User's
Guide.
For detailed connectivity information, refer to the Agilent Technologies
USB/LAN/GPIB Connectivity Guide. For a printable electronic copy of
the Connectivity Guide, direct your Web browser to "www.agilent.com"
and search for "Connectivity Guide".
For the latest versions of this and other manuals, see:
"http://www.agilent.com/find/5000manual"
Contents
In This Book
1 What's New
What's New in Version 5.15
20
22
23
25
26
2 Setting Up
Step 1. Install Agilent IO Libraries Suite software
Step 2. Connect and set up the oscilloscope
Using the USB (Device) Interface 29
Using the LAN Interface 29
Using the GPIB Interface 30
Step 3. Verify the oscilloscope connection
28
29
31
3 Getting Started
Basic Oscilloscope Program Structure
Initializing 38
Capturing Data 38
Analyzing Captured Data 39
38
49
52
Syntax Elements 85
Number Format 85
<NL> (Line Terminator) 85
[ ] (Optional Syntax Terms) 85
{ } (Braces) 85
::= (Defined As) 85
< > (Angle Brackets) 86
... (Ellipsis) 86
n,..,p (Value Ranges) 86
d (Digits) 86
Quoted ASCII String 86
Definite-Length Block Response Data
86
5 Commands by Subsystem
Common (*) Commands 91
*CLS (Clear Status) 95
*ESE (Standard Event Status Enable) 96
*ESR (Standard Event Status Register) 98
*IDN (Identification Number) 100
*LRN (Learn Device Setup) 101
*OPC (Operation Complete) 102
130
137
:ACQuire:SEGMented:COUNt
:ACQuire:SEGMented:INDex
:ACQuire:SRATe 164
:ACQuire:TYPE 165
161
162
:EXTernal:PROBe 208
:EXTernal:PROBe:ID 209
:EXTernal:PROBe:STYPe 210
:EXTernal:PROTection 211
:EXTernal:RANGe 212
:EXTernal:UNITs 213
:FUNCtion Commands 214
:FUNCtion:CENTer 217
:FUNCtion:DISPlay 218
:FUNCtion:GOFT:OPERation 219
:FUNCtion:GOFT:SOURce1 220
:FUNCtion:GOFT:SOURce2 221
:FUNCtion:OFFSet 222
:FUNCtion:OPERation 223
:FUNCtion:RANGe 224
:FUNCtion:REFerence 225
:FUNCtion:SCALe 226
:FUNCtion:SOURce1 227
:FUNCtion:SOURce2 228
:FUNCtion:SPAN 229
:FUNCtion:WINDow 230
:HARDcopy Commands 231
:HARDcopy:AREA 233
:HARDcopy:APRinter 234
:HARDcopy:FACTors 235
:HARDcopy:FFEed 236
:HARDcopy:INKSaver 237
:HARDcopy:PALette 238
:HARDcopy:PRinter:LIST 239
:HARDcopy:STARt 240
:MARKer Commands 241
:MARKer:MODE 243
:MARKer:X1Position 244
:MARKer:X1Y1source 245
:MARKer:X2Position 246
:MARKer:X2Y2source 247
:MARKer:XDELta 248
:MARKer:Y1Position 249
:MARKer:Y2Position 250
:MARKer:YDELta 251
10
:SAVE:IMAGe:FACTors 307
:SAVE:IMAGe:FORMat 308
:SAVE:IMAGe:INKSaver 309
:SAVE:IMAGe:PALette 310
:SAVE:PWD 311
:SAVE:SETup[:STARt] 312
:SAVE:WAVeform[:STARt] 313
:SAVE:WAVeform:FORMat 314
:SAVE:WAVeform:LENGth 315
:SBUS Commands 316
:SBUS:CAN:COUNt:ERRor 318
:SBUS:CAN:COUNt:OVERload 319
:SBUS:CAN:COUNt:RESet 320
:SBUS:CAN:COUNt:TOTal 321
:SBUS:CAN:COUNt:UTILization 322
:SBUS:DISPlay 323
:SBUS:IIC:ASIZe 324
:SBUS:LIN:PARity 325
:SBUS:MODE 326
:SBUS:SPI:WIDTh 327
:SBUS:UART:BASE 328
:SBUS:UART:COUNt:ERRor 329
:SBUS:UART:COUNt:RESet 330
:SBUS:UART:COUNt:RXFRames 331
:SBUS:UART:COUNt:TXFRames 332
:SBUS:UART:FRAMing 333
:SYSTem Commands 334
:SYSTem:DATE 335
:SYSTem:DSP 336
:SYSTem:ERRor 337
:SYSTem:LOCK 338
:SYSTem:PROTection:LOCK
:SYSTem:SETup 340
:SYSTem:TIME 342
339
11
:TIMebase:VERNier 350
:TIMebase:WINDow:POSition 351
:TIMebase:WINDow:RANGe 352
:TIMebase:WINDow:SCALe 353
:TRIGger Commands 354
General :TRIGger Commands 357
:TRIGger:HFReject 358
:TRIGger:HOLDoff 359
:TRIGger:MODE 360
:TRIGger:NREJect 361
:TRIGger:PATTern 362
:TRIGger:SWEep 364
:TRIGger:CAN Commands 365
:TRIGger:CAN:PATTern:DATA 367
:TRIGger:CAN:PATTern:DATA:LENGth 368
:TRIGger:CAN:PATTern:ID 369
:TRIGger:CAN:PATTern:ID:MODE 370
:TRIGger:CAN:SAMPlepoint 371
:TRIGger:CAN:SIGNal:BAUDrate 372
:TRIGger:CAN:SOURce 373
:TRIGger:CAN:TRIGger 374
:TRIGger:DURation Commands 376
:TRIGger:DURation:GREaterthan 377
:TRIGger:DURation:LESSthan 378
:TRIGger:DURation:PATTern 379
:TRIGger:DURation:QUALifier 380
:TRIGger:DURation:RANGe 381
:TRIGger[:EDGE] Commands 382
:TRIGger[:EDGE]:COUPling 383
:TRIGger[:EDGE]:LEVel 384
:TRIGger[:EDGE]:REJect 385
:TRIGger[:EDGE]:SLOPe 386
:TRIGger[:EDGE]:SOURce 387
:TRIGger:GLITch Commands 388
:TRIGger:GLITch:GREaterthan 389
:TRIGger:GLITch:LESSthan 390
:TRIGger:GLITch:LEVel 391
:TRIGger:GLITch:POLarity 392
:TRIGger:GLITch:QUALifier 393
:TRIGger:GLITch:RANGe 394
:TRIGger:GLITch:SOURce 395
12
13
:TRIGger:UART:TYPE 440
:TRIGger:UART:WIDTh 441
:WAVeform Commands 442
:WAVeform:BYTeorder 449
:WAVeform:COUNt 450
:WAVeform:DATA 451
:WAVeform:FORMat 453
:WAVeform:POINts 454
:WAVeform:POINts:MODE 456
:WAVeform:PREamble 458
:WAVeform:SEGMented:COUNt 461
:WAVeform:SEGMented:TTAG 462
:WAVeform:SOURce 463
:WAVeform:SOURce:SUBSource 467
:WAVeform:TYPE 468
:WAVeform:UNSigned 469
:WAVeform:VIEW 470
:WAVeform:XINCrement 471
:WAVeform:XORigin 472
:WAVeform:XREFerence 473
:WAVeform:YINCrement 474
:WAVeform:YORigin 475
:WAVeform:YREFerence 476
6 Commands A-Z
7 Obsolete and Discontinued Commands
:CHANnel:LABel 506
:CHANnel2:SKEW 507
:CHANnel<n>:INPut 508
:CHANnel<n>:PMODe 509
:DISPlay:CONNect 510
:ERASe 511
:EXTernal:INPut 512
:EXTernal:PMODe 513
:FUNCtion:SOURce 514
:FUNCtion:VIEW 515
:HARDcopy:DESTination 516
:HARDcopy:DEVice 517
:HARDcopy:FILename 518
:HARDcopy:FORMat 519
14
:HARDcopy:GRAYscale 520
:HARDcopy:IGColors 521
:HARDcopy:PDRiver 522
:MEASure:LOWer 523
:MEASure:SCRatch 524
:MEASure:TDELta 525
:MEASure:THResholds 526
:MEASure:TMAX 527
:MEASure:TMIN 528
:MEASure:TSTArt 529
:MEASure:TSTOp 530
:MEASure:TVOLt 531
:MEASure:UPPer 533
:MEASure:VDELta 534
:MEASure:VSTArt 535
:MEASure:VSTOp 536
:PRINt? 537
:TIMebase:DELay 539
:TRIGger:CAN:ACKNowledge 540
:TRIGger:CAN:SIGNal:DEFinition 541
:TRIGger:LIN:SIGNal:DEFinition 542
:TRIGger:TV:TVMode 543
8 Error Messages
9 Status Reporting
Status Reporting Data Structures
Status Byte Register (STB)
555
558
560
561
562
Message Queue
563
564
565
566
567
568
569
15
570
571
572
573
10 Synchronizing Acquisitions
Synchronization in the Programming Flow
Set Up the Oscilloscope 576
Acquire a Waveform 576
Retrieve Results 576
Blocking Synchronization
576
577
578
580
582
601
604
605
12 Programming Examples
SICL Examples 608
SICL Example in C 608
SICL Example in Visual Basic
617
16
Index
17
18
1
What's New
What's New in Version 5.15
What's New in Version 5.10
What's New in Version 5.00
What's New in Version 4.10
Version 4.00 at Introduction
20
22
23
25
26
19
What's New
20
Command
Description
What's New
Changed
Commands
Obsolete
Commands
Command
Differences
Obsolete Command
Behavior Differences
:FUNCtion:SOURce (see
page 514)
:FUNCtion:SOURce1 (see
page 227)
21
What's New
Changed
Commands
22
Command
Description
Command
Differences
What's New
Description
:WAVeform:SOURce:SUBSource (see
page 467)
23
What's New
Changed
Commands
Obsolete
Commands
24
Command
Differences
Obsolete Command
:HARDcopy:FILename (see
page 518)
:RECall:FILename (see
page 298)
:SAVE:FILename (see
page 298)
:HARDcopy:FORMat (see
page 519)
:HARDcopy:APRinter (see
page 234)
:SAVE:IMAGe:FORMat (see
page 308)
:SAVE:WAVeform:FORMat
(see page 314)
:HARDcopy:IGColors (see
page 521)
:HARDcopy:INKSaver (see
page 237)
:HARDcopy:PDRiver (see
page 522)
:HARDcopy:APRinter (see
page 234)
Behavior Differences
What's New
Command
Differences
25
What's New
26
2
Setting Up
Step 1. Install Agilent IO Libraries Suite software 28
Step 2. Connect and set up the oscilloscope 29
Step 3. Verify the oscilloscope connection 31
27
Setting Up
28
Setting Up
86%
'(9,&( +267
/$1
121$8720',;
Figure 1
*3,%
address, subnet mask, gateway IP, DNS IP, etc.) from your network
administrator.
3 Connect the oscilloscope to the local area network (LAN) by inserting
LAN cable into the "LAN" port on the back of the oscilloscope.
29
Setting Up
softkeys and the Entry knob) to enter the Host name and the
Domain name. When you are done, press the return (up arrow)
softkey.
again.
Ensure the box next to GPIB is selected ( ). If not ( ), use the
Entry knob to select GPIB; then, press the Control softkey again.
3 Configure the oscilloscope's GPIB interface:
a Press the Configure softkey until "GPIB" is selected.
b Use the Entry knob to select the Address value.
30
Setting Up
taskbar and choose Agilent Connection Expert from the popup menu.
31
Setting Up
popup menu
b If the oscilloscope is on the same subnet, select it, and click OK.
32
Setting Up
33
Setting Up
34
Setting Up
IO application.
4 In the Agilent Connection Expert application, choose File>Exit from the
35
36
Setting Up
3
Getting Started
Basic Oscilloscope Program Structure 38
Programming the Oscilloscope 40
Other Ways of Sending Commands 49
NOTE
37
Getting Started
Initializing
To ensure consistent, repeatable performance, you need to start the
program, controller, and oscilloscope in a known state. Without correct
initialization, your program may run correctly in one instance and not in
another. This might be due to changes made in configuration by previous
program runs or from the front panel of the oscilloscope.
Program initialization defines and initializes variables, allocates
memory, or tests system configuration.
Controller initialization ensures that the interface to the oscilloscope is
properly set up and ready for data transfer.
Oscilloscope initialization sets the channel configuration, channel labels,
threshold voltages, trigger specification, trigger mode, timebase, and
acquisition type.
Capturing Data
Once you initialize the oscilloscope, you can begin capturing data for
analysis. Remember that while the oscilloscope is responding to commands
from the controller, it is not performing acquisitions. Also, when you
change the oscilloscope configuration, any data already captured will most
likely be rendered.
38
Getting Started
To collect data, you use the :DIGitize command. This command clears the
waveform buffers and starts the acquisition process. Acquisition continues
until acquisition memory is full, then stops. The acquired data is displayed
by the oscilloscope, and the captured data can be measured, stored in
trace memory in the oscilloscope, or transferred to the controller for
further analysis. Any additional commands sent while :DIGitize is working
are buffered until :DIGitize is complete.
You could also put the oscilloscope into run mode, then use a wait loop in
your program to ensure that the oscilloscope has completed at least one
acquisition before you make a measurement. Agilent does not recommend
this because the needed length of the wait loop may vary, causing your
program to fail. :DIGitize, on the other hand, ensures that data capture is
complete. Also, :DIGitize, when complete, stops the acquisition process so
that all measurements are on displayed data, not on a constantly changing
data set.
39
Getting Started
40
Getting Started
3 Click OK.
To reference the Agilent VISA COM library in Microsoft Visual Basic 6.0:
1 Choose Project>References... from the main menu.
2 In the References dialog, check the "VISA COM 3.0 Type Library".
3 Click OK.
41
Getting Started
When you are using GPIB, CLEAR also resets the oscilloscope's parser. The
parser is the program which reads in the instructions which you send it.
After clearing the interface, initialize the instrument to a preset state:
myScope.WriteString "*RST"
NOTE
42
":CHANnel1:PROBe 10"
":CHANnel1:RANGe 16"
":CHANnel1:OFFSet 1.00"
":TIMebase:MODE NORMal"
":TIMebase:RANGe 1E-3"
":TIMebase:DELay 100E-6"
Getting Started
43
Getting Started
NOTE
When you send the :DIGitize command to the oscilloscope, the specified
channel signal is digitized with the current :ACQuire parameters. To obtain
waveform data, you must specify the :WAVeform parameters for the
SOURce channel, the FORMat type, and the number of POINts prior to
sending the :WAVeform:DATA? query.
NOTE
":ACQuire:TYPE AVERage"
":ACQuire:COMPlete 100"
":ACQuire:COUNt 8"
":DIGitize CHANnel1"
":WAVeform:SOURce CHANnel1"
":WAVeform:FORMat BYTE"
":WAVeform:POINts 500"
":WAVeform:DATA?"
This setup places the instrument into the averaged mode with eight
averages. This means that when the :DIGitize command is received, the
command will execute until the signal has been averaged at least eight
times.
After receiving the :WAVeform:DATA? query, the instrument will start
passing the waveform information.
Digitized waveforms are passed from the instrument to the controller by
sending a numerical representation of each digitized point. The format of
the numerical representation is controlled with the :WAVeform:FORMat
command and may be selected as BYTE, WORD, or ASCii.
44
Getting Started
NOTE
This reads the current setting for the channel one coupling into the string
variable strQueryResult.
All results for queries (sent in one program message) must be read before
another program message is sent.
Sending another command before reading the result of the query clears
the output buffer and the current response. This also causes an error to
be placed in the error queue.
Executing a read statement before sending a query causes the controller to
wait indefinitely.
The format specification for handling response messages depends on the
programming language.
45
Getting Started
NOTE
46
Getting Started
/TLADQNE%HFHSR
5G@S'NKKNV
"BST@K%@S@
AXSDRNEC@S@SDQLHM@SNQ
/TLADQNE#XSDR
SNAD5Q@MRLHSSDC
Figure 2
The "8" states the number of digits that follow, and "00001000" states the
number of bytes to be transmitted.
The VISA COM library's ReadIEEEBlock and WriteIEEEBlock methods
understand the definite- length block syntax, so you can simply use
variables that contain the data:
' Read oscilloscope setup using ":SYSTem:SETup?" query.
myScope.WriteString ":SYSTem:SETup?"
Dim varQueryResult As Variant
varQueryResult = myScope.ReadIEEEBlock(BinaryType_UI1)
' Write learn string back to oscilloscope using ":SYSTem:SETup" command:
myScope.WriteIEEEBlock ":SYSTem:SETup ", varQueryResult
When you read the result of multiple queries into a single string variable,
each response is separated by a semicolon. For example, the output of the
previous example would be:
Timebase range; delay: <range_value>;<delay_value>
47
Getting Started
strResults() = myScope.ReadList(ASCIIType_BSTR)
MsgBox "Timebase range: " + strResults(0) + ", delay: " + strResults(1)
48
Getting Started
Telnet Sockets
The following information is provided for programmers who wish to
control the oscilloscope with SCPI commands in a Telnet session.
To connect to the oscilloscope via a telnet socket, issue the following
command:
telnet <hostname> 5024
where <hostname> is the hostname of the oscilloscope. This will give you a
command line with prompt.
For a command line without a prompt, use port 5025. For example:
telnet <hostname> 5025
49
50
Getting Started
4
Commands Quick Reference
Command Summary 52
Syntax Elements 85
51
Command Summary
Table 2
Command
Query
n/a
n/a
n/a
n/a
AGILENT TECHNOLOGIES,<model>,
<serial number>,X.XX.XX
<model> ::= the model number of
the instrument
<serial number> ::= the serial
number of the instrument
<X.XX.XX> ::= the software
revision of the instrument
n/a
52
Table 2
Command
Query
n/a
n/a
<value> ::= {0 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9}
n/a
n/a
<value> ::= {0 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9}
53
Table 2
Command
Query
n/a
n/a
n/a
n/a
n/a
n/a
Table 3
Command
Query
n/a
:AUToscale
[<source>[,..,<source
>]] (see page 120)
n/a
:AUToscale:AMODE
<value> (see
page 122)
:AUToscale:AMODE?
(see page 122)
:AUToscale:CHANnels
<value> (see
page 123)
:AUToscale:CHANnels?
(see page 123)
:BLANk [<source>]
(see page 124)
n/a
:CDISplay (see
page 125)
n/a
n/a
54
Table 3
Command
Query
:DIGitize
[<source>[,..,<source
>]] (see page 126)
n/a
:HWEenable? (see
page 128)
n/a
:HWERregister:CONDiti
on? (see page 130)
n/a
:HWERegister[:EVENt]?
(see page 132)
n/a
n/a
:OPERregister:CONDiti
on? (see page 137)
n/a
:OPERegister[:EVENt]?
(see page 139)
:OVLenable <mask>
(see page 141)
:OVLenable? (see
page 142)
n/a
:OVLRegister? (see
page 143)
:PRINt [<options>]
(see page 145)
n/a
55
Table 3
Command
Query
n/a
n/a
n/a
:SERial (see
page 147)
:SINGle (see
page 148)
n/a
n/a
n/a
:STATus? <display>
(see page 149)
{0 | 1}
<display> ::= {CHANnel<n> |
FUNCtion | MATH}
<n> ::= 1-2 or 1-4 in NR1 format
n/a
n/a
n/a
{0 | 1}
n/a
Table 4
Command
Query
n/a
:ACQuire:AALias? (see
page 155)
{1 | 0}
:ACQuire:COMPlete
<complete> (see
page 156)
:ACQuire:COMPlete?
(see page 156)
:ACQuire:COUNt
<count> (see
page 157)
:ACQuire:COUNt? (see
page 157)
:ACQuire:DAALias
<mode> (see page 158)
:ACQuire:DAALias?
(see page 158)
:ACQuire:MODE <mode>
(see page 159)
:ACQuire:MODE? (see
page 159)
n/a
:ACQuire:POINts? (see
page 160)
:ACQuire:SEGMented:CO
UNt <count> (see
page 161)
:ACQuire:SEGMented:CO
UNt? (see page 161)
:ACQuire:SEGMented:IN
Dex <index> (see
page 162)
:ACQuire:SEGMented:IN
Dex? (see page 162)
56
Table 4
Command
Query
n/a
:ACQuire:SRATe? (see
page 164)
:ACQuire:TYPE <type>
(see page 165)
:ACQuire:TYPE? (see
page 165)
Table 5
Command
Query
n/a
:CALibrate:DATE? (see
page 168)
:CALibrate:LABel
<string> (see
page 169)
:CALibrate:LABel?
(see page 169)
:CALibrate:STARt (see
page 170)
n/a
n/a
n/a
:CALibrate:STATus?
(see page 171)
n/a
:CALibrate:SWITch?
(see page 172)
{PROTected | UNPRotected}
n/a
:CALibrate:TEMPeratur
e? (see page 173)
n/a
:CALibrate:TIME? (see
page 174)
57
Table 6
Command
Query
:CHANnel<n>:BWLimit
{{0 | OFF} | {1 |
ON}} (see page 178)
:CHANnel<n>:BWLimit?
(see page 178)
{0 | 1}
<n> ::= 1-2 or 1-4 in NR1 format
:CHANnel<n>:COUPling
<coupling> (see
page 179)
:CHANnel<n>:COUPling?
(see page 179)
:CHANnel<n>:DISPlay
{{0 | OFF} | {1 |
ON}} (see page 180)
:CHANnel<n>:DISPlay?
(see page 180)
{0 | 1}
<n> ::= 1-2 or 1-4 in NR1 format
:CHANnel<n>:IMPedance
<impedance> (see
page 181)
:CHANnel<n>:IMPedance
? (see page 181)
:CHANnel<n>:INVert
{{0 | OFF} | {1 |
ON}} (see page 182)
:CHANnel<n>:INVert?
(see page 182)
{0 | 1}
<n> ::= 1-2 or 1-4 in NR1 format
:CHANnel<n>:LABel
<string> (see
page 183)
:CHANnel<n>:LABel?
(see page 183)
:CHANnel<n>:OFFSet
<offset>[suffix] (see
page 184)
:CHANnel<n>:OFFSet?
(see page 184)
:CHANnel<n>:PROBe
<attenuation> (see
page 185)
:CHANnel<n>:PROBe?
(see page 185)
n/a
:CHANnel<n>:PROBe:ID?
(see page 186)
:CHANnel<n>:PROBe:SKE
W <skew_value> (see
page 187)
:CHANnel<n>:PROBe:SKE
W? (see page 187)
:CHANnel<n>:PROBe:STY
Pe <signal type> (see
page 188)
:CHANnel<n>:PROBe:STY
Pe? (see page 188)
:CHANnel<n>:PROTectio
n (see page 189)
:CHANnel<n>:PROTectio
n? (see page 189)
{NORM | TRIP}
<n> ::= 1-2 or 1-4 in NR1 format
58
Table 6
Command
Query
:CHANnel<n>:RANGe
<range>[suffix] (see
page 190)
:CHANnel<n>:RANGe?
(see page 190)
:CHANnel<n>:SCALe
<scale>[suffix] (see
page 191)
:CHANnel<n>:SCALe?
(see page 191)
:CHANnel<n>:UNITs
<units> (see
page 192)
:CHANnel<n>:UNITs?
(see page 192)
:CHANnel<n>:VERNier
{{0 | OFF} | {1 |
ON}} (see page 193)
:CHANnel<n>:VERNier?
(see page 193)
{0 | 1}
<n> ::= 1-2 or 1-4 in NR1 format
Table 7
Command
Query
:DISPlay:CLEar (see
page 196)
n/a
n/a
:DISPlay:DATA
[<format>][,][<area>]
[,][<palette>]<displa
y data> (see
page 197)
:DISPlay:DATA?
[<format>][,][<area>]
[,][<palette>] (see
page 197)
:DISPlay:LABel {{0 |
OFF} | {1 | ON}} (see
page 199)
:DISPlay:LABel? (see
page 199)
{0 | 1}
:DISPlay:LABList
<binary block> (see
page 200)
:DISPlay:LABList?
(see page 200)
59
Table 7
Command
Query
:DISPlay:PERSistence
<value> (see
page 201)
:DISPlay:PERSistence?
(see page 201)
:DISPlay:SOURce
<value> (see
page 202)
:DISPlay:SOURce? (see
page 202)
:DISPlay:VECTors {{1
| ON} | {0 | OFF}}
(see page 203)
:DISPlay:VECTors?
(see page 203)
{1 | 0}
Table 8
Command
Query
:EXTernal:BWLimit
<bwlimit> (see
page 206)
:EXTernal:BWLimit?
(see page 206)
:EXTernal:IMPedance
<value> (see
page 207)
:EXTernal:IMPedance?
(see page 207)
:EXTernal:PROBe
<attenuation> (see
page 208)
:EXTernal:PROBe? (see
page 208)
n/a
:EXTernal:PROBe:ID?
(see page 209)
:EXTernal:PROBe:STYPe
<signal type> (see
page 210)
:EXTernal:PROBe:STYPe
? (see page 210)
:EXTernal:PROTection[
:CLEar] (see
page 211)
:EXTernal:PROTection?
(see page 211)
{NORM | TRIP}
:EXTernal:RANGe
<range>[<suffix>]
(see page 212)
:EXTernal:RANGe? (see
page 212)
:EXTernal:UNITs
<units> (see
page 213)
:EXTernal:UNITs? (see
page 213)
60
Table 9
Command
Query
:FUNCtion:CENTer
<frequency> (see
page 217)
:FUNCtion:CENTer?
(see page 217)
:FUNCtion:DISPlay {{0
| OFF} | {1 | ON}}
(see page 218)
:FUNCtion:DISPlay?
(see page 218)
{0 | 1}
:FUNCtion:GOFT:OPERat
ion <operation> (see
page 219)
:FUNCtion:GOFT:OPERat
ion? (see page 219)
:FUNCtion:GOFT:SOURce
1 <source> (see
page 220)
:FUNCtion:GOFT:SOURce
1? (see page 220)
:FUNCtion:GOFT:SOURce
2 <source> (see
page 221)
:FUNCtion:GOFT:SOURce
2? (see page 221)
:FUNCtion:OFFSet
<offset> (see
page 222)
:FUNCtion:OFFSet?
(see page 222)
:FUNCtion:OPERation
<operation> (see
page 223)
:FUNCtion:OPERation?
(see page 223)
:FUNCtion:RANGe
<range> (see
page 224)
:FUNCtion:RANGe? (see
page 224)
61
Table 9
Command
Query
:FUNCtion:REFerence
<level> (see
page 225)
:FUNCtion:REFerence?
(see page 225)
:FUNCtion:SCALe
<scale
value>[<suffix>] (see
page 226)
:FUNCtion:SCALe? (see
page 226)
:FUNCtion:SOURce1
<source> (see
page 227)
:FUNCtion:SOURce1?
(see page 227)
:FUNCtion:SOURce2
<source> (see
page 228)
:FUNCtion:SOURce2?
(see page 228)
:FUNCtion:SPAN <span>
(see page 229)
:FUNCtion:SPAN? (see
page 229)
:FUNCtion:WINDow
<window> (see
page 230)
:FUNCtion:WINDow?
(see page 230)
Query
:HARDcopy:AREA <area>
(see page 233)
:HARDcopy:AREA? (see
page 233)
:HARDcopy:APRinter
<active_printer> (see
page 234)
:HARDcopy:APRinter?
(see page 234)
62
Query
:HARDcopy:FACTors {{0
| OFF} | {1 | ON}}
(see page 235)
:HARDcopy:FACTors?
(see page 235)
{0 | 1}
:HARDcopy:FFEed {{0 |
OFF} | {1 | ON}} (see
page 236)
:HARDcopy:FFEed? (see
page 236)
{0 | 1}
:HARDcopy:INKSaver
{{0 | OFF} | {1 |
ON}} (see page 237)
:HARDcopy:INKSaver?
(see page 237)
{0 | 1}
:HARDcopy:PALette
<palette> (see
page 238)
:HARDcopy:PALette?
(see page 238)
n/a
:HARDcopy:PRinter:LIS
T? (see page 239)
:HARDcopy:STARt (see
page 240)
n/a
n/a
Query
:MARKer:MODE <mode>
(see page 243)
:MARKer:MODE? (see
page 243)
:MARKer:X1Position
<position>[suffix]
(see page 244)
:MARKer:X1Position?
(see page 244)
:MARKer:X1Y1source
<source> (see
page 245)
:MARKer:X1Y1source?
(see page 245)
63
Query
:MARKer:X2Position
<position>[suffix]
(see page 246)
:MARKer:X2Position?
(see page 246)
:MARKer:X2Y2source
<source> (see
page 247)
:MARKer:X2Y2source?
(see page 247)
n/a
:MARKer:XDELta? (see
page 248)
:MARKer:Y1Position
<position>[suffix]
(see page 249)
:MARKer:Y1Position?
(see page 249)
:MARKer:Y2Position
<position>[suffix]
(see page 250)
:MARKer:Y2Position?
(see page 250)
n/a
:MARKer:YDELta? (see
page 251)
Query
:MEASure:CLEar (see
page 259)
n/a
n/a
:MEASure:COUNter
[<source>] (see
page 260)
:MEASure:COUNter?
[<source>] (see
page 260)
64
Query
:MEASure:DEFine
DELay, <delay spec>
(see page 261)
:MEASure:DEFine?
DELay (see page 262)
:MEASure:DEFine
THResholds,
<threshold spec> (see
page 261)
:MEASure:DEFine?
THResholds (see
page 262)
:MEASure:DELay
[<source1>]
[,<source2>] (see
page 264)
:MEASure:DELay?
[<source1>]
[,<source2>] (see
page 264)
:MEASure:DUTYcycle
[<source>] (see
page 266)
:MEASure:DUTYcycle?
[<source>] (see
page 266)
:MEASure:FALLtime
[<source>] (see
page 267)
:MEASure:FALLtime?
[<source>] (see
page 267)
:MEASure:FREQuency
[<source>] (see
page 268)
:MEASure:FREQuency?
[<source>] (see
page 268)
:MEASure:NWIDth
[<source>] (see
page 269)
:MEASure:NWIDth?
[<source>] (see
page 269)
65
Query
:MEASure:OVERshoot
[<source>] (see
page 270)
:MEASure:OVERshoot?
[<source>] (see
page 270)
:MEASure:PERiod
[<source>] (see
page 272)
:MEASure:PERiod?
[<source>] (see
page 272)
:MEASure:PHASe
[<source1>]
[,<source2>] (see
page 273)
:MEASure:PHASe?
[<source1>]
[,<source2>] (see
page 273)
:MEASure:PREShoot
[<source>] (see
page 274)
:MEASure:PREShoot?
[<source>] (see
page 274)
:MEASure:PWIDth
[<source>] (see
page 275)
:MEASure:PWIDth?
[<source>] (see
page 275)
:MEASure:RISEtime
[<source>] (see
page 276)
:MEASure:RISEtime?
[<source>] (see
page 276)
:MEASure:SDEViation
[<source>] (see
page 277)
:MEASure:SDEViation?
[<source>] (see
page 277)
:MEASure:SHOW {1 |
ON} (see page 278)
:MEASure:SHOW? (see
page 278)
{1}
66
Query
:MEASure:SOURce
[<source1>]
[,<source2>] (see
page 279)
:MEASure:SOURce? (see
page 279)
n/a
:MEASure:TEDGe?
<slope><occurrence>[,
<source>] (see
page 281)
n/a
:MEASure:TVALue?
<value>,
[<slope>]<occurrence>
[,<source>] (see
page 283)
:MEASure:VAMPlitude
[<source>] (see
page 285)
:MEASure:VAMPlitude?
[<source>] (see
page 285)
:MEASure:VAVerage
[<source>] (see
page 286)
:MEASure:VAVerage?
[<source>] (see
page 286)
:MEASure:VBASe
[<source>] (see
page 287)
:MEASure:VBASe?
[<source>] (see
page 287)
67
Query
:MEASure:VMAX
[<source>] (see
page 288)
:MEASure:VMAX?
[<source>] (see
page 288)
:MEASure:VMIN
[<source>] (see
page 289)
:MEASure:VMIN?
[<source>] (see
page 289)
:MEASure:VPP
[<source>] (see
page 290)
:MEASure:VPP?
[<source>] (see
page 290)
:MEASure:VRATio
[<source1>]
[,<source2>] (see
page 273)
:MEASure:VRATio?
[<source1>]
[,<source2>] (see
page 291)
:MEASure:VRMS
[<source>] (see
page 292)
:MEASure:VRMS?
[<source>] (see
page 292)
n/a
:MEASure:VTIMe?
<vtime>[,<source>]
(see page 293)
:MEASure:VTOP
[<source>] (see
page 294)
:MEASure:VTOP?
[<source>] (see
page 294)
68
Query
:MEASure:XMAX
[<source>] (see
page 295)
:MEASure:XMAX?
[<source>] (see
page 295)
:MEASure:XMIN
[<source>] (see
page 296)
:MEASure:XMIN?
[<source>] (see
page 296)
Query
:RECall:FILename
<base_name> (see
page 298)
:RECall:FILename?
(see page 298)
:RECall:IMAGe[:STARt]
[<file_spec>] (see
page 299)
n/a
n/a
:RECall:PWD? (see
page 300)
:RECall:SETup[:STARt]
[<file_spec>] (see
page 301)
n/a
69
Query
:SAVE:FILename
<base_name> (see
page 304)
:SAVE:FILename? (see
page 304)
:SAVE:IMAGe[:STARt]
[<file_spec>] (see
page 305)
n/a
:SAVE:IMAGe:AREA
<area> (see page 306)
:SAVE:IMAGe:AREA?
(see page 306)
:SAVE:IMAGe:FACTors
{{0 | OFF} | {1 |
ON}} (see page 307)
:SAVE:IMAGe:FACTors?
(see page 307)
{0 | 1}
:SAVE:IMAGe:FORMat
<format> (see
page 308)
:SAVE:IMAGe:FORMat?
(see page 308)
:SAVE:IMAGe:INKSaver
{{0 | OFF} | {1 |
ON}} (see page 309)
:SAVE:IMAGe:INKSaver?
(see page 309)
{0 | 1}
:SAVE:IMAGe:PALette
<palette> (see
page 310)
:SAVE:IMAGe:PALette?
(see page 310)
n/a
:SAVE:PWD? (see
page 311)
:SAVE:SETup[:STARt]
[<file_spec>] (see
page 312)
n/a
:SAVE:WAVeform[:STARt
] [<file_name>] (see
page 313)
n/a
:SAVE:WAVeform:FORMat
<format> (see
page 314)
:SAVE:WAVeform:FORMat
? (see page 314)
:SAVE:WAVeform:LENGth
<length> (see
page 315)
:SAVE:WAVeform:LENGth
? (see page 315)
70
Query
n/a
:SBUS:CAN:COUNt:ERRor
? (see page 318)
n/a
:SBUS:CAN:COUNt:OVERl
oad? (see page 319)
:SBUS:CAN:COUNt:RESet
(see page 320)
n/a
n/a
n/a
:SBUS:CAN:COUNt:TOTal
? (see page 321)
n/a
:SBUS:CAN:COUNt:UTILi
zation? (see
page 322)
:SBUS:DISPlay {{0 |
OFF} | {1 | ON}} (see
page 323)
:SBUS:DISPlay? (see
page 323)
{0 | 1}
:SBUS:IIC:ASIZe
<size> (see page 324)
:SBUS:IIC:ASIZe? (see
page 324)
:SBUS:LIN:PARity {{0
| OFF} | {1 | ON}}
(see page 325)
:SBUS:LIN:PARity?
(see page 325)
{0 | 1}
:SBUS:MODE <mode>
(see page 326)
:SBUS:MODE? (see
page 326)
:SBUS:SPI:WIDTh
<word_width> (see
page 327)
:SBUS:SPI:WIDTh? (see
page 327)
:SBUS:UART:BASE
<base> (see page 328)
:SBUS:UART:BASE? (see
page 328)
n/a
:SBUS:UART:COUNt:ERRo
r? (see page 329)
:SBUS:UART:COUNt:RESe
t (see page 330)
n/a
n/a
n/a
:SBUS:UART:COUNt:RXFR
ames? (see page 331)
71
Query
n/a
:SBUS:UART:COUNt:TXFR
ames? (see page 332)
:SBUS:UART:FRAMing
<value> (see
page 333)
:SBUS:UART:FRAMing?
(see page 333)
Query
:SYSTem:DATE <date>
(see page 335)
:SYSTem:DATE? (see
page 335)
:SYSTem:DSP <string>
(see page 336)
n/a
n/a
:SYSTem:ERRor? (see
page 337)
:SYSTem:LOCK <value>
(see page 338)
:SYSTem:LOCK? (see
page 338)
:SYSTem:PROTection:LO
CK <value> (see
page 339)
:SYSTem:PROTection:LO
CK? (see page 339)
:SYSTem:SETup
<setup_data> (see
page 340)
:SYSTem:SETup? (see
page 340)
:SYSTem:TIME <time>
(see page 342)
:SYSTem:TIME? (see
page 342)
72
Query
:TIMebase:MODE
<value> (see
page 345)
:TIMebase:MODE? (see
page 345)
:TIMebase:POSition
<pos> (see page 346)
:TIMebase:POSition?
(see page 346)
:TIMebase:RANGe
<range_value> (see
page 347)
:TIMebase:RANGe? (see
page 347)
:TIMebase:REFerence
{LEFT | CENTer |
RIGHt} (see page 348)
:TIMebase:REFerence?
(see page 348)
:TIMebase:SCALe
<scale_value> (see
page 349)
:TIMebase:SCALe? (see
page 349)
:TIMebase:VERNier {{0
| OFF} | {1 | ON}}
(see page 350)
:TIMebase:VERNier?
(see page 350)
{0 | 1}
:TIMebase:WINDow:POSi
tion <pos> (see
page 351)
:TIMebase:WINDow:POSi
tion? (see page 351)
:TIMebase:WINDow:RANG
e <range_value> (see
page 352)
:TIMebase:WINDow:RANG
e? (see page 352)
:TIMebase:WINDow:SCAL
e <scale_value> (see
page 353)
:TIMebase:WINDow:SCAL
e? (see page 353)
Query
:TRIGger:HFReject {{0
| OFF} | {1 | ON}}
(see page 358)
:TRIGger:HFReject?
(see page 358)
{0 | 1}
:TRIGger:HOLDoff
<holdoff_time> (see
page 359)
:TRIGger:HOLDoff?
(see page 359)
<holdoff_time> ::= 60 ns to 10 s
in NR3 format
73
Query
:TRIGger:MODE <mode>
(see page 360)
:TRIGger:MODE? (see
page 360)
:TRIGger:NREJect {{0
| OFF} | {1 | ON}}
(see page 361)
:TRIGger:NREJect?
(see page 361)
{0 | 1}
:TRIGger:PATTern
<value>, <mask>
[,<edge
source>,<edge>] (see
page 362)
:TRIGger:PATTern?
(see page 362)
:TRIGger:SWEep
<sweep> (see
page 364)
:TRIGger:SWEep? (see
page 364)
74
Query
:TRIGger:CAN:PATTern:
DATA <value>, <mask>
(see page 367)
:TRIGger:CAN:PATTern:
DATA? (see page 367)
:TRIGger:CAN:PATTern:
DATA:LENGth <length>
(see page 368)
:TRIGger:CAN:PATTern:
DATA:LENGth? (see
page 368)
:TRIGger:CAN:PATTern:
ID <value>, <mask>
(see page 369)
:TRIGger:CAN:PATTern:
ID? (see page 369)
:TRIGger:CAN:PATTern:
ID:MODE <value> (see
page 370)
:TRIGger:CAN:PATTern:
ID:MODE? (see
page 370)
:TRIGger:CAN:SAMPlepo
int <value> (see
page 371)
:TRIGger:CAN:SAMPlepo
int? (see page 371)
:TRIGger:CAN:SIGNal:B
AUDrate <baudrate>
(see page 372)
:TRIGger:CAN:SIGNal:B
AUDrate? (see
page 372)
75
Query
:TRIGger:CAN:SOURce
<source> (see
page 373)
:TRIGger:CAN:SOURce?
(see page 373)
:TRIGger:CAN:TRIGger
<condition> (see
page 374)
:TRIGger:CAN:TRIGger?
(see page 375)
Query
:TRIGger:DURation:GRE
aterthan <greater
than time>[suffix]
(see page 377)
:TRIGger:DURation:GRE
aterthan? (see
page 377)
:TRIGger:DURation:LES
Sthan <less than
time>[suffix] (see
page 378)
:TRIGger:DURation:LES
Sthan? (see page 378)
:TRIGger:DURation:PAT
Tern <value>, <mask>
(see page 379)
:TRIGger:DURation:PAT
Tern? (see page 379)
:TRIGger:DURation:QUA
Lifier <qualifier>
(see page 380)
:TRIGger:DURation:QUA
Lifier? (see
page 380)
:TRIGger:DURation:RAN
Ge <greater than
time>[suffix], <less
than time>[suffix]
(see page 381)
:TRIGger:DURation:RAN
Ge? (see page 381)
76
Query
:TRIGger[:EDGE]:COUPl
ing {AC | DC | LF}
(see page 383)
:TRIGger[:EDGE]:COUPl
ing? (see page 383)
{AC | DC | LF}
:TRIGger[:EDGE]:LEVel
<level> [,<source>]
(see page 384)
:TRIGger[:EDGE]:LEVel
? [<source>] (see
page 384)
:TRIGger[:EDGE]:REJec
t {OFF | LF | HF}
(see page 385)
:TRIGger[:EDGE]:REJec
t? (see page 385)
{OFF | LF | HF}
:TRIGger[:EDGE]:SLOPe
<polarity> (see
page 386)
:TRIGger[:EDGE]:SLOPe
? (see page 386)
:TRIGger[:EDGE]:SOURc
e <source> (see
page 387)
:TRIGger[:EDGE]:SOURc
e? (see page 387)
Query
:TRIGger:GLITch:GREat
erthan <greater than
time>[suffix] (see
page 389)
:TRIGger:GLITch:GREat
erthan? (see
page 389)
:TRIGger:GLITch:LESSt
han <less than
time>[suffix] (see
page 390)
:TRIGger:GLITch:LESSt
han? (see page 390)
77
Query
:TRIGger:GLITch:LEVel
<level> [<source>]
(see page 391)
:TRIGger:GLITch:LEVel
? (see page 391)
:TRIGger:GLITch:POLar
ity <polarity> (see
page 392)
:TRIGger:GLITch:POLar
ity? (see page 392)
:TRIGger:GLITch:QUALi
fier <qualifier> (see
page 393)
:TRIGger:GLITch:QUALi
fier? (see page 393)
:TRIGger:GLITch:RANGe
<greater than
time>[suffix], <less
than time>[suffix]
(see page 394)
:TRIGger:GLITch:RANGe
? (see page 394)
:TRIGger:GLITch:SOURc
e <source> (see
page 395)
:TRIGger:GLITch:SOURc
e? (see page 395)
Query
:TRIGger:IIC:PATTern:
ADDRess <value> (see
page 397)
:TRIGger:IIC:PATTern:
ADDRess? (see
page 397)
:TRIGger:IIC:PATTern:
DATA <value> (see
page 398)
:TRIGger:IIC:PATTern:
DATA? (see page 398)
:TRIGger:IIC:PATTern:
DATa2 <value> (see
page 399)
:TRIGger:IIC:PATTern:
DATa2? (see page 399)
78
Query
:TRIGger:IIC[:SOURce]
:CLOCk <source> (see
page 400)
:TRIGger:IIC[:SOURce]
:CLOCk? (see
page 400)
:TRIGger:IIC[:SOURce]
:DATA <source> (see
page 401)
:TRIGger:IIC[:SOURce]
:DATA? (see page 401)
:TRIGger:IIC:TRIGger:
QUALifier <value>
(see page 402)
:TRIGger:IIC:TRIGger:
QUALifier? (see
page 402)
:TRIGger:IIC:TRIGger[
:TYPE] <type> (see
page 403)
:TRIGger:IIC:TRIGger[
:TYPE]? (see
page 403)
Query
:TRIGger:LIN:ID
<value> (see
page 406)
:TRIGger:LIN:ID? (see
page 406)
:TRIGger:LIN:SAMPlepo
int <value> (see
page 407)
:TRIGger:LIN:SAMPlepo
int? (see page 407)
:TRIGger:LIN:SIGNal:B
AUDrate <baudrate>
(see page 408)
:TRIGger:LIN:SIGNal:B
AUDrate? (see
page 408)
79
Query
:TRIGger:LIN:SOURce
<source> (see
page 409)
:TRIGger:LIN:SOURce?
(see page 409)
:TRIGger:LIN:STANdard
<std> (see page 410)
:TRIGger:LIN:STANdard
? (see page 410)
:TRIGger:LIN:SYNCbrea
k <value> (see
page 411)
:TRIGger:LIN:SYNCbrea
k? (see page 411)
:TRIGger:LIN:TRIGger
<condition> (see
page 412)
:TRIGger:LIN:TRIGger?
(see page 412)
Query
:TRIGger:TV:LINE
<line number> (see
page 423)
:TRIGger:TV:LINE?
(see page 423)
:TRIGger:TV:MODE <tv
mode> (see page 424)
:TRIGger:TV:MODE?
(see page 424)
:TRIGger:TV:POLarity
<polarity> (see
page 425)
:TRIGger:TV:POLarity?
(see page 425)
:TRIGger:TV:SOURce
<source> (see
page 426)
:TRIGger:TV:SOURce?
(see page 426)
:TRIGger:TV:STANdard
<standard> (see
page 427)
:TRIGger:TV:STANdard?
(see page 427)
80
Query
:TRIGger:UART:BAUDrat
e <baudrate> (see
page 430)
:TRIGger:UART:BAUDrat
e? (see page 430)
:TRIGger:UART:BITorde
r <bitorder> (see
page 431)
:TRIGger:UART:BITorde
r? (see page 431)
:TRIGger:UART:BURSt
<value> (see
page 432)
:TRIGger:UART:BURSt?
(see page 432)
:TRIGger:UART:DATA
<value> (see
page 433)
:TRIGger:UART:DATA?
(see page 433)
:TRIGger:UART:IDLE
<time_value> (see
page 434)
:TRIGger:UART:IDLE?
(see page 434)
:TRIGger:UART:PARity
<parity> (see
page 435)
:TRIGger:UART:PARity?
(see page 435)
:TRIGger:UART:POLarit
y <polarity> (see
page 436)
:TRIGger:UART:POLarit
y? (see page 436)
:TRIGger:UART:QUALifi
er <value> (see
page 437)
:TRIGger:UART:QUALifi
er? (see page 437)
:TRIGger:UART:SOURce:
RX <source> (see
page 438)
:TRIGger:UART:SOURce:
RX? (see page 438)
81
Query
:TRIGger:UART:SOURce:
TX <source> (see
page 439)
:TRIGger:UART:SOURce:
TX? (see page 439)
:TRIGger:UART:TYPE
<value> (see
page 440)
:TRIGger:UART:TYPE?
(see page 440)
<value> ::=
RDATa | RD1
PARityerror
TDATa | TD1
:TRIGger:UART:WIDTh
<width> (see
page 441)
:TRIGger:UART:WIDTh?
(see page 441)
<width> ::= {5 | 6 | 7 | 8 | 9}
{RSTArt | RSTOp |
| RD0 | RDX |
| TSTArt | TSTOp |
| TD0 | TDX}
Query
:WAVeform:BYTeorder
<value> (see
page 449)
:WAVeform:BYTeorder?
(see page 449)
n/a
:WAVeform:COUNt? (see
page 450)
n/a
:WAVeform:DATA? (see
page 451)
:WAVeform:FORMat
<value> (see
page 453)
:WAVeform:FORMat?
(see page 453)
82
Query
:WAVeform:POINts
<# points> (see
page 454)
:WAVeform:POINts?
(see page 454)
:WAVeform:POINts:MODE
<points_mode> (see
page 456)
:WAVeform:POINts:MODE
? (see page 456)
n/a
:WAVeform:PREamble?
(see page 458)
0
1
2
3
for
for
for
for
NORMal type
PEAK detect type
AVERage type
HRESolution type
:WAVeform:SEGMented:C
OUNt? (see page 461)
n/a
:WAVeform:SEGMented:T
TAG? (see page 462)
:WAVeform:SOURce
<source> (see
page 463)
:WAVeform:SOURce?
(see page 463)
83
Query
:WAVeform:SOURce:SUBS
ource <subsource>
(see page 467)
:WAVeform:SOURce:SUBS
ource? (see page 467)
n/a
:WAVeform:TYPE? (see
page 468)
:WAVeform:UNSigned
{{0 | OFF} | {1 |
ON}} (see page 469)
:WAVeform:UNSigned?
(see page 469)
{0 | 1}
:WAVeform:VIEW <view>
(see page 470)
:WAVeform:VIEW? (see
page 470)
n/a
:WAVeform:XINCrement?
(see page 471)
n/a
:WAVeform:XORigin?
(see page 472)
n/a
:WAVeform:XREFerence?
(see page 473)
<return_value> ::= 0
(x-reference value in the current
preamble in NR1 format)
n/a
:WAVeform:YINCrement?
(see page 474)
n/a
:WAVeform:YORigin?
(see page 475)
n/a
:WAVeform:YREFerence?
(see page 476)
84
Syntax Elements
"Number Format" on page 85
"<NL> (Line Terminator)" on page 85
"[ ] (Optional Syntax Terms)" on page 85
"{ } (Braces)" on page 85
"::= (Defined As)" on page 85
"< > (Angle Brackets)" on page 86
"... (Ellipsis)" on page 86
"n,..,p (Value Ranges)" on page 86
"d (Digits)" on page 86
"Quoted ASCII String" on page 86
"Definite- Length Block Response Data" on page 86
Number Format
NR1 specifies integer data.
NR3 specifies exponential data in floating point format (for example,
- 1.0E- 3).
{ } (Braces)
When several items are enclosed by braces, { }, only one of these elements
may be selected. Vertical line ( | ) indicates "or". For example, {ON | OFF}
indicates that only ON or OFF may be selected, not both.
85
For example, <A> ::= <B> indicates that <A> can be replaced by <B> in any
statement containing <A>.
... (Ellipsis)
... An ellipsis (trailing dots) indicates that the preceding element may be
repeated one or more times.
d (Digits)
d ::= A single ASCII numeric character 0 - 9.
In order to read quoted ASCII strings from query return values, some
programming languages require special handling or syntax.
86
87
88
5
Commands by Subsystem
Subsystem
Description
89
Commands by Subsystem
Command Types
Subsystem
Description
90
Commands by Subsystem
Query
n/a
n/a
n/a
n/a
AGILENT TECHNOLOGIES,<model>,
<serial number>,X.XX.XX
<model> ::= the model number of
the instrument
<serial number> ::= the serial
number of the instrument
<X.XX.XX> ::= the software
revision of the instrument
n/a
91
Commands by Subsystem
Query
n/a
n/a
<value> ::= {0 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9}
n/a
n/a
<value> ::= {0 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9}
92
Commands by Subsystem
Query
n/a
n/a
n/a
n/a
n/a
n/a
Introduction to
Common (*)
Commands
The common commands are defined by the IEEE 488.2 standard. They are
implemented by all instruments that comply with the IEEE 488.2 standard.
They provide some of the basic instrument functions, such as instrument
identification and reset, reading the instrument setup, and determining
how status is read and cleared.
Common commands can be received and processed by the instrument
whether they are sent over the interface as separate program messages or
within other program messages. If an instrument subsystem has been
selected and a common command is received by the instrument, the
instrument remains in the selected subsystem. For example, if the program
message ":ACQuire:TYPE AVERage; *CLS; COUNt 256" is received by the
instrument, the instrument sets the acquire type, then clears the status
information and sets the average count.
In contrast, if a root level command or some other subsystem command is
within the program message, you must re- enter the original subsystem
after the command. For example, the program message ":ACQuire:TYPE
AVERage; :AUToscale; :ACQuire:COUNt 256" sets the acquire type,
completes the autoscale, then sets the acquire count. In this example,
:ACQuire must be sent again after the :AUToscale command in order to
re- enter the ACQuire subsystem and set the count.
93
Commands by Subsystem
NOTE
94
Each of the status registers has an enable (mask) register. By setting the bits in the enable
register, you can select the status information you want to use.
Commands by Subsystem
*CLS
The *CLS common command clears the status data structures, the
device- defined error queue, and the Request- for- OPC flag.
NOTE
See Also
If the *CLS command immediately follows a program message terminator, the output queue
and the MAV (message available) bit are cleared.
95
Commands by Subsystem
*ESE <mask_argument>
<mask_argument> ::= integer from 0 to 255
The *ESE common command sets the bits in the Standard Event Status
Enable Register. The Standard Event Status Enable Register contains a
mask value for the bits to be enabled in the Standard Event Status
Register. A "1" in the Standard Event Status Enable Register enables the
corresponding bit in the Standard Event Status Register. A zero disables
the bit.
25
321
854
&0(
(;(
''(
4<(
54/
23&
(65"
6WDQGDUG(YHQW
6WDWXV5HJLVWHU
(6(
(6("
6WDQGDUG(YHQW
6WDWXV(QDEOH
0DVN5HJLVWHU
7R(6%ELWLQ
6WDWXV%\WH
5HJLVWHU
96
Bit
Name
Description
PON
Power On
URQ
User Request
CME
Command Error
EXE
Execution Error
DDE
QYE
Query Error
Commands by Subsystem
Query Syntax
Bit
Name
Description
RQL
Request Control
OPC
Operation Complete
*ESE?
The *ESE? query returns the current contents of the Standard Event
Status Enable Register.
Return Format
<mask_argument><NL>
<mask_argument> ::= 0,..,255; an integer in NR1 format.
See Also
97
Commands by Subsystem
*ESR?
The *ESR? query returns the contents of the Standard Event Status
Register. When you read the Event Status Register, the value returned is
the total bit weights of all of the bits that are high at the time you read
the byte. Reading the register clears the Event Status Register.
The following table shows bit weight, name, and condition for each bit.
25
321
854
&0(
(;(
''(
4<(
54/
23&
(65"
6WDQGDUG(YHQW
6WDWXV5HJLVWHU
(6(
(6("
6WDQGDUG(YHQW
6WDWXV(QDEOH
0DVN5HJLVWHU
7R(6%ELWLQ
6WDWXV%\WH
5HJLVWHU
98
Bit
Name
Description
PON
Power On
URQ
User Request
CME
Command Error
EXE
Execution Error
DDE
QYE
Query Error
Commands by Subsystem
Return Format
Bit
Name
Description
RQL
Request Control
OPC
Operation Complete
Operation is complete.
<status><NL>
<status> ::= 0,..,255; an integer in NR1 format.
NOTE
See Also
Reading the Standard Event Status Register clears it. High or 1 indicates the bit is true.
99
Commands by Subsystem
*IDN?
The *IDN? query identifies the instrument type and software version.
Return Format
See Also
100
Commands by Subsystem
*LRN?
The *LRN? query result contains the current state of the instrument. This
query is similar to the :SYSTem:SETup? (see page 340) query, except that
it contains ":SYST:SET " before the binary block data. The query result is a
valid command that can be used to restore instrument settings at a later
time.
Return Format
<learn_string><NL>
<learn_string> ::= :SYST:SET <setup_data>
<setup_data> ::= binary block data in IEEE 488.2 # format
<learn string> specifies the current instrument setup. The block size is
subject to change with different firmware revisions.
NOTE
See Also
The *LRN? query return format has changed from previous Agilent oscilloscopes to match
the IEEE 488.2 specification which says that the query result must contain ":SYST:SET "
before the binary block data.
101
Commands by Subsystem
*OPC
The *OPC command sets the operation complete bit in the Standard Event
Status Register when all pending device operations have finished.
Query Syntax
*OPC?
The *OPC? query places an ASCII "1" in the output queue when all
pending device operations have completed. The interface hangs until this
query returns.
Return Format
<complete><NL>
<complete> ::= 1
See Also
102
Commands by Subsystem
*OPT?
The *OPT? query reports the options installed in the instrument. This
query returns a string that identifies the module and its software revision
level.
Return Format
0,0,<license info>
<license info> ::= <All field>,<reserved>,<reserved>,<reserved>,
<reserved>,<reserved>,<Low Speed Serial>,
<Automotive Serial>,<reserved>,<Secure>,<reserved>,
<reserved>,<reserved>,<reserved>,
<RS-232/UART Serial>,<reserved>
<All field> ::= {0 | All}
<reserved> ::= 0
<Low Speed Serial> ::= {0 | LSS}
<Automotive Serial> ::= {0 | AMS}
<Secure> ::= {0 | SEC}
<RS-232/UART Serial> ::= {0 | 232}
See Also
Module
Module Id
No modules attached
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
103
Commands by Subsystem
*RCL (Recall)
(see page 586)
Command Syntax
*RCL <value>
<value> ::= {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}
The *RCL command restores the state of the instrument from the specified
save/recall register.
See Also
104
Commands by Subsystem
*RST (Reset)
(see page 586)
Command Syntax
*RST
Normal
Realtime
On
Averaging
Off
# Averages
On
Channel 2
Off
Volts/division
5.00 V
Offset
0.00
Coupling
DC
Probe attenuation
Vernier
Off
Invert
Off
BW limit
Off
Impedance
1 M Ohm
Units
Volts
Skew
Cursor Menu
Source
Channel 1
105
Commands by Subsystem
Display Menu
Definite persistence
Off
Grid
33%
Vectors
On
Channel 1
Run Control
Scope is running
100 us
0.00 s
Delay time/division
500 ns
0.00 s
Reference
center
Mode
main
Vernier
Off
Trigger Menu
106
Type
Edge
Mode
Auto
Coupling
dc
Source
Channel 1
Level
0.0 V
Slope
Positive
Off
Holdoff
60 ns
Commands by Subsystem
Trigger Menu
See Also
Example Code
External Units
Volts
External Impedance
1 M Ohm
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
107
Commands by Subsystem
*SAV (Save)
(see page 586)
Command Syntax
*SAV <value>
<value> ::= {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}
The *SAV command stores the current state of the instrument in a save
register. The data parameter specifies the register where the data will be
saved.
See Also
108
Commands by Subsystem
*SRE <mask>
<mask> ::= integer with values defined in the following table.
The *SRE command sets the bits in the Service Request Enable Register.
The Service Request Enable Register contains a mask value for the bits to
be enabled in the Status Byte Register. A one in the Service Request
Enable Register enables the corresponding bit in the Status Byte Register.
A zero disables the bit.
)URP
2SHUDWLRQ
6WDWXV
5HJLVWHUV
)URP
6WDQGDUG
(YHQW
6WDWXV
5HJLVWHUV
75*
5HJ
2XWSXW
4XHXH
546
23(5 066 (6% 0$9
25
7(5"
7ULJJHU(YHQW5HJLVWHU
67%"
6WDWXV%\WH5HJLVWHU
65(
65("
6HUYLFH5HTXHVW(QDEOH
0DVN5HJLVWHU
654
6HUYLFH5HTXHVW
Name
Description
OPER
---
---
(Not used.)
109
Commands by Subsystem
Query Syntax
Bit
Name
Description
ESB
MAV
Message Available
---
---
(Not used.)
MSG
Message
USR
User Event
TRG
Trigger
*SRE?
The *SRE? query returns the current value of the Service Request Enable
Register.
Return Format
<mask><NL>
<mask> ::= sum of all bits that are set, 0,..,255;
an integer in NR1 format
See Also
110
Commands by Subsystem
*STB?
The *STB? query returns the current value of the instrument's status byte.
The MSS (Master Summary Status) bit is reported on bit 6 instead of the
RQS (request service) bit. The MSS indicates whether or not the device
has at least one reason for requesting service.
Return Format
<value><NL>
<value> ::= 0,..,255; an integer in NR1 format
)URP
2SHUDWLRQ
6WDWXV
5HJLVWHUV
)URP
6WDQGDUG
(YHQW
6WDWXV
5HJLVWHUV
75*
5HJ
2XWSXW
4XHXH
546
23(5 066 (6% 0$9
25
7(5"
7ULJJHU(YHQW5HJLVWHU
67%"
6WDWXV%\WH5HJLVWHU
65(
65("
6HUYLFH5HTXHVW(QDEOH
0DVN5HJLVWHU
654
6HUYLFH5HTXHVW
Name
Description
OPER
111
Commands by Subsystem
NOTE
See Also
Bit
Name
Description
RQS
Request Service
MSS
ESB
MAV
Message Available
---
---
MSG
Message
USR
User Event
TRG
Trigger
To read the instrument's status byte with RQS reported on bit 6, use the interface Serial
Poll.
112
Commands by Subsystem
*TRG (Trigger)
(see page 586)
Command Syntax
*TRG
The *TRG command has the same effect as the :DIGitize command with no
parameters.
See Also
113
Commands by Subsystem
*TST?
The *TST? query performs a self- test on the instrument. The result of the
test is placed in the output queue. A zero indicates the test passed and a
non- zero indicates the test failed. If the test fails, refer to the
troubleshooting section of the Service Guide.
Return Format
<result><NL>
<result> ::= 0 or non-zero value; an integer in NR1 format
See Also
114
Commands by Subsystem
*WAI
The *WAI command has no function in the oscilloscope, but is parsed for
compatibility with other instruments.
See Also
115
Commands by Subsystem
Query
n/a
:AUToscale
[<source>[,..,<source
>]] (see page 120)
n/a
:AUToscale:AMODE
<value> (see
page 122)
:AUToscale:AMODE?
(see page 122)
:AUToscale:CHANnels
<value> (see
page 123)
:AUToscale:CHANnels?
(see page 123)
:BLANk [<source>]
(see page 124)
n/a
:CDISplay (see
page 125)
n/a
n/a
:DIGitize
[<source>[,..,<source
>]] (see page 126)
n/a
:HWEenable? (see
page 128)
n/a
:HWERregister:CONDiti
on? (see page 130)
n/a
:HWERegister[:EVENt]?
(see page 132)
n/a
n/a
:OPERregister:CONDiti
on? (see page 137)
116
Commands by Subsystem
Query
n/a
:OPERegister[:EVENt]?
(see page 139)
:OVLenable <mask>
(see page 141)
:OVLenable? (see
page 142)
n/a
:OVLRegister? (see
page 143)
:PRINt [<options>]
(see page 145)
n/a
n/a
n/a
n/a
:SERial (see
page 147)
:SINGle (see
page 148)
n/a
n/a
n/a
:STATus? <display>
(see page 149)
{0 | 1}
<display> ::= {CHANnel<n> |
FUNCtion | MATH}
<n> ::= 1-2 or 1-4 in NR1 format
n/a
n/a
n/a
{0 | 1}
n/a
117
Commands by Subsystem
Introduction to
Root (:)
Commands
118
Commands by Subsystem
:AER?
The AER query reads the Arm Event Register. After the Arm Event
Register is read, it is cleared. A "1" indicates the trigger system is in the
armed state, ready to accept a trigger.
The Armed Event Register is summarized in the Wait Trig bit of the
Operation Status Event Register. A Service Request can be generated when
the Wait Trig bit transitions and the appropriate enable bits have been set
in the Operation Status Enable Register (OPEE) and the Service Request
Enable Register (SRE).
Return Format
<value><NL>
<value> ::= {0 | 1}; an integer in NR1 format.
See Also
119
Commands by Subsystem
:AUToscale
(see page 586)
Command Syntax
:AUToscale
:AUToscale [<source>[,..,<source>]]
<source> ::= CHANnel<n>
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The <source> parameter may be repeated up to 5 times.
The :AUToscale command evaluates all input signals and sets the correct
conditions to display the signals. This is the same as pressing the
Autoscale key on the front panel.
If one or more sources are specified, those specified sources will be
enabled and all others blanked. The autoscale channels mode (see
":AUToscale:CHANnels" on page 123) is set to DISPlayed channels. Then,
the autoscale is performed.
When the :AUToscale command is sent, the following conditions are
affected and actions are taken:
Thresholds.
Channels with activity around the trigger point are turned on, others
are turned off.
Channels are reordered on screen; analog channel 1 first, followed by
the remaining analog channels.
Delay is set to 0 seconds.
Time/Div.
The :AUToscale command does not affect the following conditions:
Label names.
Trigger conditioning.
The :AUToscale command turns off the following items:
Cursors.
Measurements.
Trace memories.
Delayed time base mode.
For further information on :AUToscale, see the User's Guide.
See Also
120
Commands by Subsystem
' AUTOSCALE - This command evaluates all the input signals and sets
' the correct conditions to display all of the active signals.
myScope.WriteString ":AUTOSCALE"
' Same as pressing Autoscale key.
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
121
Commands by Subsystem
:AUToscale:AMODE
(see page 586)
Command Syntax
:AUToscale:AMODE <value>
<value> ::= {NORMal | CURRent}
:AUToscale:AMODE?
<value><NL>
<value> ::= {NORM | CURR}
See Also
122
Commands by Subsystem
:AUToscale:CHANnels
(see page 586)
Command Syntax
:AUToscale:CHANnels <value>
<value> ::= {ALL | DISPlayed}
:AUToscale:CHANnels?
<value><NL>
<value> ::= {ALL | DISP}
See Also
123
Commands by Subsystem
:BLANk
(see page 586)
Command Syntax
:BLANk [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH | SBUS}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The :BLANk command turns off (stops displaying) the specified channel,
math function, or serial decode bus. The :BLANk command with no
parameter turns off all sources.
NOTE
To turn on (start displaying) a channel, etc., use the :VIEW command. The DISPlay
commands, :CHANnel<n>:DISPlay, :FUNCtion:DISPlay, or :SBUS:DISPlay are the preferred
method to turn on/off a channel, etc.
NOTE
See Also
Example Code
124
Commands by Subsystem
:CDISplay
(see page 586)
Command Syntax
:CDISplay
The :CDISplay command clears the display and resets all associated
measurements. If the oscilloscope is stopped, all currently displayed data
is erased. If the oscilloscope is running, all the data in active channels and
functions is erased; however, new data is displayed on the next
acquisition.
See Also
125
Commands by Subsystem
:DIGitize
(see page 586)
Command Syntax
:DIGitize [<source>[,..,<source>]]
<source> ::= {CHANnel<n> | FUNCtion | MATH | SBUS}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The <source> parameter may be repeated up to 5 times.
NOTE
NOTE
See Also
Example Code
126
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
Commands by Subsystem
' because this is greater than the maximum sample rate by 5 times,
' only 400 points (or 1/5 the points) can be gathered on a single
' trigger. Keep in mind when the oscilloscope is running,
' communication with the computer interrupts data acquisition.
' Setting up the oscilloscope over the bus causes the data buffers
' to be cleared and internal hardware to be reconfigured. If a
' measurement is immediately requested, there may have not been
' enough time for the data acquisition process to collect data, and
' the results may not be accurate. An error value of 9.9E+37 may be
' returned over the bus in this situation.
'
myScope.WriteString ":DIGITIZE CHAN1"
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
127
Commands by Subsystem
:HWEenable <mask>
<mask> ::= 16-bit integer
+:(5HJLVWHU&21'LWLRQ"
+DUGZDUH(YHQW&RQGLWLRQ5HJLVWHU
3//
/RFNHG
+:(5HJLVWHU>(9(1W@"
+DUGZDUH(YHQW(YHQW5HJLVWHU
+:(HQDEOH
+:(HQDEOH"
+DUGZDUH(YHQW(QDEOH0DVN5HJLVWHU
25
7R+:(ELWLQ
2SHUDWLRQ6WDWXV
&RQGLWLRQ5HJLVWHU
Query Syntax
Bit
Name
Description
15-13
---
---
(Not used.)
12
PLL
Locked
PLL Locked
11-0
---
---
(Not used.)
:HWEenable?
<value><NL>
<value> ::= integer in NR1 format.
See Also
128
Commands by Subsystem
129
Commands by Subsystem
:HWERegister:CONDition?
+:(5HJLVWHU&21'LWLRQ"
+DUGZDUH(YHQW&RQGLWLRQ5HJLVWHU
3//
/RFNHG
+:(5HJLVWHU>(9(1W@"
+DUGZDUH(YHQW(YHQW5HJLVWHU
+:(HQDEOH
+:(HQDEOH"
+DUGZDUH(YHQW(QDEOH0DVN5HJLVWHU
25
7R+:(ELWLQ
2SHUDWLRQ6WDWXV
&RQGLWLRQ5HJLVWHU
Return Format
Bit
Name
Description
15-13
---
---
(Not used.)
12
PLL
Locked
PLL Locked
11-0
---
---
(Not used.)
<value><NL>
<value> ::= integer in NR1 format.
See Also
130
Commands by Subsystem
131
Commands by Subsystem
:HWERegister[:EVENt]?
+:(5HJLVWHU&21'LWLRQ"
+DUGZDUH(YHQW&RQGLWLRQ5HJLVWHU
3//
/RFNHG
+:(5HJLVWHU>(9(1W@"
+DUGZDUH(YHQW(YHQW5HJLVWHU
+:(HQDEOH
+:(HQDEOH"
+DUGZDUH(YHQW(QDEOH0DVN5HJLVWHU
25
7R+:(ELWLQ
2SHUDWLRQ6WDWXV
&RQGLWLRQ5HJLVWHU
Return Format
Bit
Name
Description
15-13
---
---
(Not used.)
12
PLL
Locked
PLL Locked
11-0
---
---
(Not used.)
<value><NL>
<value> ::= integer in NR1 format.
See Also
132
Commands by Subsystem
133
Commands by Subsystem
:MERGe
(see page 586)
Command Syntax
The :MERGe command stores the contents of the active display in the
specified pixel memory. The previous contents of the pixel memory are
overwritten. The pixel memories are PMEMory0 through PMEMory9. This
command is similar to the function of the "Save To: INTERN_<n>" key in
the Save/Recall menu.
See Also
134
Commands by Subsystem
:OPEE <mask>
<mask> ::= 16-bit integer
The :OPEE command sets a mask in the Operation Status Enable register.
Set any of the following bits to "1" to enable bit 7 in the Status Byte
Register and potentially cause an SRQ (Service Request interrupt to be
generated.
)URP+DUGZDUH
(YHQW5HJLVWHUV
)URP2YHUORDG
(YHQW5HJLVWHUV
$UP
5HJ
$(5"
5XQELWVHWLIRVFLOORVFRSHQRWVWRSSHG
+:( 29/5
:DLW
7ULJ
5XQ
+:( 29/5
:DLW
7ULJ
5XQ
23(5HUDWLRQ&21'LWLRQ"
2SHUDWLRQ6WDWXV&RQGLWLRQ5HJLVWHU
23(5DWLRQ>(9(1W@"
2SHUDWLRQ6WDWXV(YHQW5HJLVWHU
23((
23(("
2SHUDWLRQ6WDWXV(QDEOH
0DVN5HJLVWHU
25
7R23(5ELWLQ
6WDWXV%\WH
5HJLVWHU
Name
Description
15-13
---
---
(Not used.)
12
HWE
Hardware Event
11
OVLR
Overload
10-6
---
---
(Not used.)
Wait
Trig
Wait Trig
---
---
(Not used.)
135
Commands by Subsystem
Query Syntax
Bit
Name
Description
Run
Running
2-0
---
---
(Not used.)
:OPEE?
The :OPEE? query returns the current value contained in the Operation
Status Enable register as an integer number.
Return Format
<value><NL>
<value> ::= integer in NR1 format.
See Also
136
Commands by Subsystem
:OPERegister:CONDition?
)URP2YHUORDG
(YHQW5HJLVWHUV
$UP
5HJ
$(5"
5XQELWVHWLIRVFLOORVFRSHQRWVWRSSHG
:DLW
7ULJ
5XQ
+:( 29/5
:DLW
7ULJ
5XQ
+:( 29/5
23(5HUDWLRQ&21'LWLRQ"
2SHUDWLRQ6WDWXV&RQGLWLRQ5HJLVWHU
23(5DWLRQ>(9(1W@"
2SHUDWLRQ6WDWXV(YHQW5HJLVWHU
23((
23(("
2SHUDWLRQ6WDWXV(QDEOH
0DVN5HJLVWHU
25
7R23(5ELWLQ
6WDWXV%\WH
5HJLVWHU
Name
Description
15-13
---
---
(Not used.)
12
HWE
Hardware Event
11
OVLR
Overload
10-6
---
---
(Not used.)
Wait
Trig
Wait Trig
---
---
(Not used.)
Run
Running
2-0
---
---
(Not used.)
137
Commands by Subsystem
Return Format
<value><NL>
<value> ::= integer in NR1 format.
See Also
138
Commands by Subsystem
:OPERegister[:EVENt]?
)URP2YHUORDG
(YHQW5HJLVWHUV
$UP
5HJ
$(5"
5XQELWVHWLIRVFLOORVFRSHQRWVWRSSHG
:DLW
7ULJ
5XQ
+:( 29/5
:DLW
7ULJ
5XQ
+:( 29/5
23(5HUDWLRQ&21'LWLRQ"
2SHUDWLRQ6WDWXV&RQGLWLRQ5HJLVWHU
23(5DWLRQ>(9(1W@"
2SHUDWLRQ6WDWXV(YHQW5HJLVWHU
23((
23(("
2SHUDWLRQ6WDWXV(QDEOH
0DVN5HJLVWHU
25
7R23(5ELWLQ
6WDWXV%\WH
5HJLVWHU
Name
Description
15-13
---
---
(Not used.)
12
HWE
Hardware Event
11
OVLR
Overload
10-6
---
---
(Not used.)
Wait
Trig
Wait Trig
---
---
(Not used.)
Run
Running
2-0
---
---
(Not used.)
139
Commands by Subsystem
Return Format
<value><NL>
<value> ::= integer in NR1 format.
See Also
140
Commands by Subsystem
:OVLenable <enable_mask>
<enable_mask> ::= 16-bit integer
NOTE
29/5"
2YHUORDG(YHQW5HJLVWHU
29/
29/"
2YHUORDG(YHQW(QDEOH
0DVN5HJLVWHU
25
7R29/5ELWLQ
2 SHUDWLRQ6WDWXV
5HJLVWHU
Description
15-11
---
(Not used.)
10
Channel 4 Fault
Channel 3 Fault
141
Commands by Subsystem
Query Syntax
Bit
Description
Channel 2 Fault
Channel 1 Fault
---
(Not used.)
Channel 4 OVL
Channel 3 OVL
Channel 2 OVL
Channel 1 OVL
:OVLenable?
The :OVLenable query returns the current enable mask value contained in
the Overload Event Enable Register.
Return Format
<enable_mask><NL>
<enable_mask> ::= integer in NR1 format.
See Also
142
Commands by Subsystem
:OVLRegister?
The :OVLRegister query returns the overload protection value stored in the
Overload Event Register (OVLR). If an overvoltage is sensed on a 50
input, the input will automatically switch to 1 M input impedance. A "1"
indicates an overload has occurred.
You can set analog channel input impedance to 50. If there are only two analog channels,
you can also set external trigger input impedance to 50.
NOTE
29/5"
2YHUORDG(YHQW5HJLVWHU
29/
29/"
2YHUORDG(YHQW(QDEOH
0DVN5HJLVWHU
25
7R29/5ELWLQ
2 SHUDWLRQ6WDWXV
5HJLVWHU
Description
15-11
---
(Not used.)
10
Channel 4 Fault
Channel 3 Fault
Channel 2 Fault
Channel 1 Fault
---
(Not used.)
143
Commands by Subsystem
Return Format
Bit
Description
Channel 4 OVL
Channel 3 OVL
Channel 2 OVL
Channel 1 OVL
<value><NL>
<value> ::= integer in NR1 format.
See Also
144
Commands by Subsystem
:PRINt
(see page 586)
Command Syntax
:PRINt [<options>]
<options> ::= [<print option>][,..,<print option>]
<print option> ::= {COLor | GRAYscale | PRINter0 | BMP8bit | BMP | PNG
| NOFactors | FACTors}
The <print option> parameter may be repeated up to 5 times.
145
Commands by Subsystem
:RUN
(see page 586)
Command Syntax
:RUN
Example Code
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
146
Commands by Subsystem
:SERial
(see page 586)
Query Syntax
:SERial?
Unquoted string<NL>
147
Commands by Subsystem
:SINGle
(see page 586)
Command Syntax
:SINGle
148
Commands by Subsystem
:STATus
(see page 586)
Query Syntax
:STATus? <source>
<source> ::= {CHANnel<n> | FUNCtion | MATH | SBUS}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Return Format
<value><NL>
<value> ::= {1 | 0}
See Also
149
Commands by Subsystem
:STOP
(see page 586)
Command Syntax
:STOP
The :STOP command stops the acquisition. This is the same as pressing
the Stop key on the front panel.
See Also
Example Code
150
Commands by Subsystem
:TER?
The :TER? query reads the Trigger Event Register. After the Trigger Event
Register is read, it is cleared. A one indicates a trigger has occurred. A
zero indicates a trigger has not occurred.
The Trigger Event Register is summarized in the TRG bit of the Status
Byte Register (STB). A Service Request (SRQ) can be generated when the
TRG bit of the Status Byte transitions, and the TRG bit is set in the
Service Request Enable register. The Trigger Event Register must be
cleared each time you want a new service request to be generated.
Return Format
<value><NL>
<value> ::= {1 | 0}; a 16-bit integer in NR1 format.
See Also
151
Commands by Subsystem
:VIEW
(see page 586)
Command Syntax
:VIEW <source>
<source> ::= {CHANnel<n> | PMEMory0,..,PMEMory9 | FUNCtion | MATH
| SBUS}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
See Also
Example Code
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
152
Commands by Subsystem
:ACQuire Commands
Set the parameters for acquiring and storing data. See "Introduction to
:ACQuire Commands" on page 153.
Table 42 :ACQuire Commands Summary
Command
Query
n/a
:ACQuire:AALias? (see
page 155)
{1 | 0}
:ACQuire:COMPlete
<complete> (see
page 156)
:ACQuire:COMPlete?
(see page 156)
:ACQuire:COUNt
<count> (see
page 157)
:ACQuire:COUNt? (see
page 157)
:ACQuire:DAALias
<mode> (see page 158)
:ACQuire:DAALias?
(see page 158)
:ACQuire:MODE <mode>
(see page 159)
:ACQuire:MODE? (see
page 159)
n/a
:ACQuire:POINts? (see
page 160)
:ACQuire:SEGMented:CO
UNt <count> (see
page 161)
:ACQuire:SEGMented:CO
UNt? (see page 161)
:ACQuire:SEGMented:IN
Dex <index> (see
page 162)
:ACQuire:SEGMented:IN
Dex? (see page 162)
n/a
:ACQuire:SRATe? (see
page 164)
:ACQuire:TYPE <type>
(see page 165)
:ACQuire:TYPE? (see
page 165)
Introduction to
:ACQuire
Commands
153
Commands by Subsystem
Averaging
The :ACQuire:TYPE AVERage command sets the oscilloscope in the
averaging mode. You can set the count by sending the :ACQuire:COUNt
command followed by the number of averages. In this mode, the value for
averages is an integer from 2 to 65536. The COUNt value determines the
number of averages that must be acquired.
High-Resolution
The :ACQuire:TYPE HRESolution command sets the oscilloscope in the
high- resolution mode (also known as smoothing). This mode is used to
reduce noise at slower sweep speeds where the digitizer samples faster
than needed to fill memory for the displayed time range. Instead of
decimating samples, they are averaged together to provide the value for
one display point. The slower the sweep speed, the greater the number of
samples that are averaged together for each display point.
Peak Detect
The :ACQuire:TYPE PEAK command sets the oscilloscope in the peak
detect mode. In this mode, :ACQuire:COUNt has no meaning.
Real-time Mode
The :ACQuire:MODE RTIMe command sets the oscilloscope in real- time
mode. This mode is useful to inhibit equivalent time sampling at fast
sweep speeds.
Equivalent-time Mode
The :ACQuire:MODE ETIME command sets the oscilloscope in
equivalent- time mode.
Reporting the Setup
Use :ACQuire? to query setup information for the ACQuire subsystem.
Return Format
The following is a sample response from the :ACQuire? query. In this case,
the query was issued following a *RST command.
:ACQ:MODE RTIM;TYPE NORM;COMP 100;COUNT 8;SEGM:COUN 2
154
Commands by Subsystem
:ACQuire:AALias
(see page 586)
Query Syntax
:ACQuire:AALias?
<value><NL>
<value> ::= {1 | 0}
See Also
155
Commands by Subsystem
:ACQuire:COMPlete
(see page 586)
Command Syntax
:ACQuire:COMPlete <complete>
<complete> ::= 100; an integer in NR1 format
:ACQuire:COMPlete?
<completion_criteria><NL>
<completion_criteria> ::= 100; an integer in NR1 format
See Also
Example Code
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
156
Commands by Subsystem
:ACQuire:COUNt
(see page 586)
Command Syntax
:ACQuire:COUNt <count>
<count> ::= integer in NR1 format
NOTE
Query Syntax
The :ACQuire:COUNt 1 command has been deprecated. The AVERage acquisition type with
a count of 1 is functionally equivalent to the HRESolution acquisition type; however, you
should select the high-resolution acquisition mode with the :ACQuire:TYPE HRESolution
command instead.
:ACQuire:COUNT?
The :ACQuire:COUNT? query returns the currently selected count value for
averaging mode.
Return Format
<count_argument><NL>
<count_argument> ::= an integer from 2 to 65536 in NR1 format
See Also
157
Commands by Subsystem
:ACQuire:DAALias
(see page 586)
Command Syntax
:ACQuire:DAALias <mode>
<mode> ::= {DISable | AUTO}
The :ACQuire:DAALias command sets the disable anti- alias mode of the
oscilloscope.
When set to DISable, anti- alias is always disabled. This is good for cases
where dithered data is not desired.
When set to AUTO, the oscilloscope turns off anti- alias control as needed.
Such cases are when the FFT or differentiate math functions are silent.
The :DIGitize command always turns off the anti- alias control as well.
Query Syntax
:ACQuire:DAALias?
<mode><NL>
<mode> ::= {DIS | AUTO}
See Also
158
Commands by Subsystem
:ACQuire:MODE
(see page 586)
Command Syntax
:ACQuire:MODE <mode>
<mode> ::= {RTIMe | ETIMe | SEGMented}
NOTE
:ACQuire:MODE?
<mode_argument><NL>
<mode_argument> ::= {RTIM | ETIM | SEGM}
See Also
159
Commands by Subsystem
:ACQuire:POINts
(see page 586)
Query Syntax
:ACQuire:POINts?
The :ACQuire:POINts? query returns the number of data points that the
hardware will acquire from the input signal. The number of points
acquired is not directly controllable. To set the number of points to be
transferred from the oscilloscope, use the command :WAVeform:POINts. The
:WAVeform:POINts? query will return the number of points available to be
transferred from the oscilloscope.
Return Format
<points_argument><NL>
<points_argument> ::= an integer in NR1 format
See Also
160
Commands by Subsystem
:ACQuire:SEGMented:COUNt
(see page 586)
Command Syntax
:ACQuire:SEGMented:COUNt <count>
<count> ::= an integer from 2 to 250 in NR1 format
NOTE
This command is available when the segmented memory option (Option SGM) is enabled.
:ACQuire:SEGMented:COUNt?
<count><NL>
<count> ::= an integer from 2 to 250 in NR1 format
See Also
Example Code
161
Commands by Subsystem
:ACQuire:SEGMented:INDex
(see page 586)
Command Syntax
:ACQuire:SEGMented:INDex <index>
<index> ::= an integer from 2 to 250 in NR1 format
NOTE
This command is available when the segmented memory option (Option SGM) is enabled.
:ACQuire:SEGMented:INDex?
<index><NL>
<index> ::= an integer from 2 to 250 in NR1 format
See Also
Example Code
162
Commands by Subsystem
163
Commands by Subsystem
:ACQuire:SRATe
(see page 586)
Query Syntax
:ACQuire:SRATe?
<sample_rate><NL>
<sample_rate> ::= sample rate in NR3 format
See Also
164
Commands by Subsystem
:ACQuire:TYPE
(see page 586)
Command Syntax
:ACQuire:TYPE <type>
<type> ::= {NORMal | AVERage | HRESolution | PEAK}
NOTE
Query Syntax
:ACQuire:TYPE?
<acq_type><NL>
<acq_type> ::= {NORM | AVER | HRES | PEAK}
See Also
165
Commands by Subsystem
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
166
Commands by Subsystem
:CALibrate Commands
Utility commands for viewing calibration status and for starting the user
calibration procedure. See "Introduction to :CALibrate Commands" on
page 167.
Table 43 :CALibrate Commands Summary
Command
Query
n/a
:CALibrate:DATE? (see
page 168)
:CALibrate:LABel
<string> (see
page 169)
:CALibrate:LABel?
(see page 169)
:CALibrate:STARt (see
page 170)
n/a
n/a
n/a
:CALibrate:STATus?
(see page 171)
n/a
:CALibrate:SWITch?
(see page 172)
{PROTected | UNPRotected}
n/a
:CALibrate:TEMPeratur
e? (see page 173)
n/a
:CALibrate:TIME? (see
page 174)
Introduction to
:CALibrate
Commands
167
Commands by Subsystem
:CALibrate:DATE
(see page 586)
Query Syntax
:CALibrate:DATE?
<date><NL>
<date> ::= day,month,year in NR1 format<NL>
See Also
168
Commands by Subsystem
:CALibrate:LABel
(see page 586)
Command Syntax
:CALibrate:LABel <string>
<string> ::= quoted ASCII string of up to 32 characters in length,
not including the quotes
:CALibrate:LABel?
<string><NL>
<string>::= unquoted ASCII string of up to 32 characters in length
See Also
169
Commands by Subsystem
:CALibrate:STARt
(see page 586)
Command Syntax
:CALibrate:STARt
NOTE
See Also
Before starting the user calibration procedure, you must set the rear panel CALIBRATION
switch to UNPROTECTED, and you must connect BNC cables from the TRIG OUT connector
to the analog channel inputs. See the User's Guide for details.
170
Commands by Subsystem
:CALibrate:STATus
(see page 586)
Query Syntax
:CALibrate:STATus?
<return value><NL>
<return value> ::= ALL,<status_code>,<status_string>
<status_code> ::= an integer status code
<status_string> ::= an ASCII status string
See Also
171
Commands by Subsystem
:CALibrate:SWITch
(see page 586)
Query Syntax
:CALibrate:SWITch?
<switch><NL>
<switch> ::= {PROT | UNPR}
See Also
172
Commands by Subsystem
:CALibrate:TEMPerature
(see page 586)
Query Syntax
:CALibrate:TEMPerature?
<return value><NL>
<return value> ::= degrees C delta since last cal in NR3 format
See Also
173
Commands by Subsystem
:CALibrate:TIME
(see page 586)
Query Syntax
:CALibrate:TIME?
<date><NL>
<date> ::= hour,minutes,seconds in NR1 format
See Also
174
Commands by Subsystem
:CHANnel<n> Commands
Control all oscilloscope functions associated with individual analog
channels or groups of channels. See "Introduction to :CHANnel<n>
Commands" on page 176.
Table 44 :CHANnel<n> Commands Summary
Command
Query
:CHANnel<n>:BWLimit
{{0 | OFF} | {1 |
ON}} (see page 178)
:CHANnel<n>:BWLimit?
(see page 178)
{0 | 1}
<n> ::= 1-2 or 1-4 in NR1 format
:CHANnel<n>:COUPling
<coupling> (see
page 179)
:CHANnel<n>:COUPling?
(see page 179)
:CHANnel<n>:DISPlay
{{0 | OFF} | {1 |
ON}} (see page 180)
:CHANnel<n>:DISPlay?
(see page 180)
{0 | 1}
<n> ::= 1-2 or 1-4 in NR1 format
:CHANnel<n>:IMPedance
<impedance> (see
page 181)
:CHANnel<n>:IMPedance
? (see page 181)
:CHANnel<n>:INVert
{{0 | OFF} | {1 |
ON}} (see page 182)
:CHANnel<n>:INVert?
(see page 182)
{0 | 1}
<n> ::= 1-2 or 1-4 in NR1 format
:CHANnel<n>:LABel
<string> (see
page 183)
:CHANnel<n>:LABel?
(see page 183)
:CHANnel<n>:OFFSet
<offset>[suffix] (see
page 184)
:CHANnel<n>:OFFSet?
(see page 184)
:CHANnel<n>:PROBe
<attenuation> (see
page 185)
:CHANnel<n>:PROBe?
(see page 185)
n/a
:CHANnel<n>:PROBe:ID?
(see page 186)
:CHANnel<n>:PROBe:SKE
W <skew_value> (see
page 187)
:CHANnel<n>:PROBe:SKE
W? (see page 187)
175
Commands by Subsystem
Query
:CHANnel<n>:PROBe:STY
Pe <signal type> (see
page 188)
:CHANnel<n>:PROBe:STY
Pe? (see page 188)
:CHANnel<n>:PROTectio
n (see page 189)
:CHANnel<n>:PROTectio
n? (see page 189)
{NORM | TRIP}
<n> ::= 1-2 or 1-4 in NR1 format
:CHANnel<n>:RANGe
<range>[suffix] (see
page 190)
:CHANnel<n>:RANGe?
(see page 190)
:CHANnel<n>:SCALe
<scale>[suffix] (see
page 191)
:CHANnel<n>:SCALe?
(see page 191)
:CHANnel<n>:UNITs
<units> (see
page 192)
:CHANnel<n>:UNITs?
(see page 192)
:CHANnel<n>:VERNier
{{0 | OFF} | {1 |
ON}} (see page 193)
:CHANnel<n>:VERNier?
(see page 193)
{0 | 1}
<n> ::= 1-2 or 1-4 in NR1 format
Introduction to
:CHANnel<n>
Commands
NOTE
176
Commands by Subsystem
Return Format
The following are sample responses from the :CHANnel<n>? query. In this
case, the query was issued following a *RST command.
:CHAN1:RANG +40.0E+00;OFFS +0.00000E+00;COUP DC;IMP ONEM;DISP 1;BWL 0;
INV 0;LAB "1";UNIT VOLT;PROB +10E+00;PROB:SKEW +0.00E+00;STYP SING
177
Commands by Subsystem
:CHANnel<n>:BWLimit
(see page 586)
Command Syntax
:CHANnel<n>:BWLimit <bwlimit>
<bwlimit> ::= {{1 | ON} | {0 | OFF}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:CHANnel<n>:BWLimit?
<bwlimit><NL>
<bwlimit> ::= {1 | 0}
See Also
178
Commands by Subsystem
:CHANnel<n>:COUPling
(see page 586)
Command Syntax
:CHANnel<n>:COUPling <coupling>
<coupling> ::= {AC | DC}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:CHANnel<n>:COUPling?
<coupling value><NL>
<coupling value> ::= {AC | DC}
See Also
179
Commands by Subsystem
:CHANnel<n>:DISPlay
(see page 586)
Command Syntax
:CHANnel<n>:DISPlay?
<display value><NL>
<display value> ::= {1 | 0}
See Also
180
Commands by Subsystem
:CHANnel<n>:IMPedance
(see page 586)
Command Syntax
:CHANnel<n>:IMPedance <impedance>
<impedance> ::= {ONEMeg | FIFTy}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:CHANnel<n>:IMPedance?
<impedance value><NL>
<impedance value> ::= {ONEM | FIFT}
See Also
181
Commands by Subsystem
:CHANnel<n>:INVert
(see page 586)
Command Syntax
:CHANnel<n>:INVert?
<invert value><NL>
<invert value> ::= {0 | 1}
See Also
182
Commands by Subsystem
:CHANnel<n>:LABel
(see page 586)
Command Syntax
:CHANnel<n>:LABel <string>
<string> ::= quoted ASCII string
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Label strings are six characters or less, and may contain any commonly used ASCII
characters. Labels with more than 6 characters are truncated to six characters. Lower case
characters are converted to upper case.
:CHANnel<n>:LABel?
<string><NL>
<string> ::= quoted ASCII string
See Also
Example Code
' LABEL - This command allows you to write a name (six characters
' maximum) next to the channel number. It is not necessary, but
' can be useful for organizing the display.
myScope.WriteString ":CHANNEL1:LABEL ""CAL 1"""
' Label channel1 "C
AL 1".
myScope.WriteString ":CHANNEL2:LABEL ""CAL2"""
' Label channel1 "CA
L2".
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
183
Commands by Subsystem
:CHANnel<n>:OFFSet
(see page 586)
Command Syntax
:CHANnel<n>:OFFSet?
The :CHANnel<n>:OFFSet? query returns the current offset value for the
selected channel.
Return Format
<offset><NL>
<offset> ::= Vertical offset value in NR3 format
See Also
184
Commands by Subsystem
:CHANnel<n>:PROBe
(see page 586)
Command Syntax
:CHANnel<n>:PROBe <attenuation>
<attenuation> ::= probe attenuation ratio in NR3 format
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The obsolete attenuation values X1, X10, X20, X100 are also supported.
:CHANnel<n>:PROBe?
<attenuation><NL>
<attenuation> ::= probe attenuation ratio in NR3 format
See Also
Example Code
' CHANNEL_PROBE - Sets the probe attenuation factor for the selected
' channel. The probe attenuation factor may be set from 0.1 to 1000.
myScope.WriteString ":CHAN1:PROBE 10"
' Set Probe to 10:1.
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
185
Commands by Subsystem
:CHANnel<n>:PROBe:ID
(see page 586)
Query Syntax
:CHANnel<n>:PROBe:ID?
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
<probe id><NL>
<probe id> ::= unquoted ASCII string up to 11 characters
186
Commands by Subsystem
:CHANnel<n>:PROBe:SKEW
(see page 586)
Command Syntax
:CHANnel<n>:PROBe:SKEW?
<skew value><NL>
<skew value> ::= skew value in NR3 format
See Also
187
Commands by Subsystem
:CHANnel<n>:PROBe:STYPe
(see page 586)
Command Syntax
NOTE
:CHANnel<n>:PROBe:STYPe?
<signal type><NL>
<signal type> ::= {DIFF | SING}
See Also
188
Commands by Subsystem
:CHANnel<n>:PROTection
(see page 586)
Command Syntax
:CHANnel<n>:PROTection[:CLEar]
<n> ::= {1 | 2 | 3 | 4}
When the analog channel input impedance is set to 50, the input
channels are protected against overvoltage. When an overvoltage condition
is sensed, the input impedance for the channel is automatically changed to
1 M. The :CHANnel<n>:PROTection[:CLEar] command is used to clear
(reset) the overload protection. It allows the channel to be used again in
50 mode after the signal that caused the overload has been removed
from the channel input. Reset the analog channel input impedance to 50
(see ":CHANnel<n>:IMPedance" on page 181) after clearing the overvoltage
protection.
Query Syntax
:CHANnel<n>:PROTection?
{NORM | TRIP}<NL>
189
Commands by Subsystem
:CHANnel<n>:RANGe
(see page 586)
Command Syntax
:CHANnel<n>:RANGe <range>[<suffix>]
<range> ::= vertical full-scale range value in NR3 format
<suffix> ::= {V | mV}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:CHANnel<n>:RANGe?
<range_argument><NL>
<range_argument> ::= vertical full-scale range value in NR3 format
See Also
Example Code
' CHANNEL_RANGE - Sets the full scale vertical range in volts. The
' range value is 8 times the volts per division.
myScope.WriteString ":CHANNEL1:RANGE 8"
' Set the vertical range to
8 volts.
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
190
Commands by Subsystem
:CHANnel<n>:SCALe
(see page 586)
Command Syntax
:CHANnel<n>:SCALe <scale>[<suffix>]
<scale> ::= vertical units per division in NR3 format
<suffix> ::= {V | mV}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:CHANnel<n>:SCALe?
The :CHANnel<n>:SCALe? query returns the current scale setting for the
specified channel.
Return Format
<scale value><NL>
<scale value> ::= vertical units per division in NR3 format
See Also
191
Commands by Subsystem
:CHANnel<n>:UNITs
(see page 586)
Command Syntax
:CHANnel<n>:UNITs <units>
<units> ::= {VOLT | AMPere}
<n> ::= {1 | 2} for the two channel oscilloscope models
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
:CHANnel<n>:UNITs?
The :CHANnel<n>:UNITs? query returns the current units setting for the
specified channel.
Return Format
<units><NL>
<units> ::= {VOLT | AMP}
See Also
192
Commands by Subsystem
:CHANnel<n>:VERNier
(see page 586)
Command Syntax
:CHANnel<n>:VERNier?
<vernier value><NL>
<vernier value> ::= {0 | 1}
See Also
193
Commands by Subsystem
:DISPlay Commands
Control how waveforms, graticule, and text are displayed and written on
the screen. See "Introduction to :DISPlay Commands" on page 194.
Table 45 :DISPlay Commands Summary
Command
Query
:DISPlay:CLEar (see
page 196)
n/a
n/a
:DISPlay:DATA
[<format>][,][<area>]
[,][<palette>]<displa
y data> (see
page 197)
:DISPlay:DATA?
[<format>][,][<area>]
[,][<palette>] (see
page 197)
:DISPlay:LABel {{0 |
OFF} | {1 | ON}} (see
page 199)
:DISPlay:LABel? (see
page 199)
{0 | 1}
:DISPlay:LABList
<binary block> (see
page 200)
:DISPlay:LABList?
(see page 200)
:DISPlay:PERSistence
<value> (see
page 201)
:DISPlay:PERSistence?
(see page 201)
:DISPlay:SOURce
<value> (see
page 202)
:DISPlay:SOURce? (see
page 202)
:DISPlay:VECTors {{1
| ON} | {0 | OFF}}
(see page 203)
:DISPlay:VECTors?
(see page 203)
{1 | 0}
Introduction to
:DISPlay
Commands
The DISPlay subsystem is used to control the display storage and retrieval
of waveform data, labels, and text. This subsystem allows the following
actions:
Clear the waveform area on the display.
Turn vectors on or off.
194
Commands by Subsystem
195
Commands by Subsystem
:DISPlay:CLEar
(see page 586)
Command Syntax
:DISPlay:CLEar
The :DISPlay:CLEar command clears the display and resets all associated
measurements. If the oscilloscope is stopped, all currently displayed data
is erased. If the oscilloscope is running, all of the data for active channels
and functions is erased; however, new data is displayed on the next
acquisition.
See Also
196
Commands by Subsystem
:DISPlay:DATA
(see page 586)
Command Syntax
The :DISPlay:DATA? query reads display data from the screen or from one
of the trace memories in the instrument. The format for the data
transmission is the # format defined in the IEEE 488.2 specification.
If a data format or area is specified, the :DISPlay:DATA query transfers
the data directly from the display. If neither the data format nor the area
is specified, the query transfers data from the trace memory specified by
the :DISPlay:SOURce command.
Screen data is the full display and is high resolution in grayscale or color.
The :HARDcopy:INKSaver setting also affects the screen data. It may be
read from the instrument in 24- bit bmp, 8- bit bmp, or 24- bit png format.
This data cannot be sent back to the instrument.
Graticule data is a low resolution bitmap of the graticule area in TIFF
format. You can get this data and send it back to the oscilloscope.
197
Commands by Subsystem
NOTE
If the format is TIFF, the only valid value area parameter is GRATicule, and the only valid
palette parameter is MONOchrome.
If the format is something other than TIFF, the only valid area parameter is SCReen, and the
only valid values for palette are GRAYscale or COLor.
Return Format
<display data><NL>
<display data> ::= binary block data in IEEE-488.2 # format.
See Also
Example Code
' IMAGE_TRANSFER - In this example, we will query for the image data
' with ":DISPLAY:DATA?", read the data, and then save it to a file.
Dim byteData() As Byte
myScope.IO.Timeout = 15000
myScope.WriteString ":DISPLAY:DATA? BMP, SCREEN, COLOR"
byteData = myScope.ReadIEEEBlock(BinaryType_UI1)
' Output display data to a file:
strPath = "c:\scope\data\screen.bmp"
' Remove file if it exists.
If Len(Dir(strPath)) Then
Kill strPath
End If
Close #1
' If #1 is open, close it.
Open strPath For Binary Access Write Lock Write As #1
' Open file f
or output.
Put #1, , byteData
' Write data.
Close #1
' Close file.
myScope.IO.Timeout = 5000
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
198
Commands by Subsystem
:DISPlay:LABel
(see page 586)
Command Syntax
:DISPlay:LABel <value>
<value> ::= {{1 | ON} | {0 | OFF}}
The :DISPlay:LABel command turns the analog and digital channel labels
on and off.
Query Syntax
:DISPlay:LABel?
The :DISPlay:LABel? query returns the display mode of the analog channel
labels.
Return Format
<value><NL>
<value> ::= {0 | 1}
See Also
Example Code
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
199
Commands by Subsystem
:DISPlay:LABList
(see page 586)
Command Syntax
The :DISPlay:LABList command adds labels to the label list. Labels are
added in alphabetical order.
NOTE
Query Syntax
Labels that begin with the same alphabetic base string followed by decimal digits are
considered duplicate labels. Duplicate labels are not added to the label list. For example, if
label "A0" is in the list and you try to add a new label called "A12345", the new label is not
added.
:DISPlay:LABList?
<binary block><NL>
<binary block> ::= an ordered list of up to 75 labels, a maximum of six
characters each, separated by newline characters.
See Also
200
Commands by Subsystem
:DISPlay:PERSistence
(see page 586)
Command Syntax
:DISPlay:PERSistence <value>
<value> ::= {MINimum | INFinite}
:DISPlay:PERSistence?
<value><NL>
<value> ::= {MIN | INF}
See Also
201
Commands by Subsystem
:DISPlay:SOURce
(see page 586)
Command Syntax
:DISPlay:SOURce <value>
<value> ::= {PMEMory0 | PMEMory1 | PMEMory2 | PMEMory3 | PMEMory4
| PMEMory5 | PMEMory6 | PMEMory7 | PMEMory8 | PMEMory9}
PMEMory0-9 ::= pixel memory 0 through 9
:DISPlay:SOURce?
<value><NL>
<value> ::= {PMEM0 | PMEM1 | PMEM2 | PMEM3 | PMEM4 | PMEM5 | PMEM6
| PMEM7 | PMEM8 | PMEM9}
See Also
202
Commands by Subsystem
:DISPlay:VECTors
(see page 586)
Command Syntax
:DISPlay:VECTors <vectors>
<vectors> ::= {{1 | ON} | {0 | OFF}}
:DISPlay:VECTors?
<vectors><NL>
<vectors> ::= {1 | 0}
See Also
203
Commands by Subsystem
Query
:EXTernal:BWLimit
<bwlimit> (see
page 206)
:EXTernal:BWLimit?
(see page 206)
:EXTernal:IMPedance
<value> (see
page 207)
:EXTernal:IMPedance?
(see page 207)
:EXTernal:PROBe
<attenuation> (see
page 208)
:EXTernal:PROBe? (see
page 208)
n/a
:EXTernal:PROBe:ID?
(see page 209)
:EXTernal:PROBe:STYPe
<signal type> (see
page 210)
:EXTernal:PROBe:STYPe
? (see page 210)
:EXTernal:PROTection[
:CLEar] (see
page 211)
:EXTernal:PROTection?
(see page 211)
{NORM | TRIP}
:EXTernal:RANGe
<range>[<suffix>]
(see page 212)
:EXTernal:RANGe? (see
page 212)
:EXTernal:UNITs
<units> (see
page 213)
:EXTernal:UNITs? (see
page 213)
Introduction to
:EXTernal Trigger
Commands
204
Commands by Subsystem
The following is a sample response from the :EXTernal query. In this case,
the query was issued following a *RST command.
:EXT:BWL 0;IMP ONEM;RANG +8.0E+00;UNIT VOLT;PROB +1.0E+00;PROB:STYP SING
205
Commands by Subsystem
:EXTernal:BWLimit
(see page 586)
Command Syntax
:EXTernal:BWLimit <bwlimit>
<bwlimit> ::= {0 | OFF}
:EXTernal:BWLimit?
The :EXTernal:BWLimit? query returns the current setting of the low- pass
filter (always 0).
Return Format
<bwlimit><NL>
<bwlimit> ::= 0
See Also
206
Commands by Subsystem
:EXTernal:IMPedance
(see page 586)
Command Syntax
:EXTernal:IMPedance <value>
<value> ::= {ONEMeg | FIFTy}
:EXTernal:IMPedance?
<impedance value><NL>
<impedance value> ::= {ONEM | FIFT}
See Also
207
Commands by Subsystem
:EXTernal:PROBe
(see page 586)
Command Syntax
:EXTernal:PROBe <attenuation>
<attenuation> ::= probe attenuation ratio in NR3 format
:EXTernal:PROBe?
<attenuation><NL>
<attenuation> ::= probe attenuation ratio in NR3 format
See Also
208
Commands by Subsystem
:EXTernal:PROBe:ID
(see page 586)
Query Syntax
:EXTernal:PROBe:ID?
<probe id><NL>
<probe id> ::= unquoted ASCII string up to 11 characters
209
Commands by Subsystem
:EXTernal:PROBe:STYPe
(see page 586)
Command Syntax
NOTE
:EXTernal:PROBe:STYPe?
<signal type><NL>
<signal type> ::= {DIFF | SING}
See Also
210
Commands by Subsystem
:EXTernal:PROTection
(see page 586)
Command Syntax
:EXTernal:PROTection[:CLEar]
When the external trigger input impedance is set to 50, the external
trigger input is protected against overvoltage. When an overvoltage
condition is sensed, the input impedance for the external trigger is
automatically changed to 1 M. The :EXTernal:PROTection[:CLEar]
command is used to clear (reset) the overload protection. It allows the
external trigger to be used again in 50 mode after the signal that caused
the overload has been removed from the external trigger input. Reset the
external trigger input impedance to 50 (see ":EXTernal:IMPedance" on
page 207) after clearing the overvoltage protection.
Query Syntax
:EXTernal:PROTection?
{NORM | TRIP}<NL>
211
Commands by Subsystem
:EXTernal:RANGe
(see page 586)
Command Syntax
:EXTernal:RANGe <range>[<suffix>]
<range> ::= vertical full-scale range value in NR3 format
<suffix> ::= {V | mV}
:EXTernal:RANGe?
The :EXTernal:RANGe? query returns the current full- scale range setting
for the external trigger.
Return Format
<range_argument><NL>
<range_argument> ::= external trigger range value in NR3 format = (5.0 V
) * (probe attenuation factor)
See Also
212
Commands by Subsystem
:EXTernal:UNITs
(see page 586)
Command Syntax
:EXTernal:UNITs <units>
<units> ::= {VOLT | AMPere}
The :EXTernal:UNITs command sets the measurement units for the probe
connected to the external trigger input. Select VOLT for a voltage probe
and select AMPere for a current probe. Measurement results, channel
sensitivity, and trigger level will reflect the measurement units you select.
Query Syntax
:EXTernal:UNITs?
The :CHANnel<n>:UNITs? query returns the current units setting for the
external trigger.
Return Format
<units><NL>
<units> ::= {VOLT | AMP}
See Also
213
Commands by Subsystem
:FUNCtion Commands
Control functions in the measurement/storage module. See "Introduction to
:FUNCtion Commands" on page 216.
Table 47 :FUNCtion Commands Summary
Command
Query
:FUNCtion:CENTer
<frequency> (see
page 217)
:FUNCtion:CENTer?
(see page 217)
:FUNCtion:DISPlay {{0
| OFF} | {1 | ON}}
(see page 218)
:FUNCtion:DISPlay?
(see page 218)
{0 | 1}
:FUNCtion:GOFT:OPERat
ion <operation> (see
page 219)
:FUNCtion:GOFT:OPERat
ion? (see page 219)
:FUNCtion:GOFT:SOURce
1 <source> (see
page 220)
:FUNCtion:GOFT:SOURce
1? (see page 220)
:FUNCtion:GOFT:SOURce
2 <source> (see
page 221)
:FUNCtion:GOFT:SOURce
2? (see page 221)
:FUNCtion:OFFSet
<offset> (see
page 222)
:FUNCtion:OFFSet?
(see page 222)
:FUNCtion:OPERation
<operation> (see
page 223)
:FUNCtion:OPERation?
(see page 223)
214
Commands by Subsystem
Query
:FUNCtion:RANGe
<range> (see
page 224)
:FUNCtion:RANGe? (see
page 224)
:FUNCtion:REFerence
<level> (see
page 225)
:FUNCtion:REFerence?
(see page 225)
:FUNCtion:SCALe
<scale
value>[<suffix>] (see
page 226)
:FUNCtion:SCALe? (see
page 226)
:FUNCtion:SOURce1
<source> (see
page 227)
:FUNCtion:SOURce1?
(see page 227)
:FUNCtion:SOURce2
<source> (see
page 228)
:FUNCtion:SOURce2?
(see page 228)
:FUNCtion:SPAN <span>
(see page 229)
:FUNCtion:SPAN? (see
page 229)
:FUNCtion:WINDow
<window> (see
page 230)
:FUNCtion:WINDow?
(see page 230)
215
Commands by Subsystem
Introduction to
:FUNCtion
Commands
216
Commands by Subsystem
:FUNCtion:CENTer
(see page 586)
Command Syntax
:FUNCtion:CENTer <frequency>
<frequency> ::= the current center frequency in NR3 format.
of legal values is from 0 Hz to 25 GHz.
The range
:FUNCtion:CENTer?
<frequency><NL>
<frequency> ::= the current center frequency in NR3 format.
of legal values is from 0 Hz to 25 GHz.
NOTE
See Also
The range
217
Commands by Subsystem
:FUNCtion:DISPlay
(see page 586)
Command Syntax
:FUNCtion:DISPlay <display>
<display> ::= {{1 | ON} | {0 | OFF}}
:FUNCtion:DISPlay?
<display><NL>
<display> ::= {1 | 0}
See Also
218
Commands by Subsystem
:FUNCtion:GOFT:OPERation
(see page 586)
Command Syntax
:FUNCtion:GOFT:OPERation <operation>
<operation> ::= {ADD | SUBTract | MULTiply}
:FUNCtion:GOFT:OPERation?
<operation><NL>
<operation> ::= {ADD | SUBT | MULT}
See Also
219
Commands by Subsystem
:FUNCtion:GOFT:SOURce1
(see page 586)
Command Syntax
:FUNCtion:GOFT:SOURce1 <value>
<value> ::= CHANnel<n>
<n> ::= {1 | 2 | 3 | 4} for 4ch models
<n> ::= {1 | 2} for 2ch models
:FUNCtion:GOFT:SOURce1?
<value><NL>
<value> ::= CHAN<n>
<n> ::= {1 | 2 | 3 | 4} for the 4ch models
<n> ::= {1 | 2} for the 2ch models
See Also
220
Commands by Subsystem
:FUNCtion:GOFT:SOURce2
(see page 586)
Command Syntax
:FUNCtion:GOFT:SOURce2 <value>
<value> ::= CHANnel<n>
<n> ::= {{1 | 2} | {3 | 4}} for 4ch models, depending on SOURce1
selection
<n> ::= {1 | 2} for 2ch models
:FUNCtion:GOFT:SOURce2?
<value><NL>
<value> ::= CHAN<n>
<n> ::= {{1 | 2} | {3 | 4}} for 4ch models, depending on SOURce1
selection
<n> ::= {1 | 2} for 2ch models
See Also
221
Commands by Subsystem
:FUNCtion:OFFSet
(see page 586)
Command Syntax
:FUNCtion:OFFSet <offset>
<offset> ::= the value at center screen in NR3 format.
NOTE
Query Syntax
:FUNCtion:OFFSet?
The :FUNCtion:OFFSet? query outputs the current offset value for the
selected function.
Return Format
<offset><NL>
<offset> ::= the value at center screen in NR3 format.
See Also
222
Commands by Subsystem
:FUNCtion:OPERation
(see page 586)
Command Syntax
:FUNCtion:OPERation <operation>
<operation> ::= {ADD | SUBTract | MULTiply | INTegrate | DIFFerentiate
| FFT | SQRT}
:FUNCtion:OPERation?
<operation><NL>
<operation> ::= {ADD | SUBT | MULT | INT | DIFF | FFT | SQRT}
See Also
223
Commands by Subsystem
:FUNCtion:RANGe
(see page 586)
Command Syntax
:FUNCtion:RANGe <range>
<range> ::= the full-scale vertical axis value in NR3 format.
The :FUNCtion:RANGe command defines the full- scale vertical axis for the
selected function.
Query Syntax
:FUNCtion:RANGe?
The :FUNCtion:RANGe? query returns the current full- scale range value for
the selected function.
Return Format
<range><NL>
<range> ::= the full-scale vertical axis value in NR3 format.
224
Commands by Subsystem
:FUNCtion:REFerence
(see page 586)
Command Syntax
:FUNCtion:REFerence <level>
<level> ::= the current reference level in NR3 format.
The range of legal values is from - 400.0 dBV to +400.0 dBV depending on
the current :FUNCtion:RANGe value. If you set the reference level to a
value outside of the legal range, it is automatically set to the nearest legal
value.
The :FUNCtion:REFerence command is only used when an FFT (Fast
Fourier Transform) operation is selected. The :FUNCtion:REFerence
command sets the reference level represented by center screen.
NOTE
Query Syntax
:FUNCtion:REFerence?
<level><NL>
<level> ::= the current reference level in NR3 format.
See Also
225
Commands by Subsystem
:FUNCtion:SCALe
(see page 586)
Command Syntax
:FUNCtion:SCALe?
The :FUNCtion:SCALe? query returns the current scale value for the
selected function.
Return Format
<scale value><NL>
<scale value> ::= integer in NR1 format
See Also
226
Commands by Subsystem
:FUNCtion:SOURce1
(see page 586)
Command Syntax
:FUNCtion:SOURce1 <value>
<value> ::= {CHANnel<n> | GOFT}
<n> ::= {1 | 2 | 3 | 4} for 4ch models
<n> ::= {1 | 2} for 2ch models
NOTE
Query Syntax
:FUNCtion:SOURce1?
<value><NL>
<value> ::= {CHAN<n> | GOFT}
<n> ::= {1 | 2 | 3 | 4} for 4ch models
<n> ::= {1 | 2} for 2ch models
See Also
227
Commands by Subsystem
:FUNCtion:SOURce2
(see page 586)
Command Syntax
:FUNCtion:SOURce2 <value>
<value> ::= {CHANnel<n> | NONE}
<n> ::= {{1 | 2} | {3 | 4}} for 4ch models, depending on SOURce1
selection
<n> ::= {1 | 2} for 2ch models
:FUNCtion:SOURce2?
<value><NL>
<value> ::= {CHAN<n> | NONE}
<n> ::= {{1 | 2} | {3 | 4}} for 4ch models, depending on SOURce1
selection
<n> ::= {1 | 2} for 2ch models
See Also
228
Commands by Subsystem
:FUNCtion:SPAN
(see page 586)
Command Syntax
:FUNCtion:SPAN <span>
<span> ::= the current frequency span in NR3 format. Legal values are
1 Hz to 100 GHz.
If you set the frequency span to a value outside of the legal range, the
step size is automatically set to the nearest legal value.
The :FUNCtion:SPAN command sets the frequency span of the display (left
graticule to right graticule) when FFT (Fast Fourier Transform) is selected.
Query Syntax
:FUNCtion:SPAN?
NOTE
Return Format
<span><NL>
<span> ::= the current frequency span in NR3 format. Legal values are 1
Hz to 100 GHz.
See Also
229
Commands by Subsystem
:FUNCtion:WINDow
(see page 586)
Command Syntax
:FUNCtion:WINDow <window>
<window> ::= {RECTangular | HANNing | FLATtop | BHARris}
:FUNCtion:WINDow?
<window><NL>
<window> ::= {RECT | HANN | FLAT | BHAR}
See Also
230
Commands by Subsystem
:HARDcopy Commands
Set and query the selection of hardcopy device and formatting options. See
"Introduction to :HARDcopy Commands" on page 231.
Table 48 :HARDcopy Commands Summary
Command
Query
:HARDcopy:AREA <area>
(see page 233)
:HARDcopy:AREA? (see
page 233)
:HARDcopy:APRinter
<active_printer> (see
page 234)
:HARDcopy:APRinter?
(see page 234)
:HARDcopy:FACTors {{0
| OFF} | {1 | ON}}
(see page 235)
:HARDcopy:FACTors?
(see page 235)
{0 | 1}
:HARDcopy:FFEed {{0 |
OFF} | {1 | ON}} (see
page 236)
:HARDcopy:FFEed? (see
page 236)
{0 | 1}
:HARDcopy:INKSaver
{{0 | OFF} | {1 |
ON}} (see page 237)
:HARDcopy:INKSaver?
(see page 237)
{0 | 1}
:HARDcopy:PALette
<palette> (see
page 238)
:HARDcopy:PALette?
(see page 238)
n/a
:HARDcopy:PRinter:LIS
T? (see page 239)
:HARDcopy:STARt (see
page 240)
n/a
n/a
Introduction to
:HARDcopy
Commands
231
Commands by Subsystem
232
Commands by Subsystem
:HARDcopy:AREA
(see page 586)
Command Syntax
:HARDcopy:AREA <area>
<area> ::= SCReen
:HARDcopy:AREA?
<area><NL>
<area> ::= SCR
See Also
233
Commands by Subsystem
:HARDcopy:APRinter
(see page 586)
Command Syntax
:HARDcopy:APRinter <active_printer>
<active_printer> ::= {<index> | <name>}
<index> ::= integer index of printer in list
<name> ::= name of printer in list
:HARDcopy:APRinter?
<name><NL>
<name> ::= name of printer in list
See Also
234
Commands by Subsystem
:HARDcopy:FACTors
(see page 586)
Command Syntax
:HARDcopy:FACTors <factors>
<factors> ::= {{OFF | 0} | {ON | 1}}
:HARDcopy:FACTors?
<factors><NL>
<factors> ::= {0 | 1}
See Also
235
Commands by Subsystem
:HARDcopy:FFEed
(see page 586)
Command Syntax
:HARDcopy:FFEed <ffeed>
<ffeed> ::= {{OFF | 0} | {ON | 1}}
:HARDcopy:FFEed?
<ffeed><NL>
<ffeed> ::= {0 | 1}
See Also
236
Commands by Subsystem
:HARDcopy:INKSaver
(see page 586)
Command Syntax
:HARDcopy:INKSaver <value>
<value> ::= {{OFF | 0} | {ON | 1}}
:HARDcopy:INKSaver?
<value><NL>
<value> ::= {0 | 1}
See Also
237
Commands by Subsystem
:HARDcopy:PALette
(see page 586)
Command Syntax
:HARDcopy:PALette <palette>
<palette> ::= {COLor | GRAYscale | NONE}
NOTE
Query Syntax
:HARDcopy:PALette?
<palette><NL>
<palette> ::= {COL | GRAY | NONE}
See Also
238
Commands by Subsystem
:HARDcopy:PRinter:LIST
(see page 586)
Query Syntax
:HARDcopy:PRinter:LIST?
<list><NL>
<list> ::= [<printer_spec>] ... [printer_spec>]
<printer_spec> ::= "<index>,<active>,<name>;"
<index> ::= integer index of printer
<active> ::= {Y | N}
<name> ::= name of printer (for example "DESKJET 950C")
See Also
239
Commands by Subsystem
:HARDcopy:STARt
(see page 586)
Command Syntax
:HARDcopy:STARt
240
Commands by Subsystem
:MARKer Commands
Set and query the settings of X- axis markers (X1 and X2 cursors) and the
Y- axis markers (Y1 and Y2 cursors). See "Introduction to :MARKer
Commands" on page 242.
Table 49 :MARKer Commands Summary
Command
Query
:MARKer:MODE <mode>
(see page 243)
:MARKer:MODE? (see
page 243)
:MARKer:X1Position
<position>[suffix]
(see page 244)
:MARKer:X1Position?
(see page 244)
:MARKer:X1Y1source
<source> (see
page 245)
:MARKer:X1Y1source?
(see page 245)
:MARKer:X2Position
<position>[suffix]
(see page 246)
:MARKer:X2Position?
(see page 246)
:MARKer:X2Y2source
<source> (see
page 247)
:MARKer:X2Y2source?
(see page 247)
n/a
:MARKer:XDELta? (see
page 248)
:MARKer:Y1Position
<position>[suffix]
(see page 249)
:MARKer:Y1Position?
(see page 249)
241
Commands by Subsystem
Query
:MARKer:Y2Position
<position>[suffix]
(see page 250)
:MARKer:Y2Position?
(see page 250)
n/a
:MARKer:YDELta? (see
page 251)
Introduction to
:MARKer
Commands
The MARKer subsystem commands set and query the settings of X- axis
markers (X1 and X2 cursors) and the Y- axis markers (Y1 and Y2 cursors).
You can set and query the marker mode and source, the position of the X
and Y cursors, and query delta X and delta Y cursor values.
Reporting the Setup
Use :MARKer? to query setup information for the MARKer subsystem.
Return Format
The following is a sample response from the :MARKer? query. In this case,
the query was issued following a *RST and :MARKer:MODE:MANual
command.
:MARK:X1Y1 NONE;X2Y2 NONE;MODE OFF
242
Commands by Subsystem
:MARKer:MODE
(see page 586)
Command Syntax
:MARKer:MODE <mode>
<mode> ::= {OFF | MEASurement | MANual}
The :MARKer:MODE command sets the cursors mode. OFF removes the
cursor information from the display. MANual mode enables manual
placement of the X and Y cursors. In MEASurement mode the cursors
track the most recent measurement.
If the front- panel cursors are off, or are set to the front- panel Hex or
Binary mode, setting :MARKer:MODE MANual will put the cursors in the
front- panel Normal mode.
Setting the mode to MEASurement sets the marker sources
(:MARKer:X1Y1source and :MARKer:X2Y2source) to the measurement
source (:MEASure:SOURce). Setting the measurement source remotely
always sets the marker sources.
Query Syntax
:MARKer:MODE?
<mode><NL>
<mode> ::= {OFF | MEAS | MAN}
See Also
243
Commands by Subsystem
:MARKer:X1Position
(see page 586)
Command Syntax
:MARKer:X1Position?
<position><NL>
<position> ::= X1 cursor position in NR3 format
See Also
244
Commands by Subsystem
:MARKer:X1Y1source
(see page 586)
Command Syntax
:MARKer:X1Y1source <source>
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The :MARKer:X1Y1source command sets the source for the cursors. The
channel you specify must be enabled for cursors to be displayed. If the
channel or function is not on, an error message is issued. Sending a
:MARKer:X1Y1source command will put the cursors in the MANual mode
(see ":MARKer:MODE" on page 243).
This product does not allow independent settings of the X1Y1 and X2Y2
marker sources. Setting the source for one pair of markers sets the source
for the other. If :MARKer:MODE is set to OFF or MANual, setting
:MEASure:SOURce to CHANnel<n>, FUNCtion, or MATH will also set
:MARKer:X1Y1source and :MARKer:X2Y2source to this value.
NOTE
Query Syntax
MATH is an alias for FUNCtion. The query will return FUNC if the source is FUNCtion or
MATH.
:MARKer:X1Y1source?
<source><NL>
<source> ::= {CHAN<n> | FUNC | NONE}
See Also
245
Commands by Subsystem
:MARKer:X2Position
(see page 586)
Command Syntax
:MARKer:X2Position?
<position><NL>
<position> ::= X2 cursor position in NR3 format
See Also
246
Commands by Subsystem
:MARKer:X2Y2source
(see page 586)
Command Syntax
:MARKer:X2Y2source <source>
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The :MARKer:X2Y2source command sets the source for the cursors. The
channel you specify must be enabled for cursors to be displayed. If the
channel or function is not on, an error message is issued. Sending a
MARKer:X2Y2source command puts the cursors in the MANual mode (see
":MARKer:MODE" on page 243).
This product does not allow independent settings of the X1Y1 and X2Y2
marker sources. Setting the source for one pair of markers sets the source
for the other. If :MARKer:MODE is set to OFF or MANual, setting
:MEASure:SOURce to CHANnel<n>, FUNCtion, or MATH will also set
:MARKer:X1Y1source and :MARKer:X2Y2source to this value.
NOTE
Query Syntax
MATH is an alias for FUNCtion. The query will return FUNC if the source is FUNCtion or
MATH.
:MARKer:X2Y2source?
<source><NL>
<source> ::= {CHAN<n> | FUNC | NONE}
See Also
247
Commands by Subsystem
:MARKer:XDELta
(see page 586)
Query Syntax
:MARKer:XDELta?
NOTE
Return Format
If the front-panel cursors are off or are set to Binary or Hex Mode, the marker position
values are not defined. Make sure to set :MARKer:MODE to MANual to put the cursors in
the front-panel Normal mode.
<value><NL>
<value> ::= difference value in NR3 format.
See Also
248
Commands by Subsystem
:MARKer:Y1Position
(see page 586)
Command Syntax
:MARKer:Y1Position?
<position><NL>
<position> ::= Y1 cursor position in NR3 format
See Also
249
Commands by Subsystem
:MARKer:Y2Position
(see page 586)
Command Syntax
:MARKer:Y2Position?
<position><NL>
<position> ::= Y2 cursor position in NR3 format
See Also
250
Commands by Subsystem
:MARKer:YDELta
(see page 586)
Query Syntax
:MARKer:YDELta?
NOTE
Return Format
If the front-panel cursors are off or are set to Binary or Hex Mode, the marker position
values are not defined. Make sure to set :MARKer:MODE to MANual to put the cursors in
the front-panel Normal mode.
<value><NL>
<value> ::= difference value in NR3 format
See Also
251
Commands by Subsystem
:MEASure Commands
Select automatic measurements to be made and control time markers. See
"Introduction to :MEASure Commands" on page 257.
Table 50 :MEASure Commands Summary
Command
Query
:MEASure:CLEar (see
page 259)
n/a
n/a
:MEASure:COUNter
[<source>] (see
page 260)
:MEASure:COUNter?
[<source>] (see
page 260)
:MEASure:DEFine
DELay, <delay spec>
(see page 261)
:MEASure:DEFine?
DELay (see page 262)
:MEASure:DEFine
THResholds,
<threshold spec> (see
page 261)
:MEASure:DEFine?
THResholds (see
page 262)
:MEASure:DELay
[<source1>]
[,<source2>] (see
page 264)
:MEASure:DELay?
[<source1>]
[,<source2>] (see
page 264)
:MEASure:DUTYcycle
[<source>] (see
page 266)
:MEASure:DUTYcycle?
[<source>] (see
page 266)
252
Commands by Subsystem
Query
:MEASure:FALLtime
[<source>] (see
page 267)
:MEASure:FALLtime?
[<source>] (see
page 267)
:MEASure:FREQuency
[<source>] (see
page 268)
:MEASure:FREQuency?
[<source>] (see
page 268)
:MEASure:NWIDth
[<source>] (see
page 269)
:MEASure:NWIDth?
[<source>] (see
page 269)
:MEASure:OVERshoot
[<source>] (see
page 270)
:MEASure:OVERshoot?
[<source>] (see
page 270)
:MEASure:PERiod
[<source>] (see
page 272)
:MEASure:PERiod?
[<source>] (see
page 272)
:MEASure:PHASe
[<source1>]
[,<source2>] (see
page 273)
:MEASure:PHASe?
[<source1>]
[,<source2>] (see
page 273)
:MEASure:PREShoot
[<source>] (see
page 274)
:MEASure:PREShoot?
[<source>] (see
page 274)
253
Commands by Subsystem
Query
:MEASure:PWIDth
[<source>] (see
page 275)
:MEASure:PWIDth?
[<source>] (see
page 275)
:MEASure:RISEtime
[<source>] (see
page 276)
:MEASure:RISEtime?
[<source>] (see
page 276)
:MEASure:SDEViation
[<source>] (see
page 277)
:MEASure:SDEViation?
[<source>] (see
page 277)
:MEASure:SHOW {1 |
ON} (see page 278)
:MEASure:SHOW? (see
page 278)
{1}
:MEASure:SOURce
[<source1>]
[,<source2>] (see
page 279)
:MEASure:SOURce? (see
page 279)
n/a
:MEASure:TEDGe?
<slope><occurrence>[,
<source>] (see
page 281)
254
Commands by Subsystem
Query
n/a
:MEASure:TVALue?
<value>,
[<slope>]<occurrence>
[,<source>] (see
page 283)
:MEASure:VAMPlitude
[<source>] (see
page 285)
:MEASure:VAMPlitude?
[<source>] (see
page 285)
:MEASure:VAVerage
[<source>] (see
page 286)
:MEASure:VAVerage?
[<source>] (see
page 286)
:MEASure:VBASe
[<source>] (see
page 287)
:MEASure:VBASe?
[<source>] (see
page 287)
:MEASure:VMAX
[<source>] (see
page 288)
:MEASure:VMAX?
[<source>] (see
page 288)
:MEASure:VMIN
[<source>] (see
page 289)
:MEASure:VMIN?
[<source>] (see
page 289)
255
Commands by Subsystem
Query
:MEASure:VPP
[<source>] (see
page 290)
:MEASure:VPP?
[<source>] (see
page 290)
:MEASure:VRATio
[<source1>]
[,<source2>] (see
page 273)
:MEASure:VRATio?
[<source1>]
[,<source2>] (see
page 291)
:MEASure:VRMS
[<source>] (see
page 292)
:MEASure:VRMS?
[<source>] (see
page 292)
n/a
:MEASure:VTIMe?
<vtime>[,<source>]
(see page 293)
:MEASure:VTOP
[<source>] (see
page 294)
:MEASure:VTOP?
[<source>] (see
page 294)
:MEASure:XMAX
[<source>] (see
page 295)
:MEASure:XMAX?
[<source>] (see
page 295)
:MEASure:XMIN
[<source>] (see
page 296)
:MEASure:XMIN?
[<source>] (see
page 296)
256
Commands by Subsystem
Introduction to
:MEASure
Commands
pulse width
rise time
fall time
Measurement Error
If a measurement cannot be made (typically because the proper portion of
the waveform is not displayed), the value +9.9E+37 is returned for that
measurement.
Making Measurements
If more than one waveform, edge, or pulse is displayed, time
measurements are made on the portion of the displayed waveform closest
to the trigger reference (left, center, or right).
When making measurements in the delayed time base mode
(:TIMebase:MODE WINDow), the oscilloscope will attempt to make the
measurement inside the delayed sweep window. If the measurement is an
average and there are not three edges, the oscilloscope will revert to the
mode of making the measurement at the start of the main sweep.
When the command form is used, the measurement result is displayed on
the instrument. When the query form of these measurements is used, the
measurement is made one time, and the measurement result is returned
over the bus.
Measurements are made on the displayed waveforms specified by the
:MEASure:SOURce command. The MATH source is an alias for the
FUNCtion source.
Not all measurements are available on the FFT (Fast Fourier Transform).
Reporting the Setup
Use the :MEASure? query to obtain setup information for the MEASure
subsystem. (Currently, this is only :MEASure:SOURce.)
257
Commands by Subsystem
Return Format
The following is a sample response from the :MEASure? query. In this
case, the query was issued following a *RST command.
:MEAS:SOUR CHAN1,NONE
258
Commands by Subsystem
:MEASure:CLEar
(see page 586)
Command Syntax
:MEASure:CLEar
This command clears all selected measurements and markers from the
screen.
See Also
259
Commands by Subsystem
:MEASure:COUNter
(see page 586)
Command Syntax
:MEASure:COUNter [<source>]
<source> ::= {CHANnel<n> | EXTernal}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
:MEASure:COUNter? [<source>]
NOTE
Return Format
The :MEASure:COUNter? query times out if the counter measurement is installed on the
front panel. Use :MEASure:CLEar to remove the front-panel measurement before executing
the :MEASure:COUNter? query.
<source><NL>
<source> ::= count in Hertz in NR3 format
See Also
260
Commands by Subsystem
:MEASure:DEFine
(see page 586)
Command Syntax
:MEASure:DEFine <meas_spec>
<meas_spec> ::= {DELay | THResholds}
DELay
DUTYcycle
DELay
:MEASure:DEFine
DELay Command
Syntax
THResholds
x
FALLtime
FREQuency
NWIDth
OVERshoot
PERiod
PHASe
PREShoot
PWIDth
RISetime
VAVerage
VRMS
261
Commands by Subsystem
NOTE
:MEASure:DEFine
THResholds
Command Syntax
The :MEASure:DELay command and the front-panel delay measurement use an auto-edge
selection method to determine the actual edge used for the measurement. The
:MEASure:DEFine command has no effect on these delay measurements. The edges
specified by the :MEASure:DEFine command only define the edges used by the
:MEASure:DELay? query.
:MEASure:DEFine? <meas_spec>
<meas_spec> ::= {DELay | THResholds}
The :MEASure:DEFine? query returns the current edge specification for the
delay measurements setup or the current specification for the thresholds
setup.
262
Commands by Subsystem
Return Format
See Also
263
Commands by Subsystem
:MEASure:DELay
(see page 586)
Command Syntax
:MEASure:DELay [<source1>][,<source2>]
<source1>, <source2> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
The :MEASure:DELay command and the front-panel delay measurement differ from the
:MEASure:DELay? query.
The delay command or front-panel measurement run the delay measurement in auto-edge
select mode. In this mode, you can select the edge polarity, but the instrument will select
the edges that will make the best possible delay measurement. The source1 edge chosen
will be the edge that meets the polarity specified and is closest to the trigger reference
point. The source2 edge selected will be that edge of the specified polarity that gives the
first of the following criteria:
The smallest positive delay value that is less than source1 period.
The smallest negative delay that is less than source1 period.
The smallest absolute value of delay.
The :MEASure:DELay? query will make the measurement using the edges specified by the
:MEASure:DEFine command.
Query Syntax
:MEASure:DELay? [<source1>][,<source2>]
264
Commands by Subsystem
Vtop. If you want to move the delay measurement point nearer to Vtop or
Vbase, you must change the threshold values with the :MEASure:DEFine
THResholds command.
Return Format
<value><NL>
<value> ::= floating-point number delay time in seconds in NR3 format
See Also
265
Commands by Subsystem
:MEASure:DUTYcycle
(see page 586)
Command Syntax
:MEASure:DUTYcycle [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
The signal must be displayed to make the measurement. This command is not available if
the source is FFT (Fast Fourier Transform).
:MEASure:DUTYcycle? [<source>]
<value><NL>
<value> ::= ratio of positive pulse width to period in NR3 format
See Also
Example Code
266
Commands by Subsystem
:MEASure:FALLtime
(see page 586)
Command Syntax
:MEASure:FALLtime [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
This command is not available if the source is FFT (Fast Fourier Transform).
:MEASure:FALLtime? [<source>]
The :MEASure:FALLtime? query measures and outputs the fall time of the
displayed falling (negative- going) edge closest to the trigger reference. The
fall time is determined by measuring the time at the upper threshold of
the falling edge, then measuring the time at the lower threshold of the
falling edge, and calculating the fall time with the following formula:
fall time = time at lower threshold - time at upper threshold
Return Format
<value><NL>
<value> ::= time in seconds between the lower threshold and upper
threshold in NR3 format
See Also
267
Commands by Subsystem
:MEASure:FREQuency
(see page 586)
Command Syntax
:MEASure:FREQuency [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
This command is not available if the source is FFT (Fast Fourier Transform).
:MEASure:FREQuency? [<source>]
<source><NL>
<source> ::= frequency in Hertz in NR3 format
See Also
Example Code
268
Commands by Subsystem
:MEASure:NWIDth
(see page 586)
Command Syntax
:MEASure:NWIDth [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
This command is not available if the source is FFT (Fast Fourier Transform).
:MEASure:NWIDth? [<source>]
<value><NL>
<value> ::= negative pulse width in seconds in NR3 format
See Also
269
Commands by Subsystem
:MEASure:OVERshoot
(see page 586)
Command Syntax
:MEASure:OVERshoot [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
This command is not available if the source is FFT (Fast Fourier Transform).
:MEASure:OVERshoot? [<source>]
<overshoot><NL>
<overshoot>::= the percent of the overshoot of the selected waveform in
NR3 format
See Also
270
Commands by Subsystem
271
Commands by Subsystem
:MEASure:PERiod
(see page 586)
Command Syntax
:MEASure:PERiod [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
This command is not available if the source is FFT (Fast Fourier Transform).
:MEASure:PERiod? [<source>]
<value><NL>
<value> ::= waveform period in seconds in NR3 format
See Also
Example Code
272
Commands by Subsystem
:MEASure:PHASe
(see page 586)
Command Syntax
:MEASure:PHASe [<source1>][,<source2>]
<source1>, <source2> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:MEASure:PHASe? [<source1>][,<source2>]
The :MEASure:PHASe? query measures and returns the phase between the
specified sources.
A phase measurement is a combination of the period and delay
measurements. First, the period is measured on source1. Then the delay is
measured between source1 and source2. The edges used for delay are the
source1 rising edge used for the period measurement closest to the
horizontal reference and the rising edge on source 2. See :MEASure:DELay
for more detail on selecting the 2nd edge.
The phase is calculated as follows:
phase = (delay / period of input 1) x 360
Return Format
<value><NL>
<value> ::= the phase angle value in degrees in NR3 format
See Also
273
Commands by Subsystem
:MEASure:PREShoot
(see page 586)
Command Syntax
:MEASure:PREShoot [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:MEASure:PREShoot? [<source>]
<value><NL>
<value> ::= the percent of preshoot of the selected waveform
in NR3 format
See Also
274
Commands by Subsystem
:MEASure:PWIDth
(see page 586)
Command Syntax
:MEASure:PWIDth [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
This command is not available if the source is FFT (Fast Fourier Transform).
:MEASure:PWIDth? [<source>]
<value><NL>
<value> ::= width of positive pulse in seconds in NR3 format
See Also
275
Commands by Subsystem
:MEASure:RISetime
(see page 586)
Command Syntax
NOTE
Query Syntax
This command is not available if the source is FFT (Fast Fourier Transform).
The :MEASure:RISetime? query measures and outputs the rise time of the
displayed rising (positive- going) edge closest to the trigger reference. For
maximum measurement accuracy, set the sweep speed as fast as possible
while leaving the leading edge of the waveform on the display. The rise
time is determined by measuring the time at the lower threshold of the
rising edge and the time at the upper threshold of the rising edge, then
calculating the rise time with the following formula:
rise time = time at upper threshold - time at lower threshold
Return Format
<value><NL>
<value> ::= rise time in seconds in NR3 format
See Also
276
Commands by Subsystem
:MEASure:SDEViation
(see page 586)
Command Syntax
:MEASure:SDEViation [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
This command is not available if the source is FFT (Fast Fourier Transform).
:MEASure:SDEViation? [<source>]
<value><NL>
<value> ::= calculated std deviation value in NR3 format
See Also
277
Commands by Subsystem
:MEASure:SHOW
(see page 586)
Command Syntax
:MEASure:SHOW <show>
<show> ::= {1 | ON}
:MEASure:SHOW?
<show><NL>
<show> ::= 1
See Also
278
Commands by Subsystem
:MEASure:SOURce
(see page 586)
Command Syntax
:MEASure:SOURce <source1>[,<source2>]
<source1>,<source2> ::= {CHANnel<n> | FUNCtion | MATH | EXTernal}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:MEASure:SOURce?
NOTE
Return Format
MATH is an alias for FUNCtion. The query will return FUNC if the source is FUNCtion or
MATH.
<source1>,<source2><NL>
<source1>,<source2> ::= {CHAN<n> | FUNC | EXT | NONE}
See Also:
Example Code
' MEASURE - The commands in the MEASURE subsystem are used to make
' measurements on displayed waveforms.
myScope.WriteString ":MEASURE:SOURCE CHANNEL1"
' Source to measure.
279
Commands by Subsystem
myScope.WriteString ":MEASURE:FREQUENCY?"
' Query for frequency.
varQueryResult = myScope.ReadNumber
' Read frequency.
MsgBox "Frequency:" + vbCrLf _
+ FormatNumber(varQueryResult / 1000, 4) + " kHz"
myScope.WriteString ":MEASURE:DUTYCYCLE?"
' Query for duty cycle.
varQueryResult = myScope.ReadNumber
' Read duty cycle.
MsgBox "Duty cycle:" + vbCrLf _
+ FormatNumber(varQueryResult, 3) + "%"
myScope.WriteString ":MEASURE:RISETIME?"
' Query for risetime.
varQueryResult = myScope.ReadNumber
' Read risetime.
MsgBox "Risetime:" + vbCrLf _
+ FormatNumber(varQueryResult * 1000000, 4) + " us"
myScope.WriteString ":MEASURE:VPP?"
' Query for Pk to Pk voltage.
varQueryResult = myScope.ReadNumber
' Read VPP.
MsgBox "Peak to peak voltage:" + vbCrLf _
+ FormatNumber(varQueryResult, 4) + " V"
myScope.WriteString ":MEASURE:VMAX?"
' Query for Vmax.
varQueryResult = myScope.ReadNumber
' Read Vmax.
MsgBox "Maximum voltage:" + vbCrLf _
+ FormatNumber(varQueryResult, 4) + " V"
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
280
Commands by Subsystem
:MEASure:TEDGe
(see page 586)
Query Syntax
:MEASure:TEDGe? <slope><occurrence>[,<source>]
<slope> ::= direction of the waveform. A rising slope is indicated by a
space or plus sign (+). A falling edge is indicated by a
minus sign (-).
<occurrence> ::= the transition to be reported. If the occurrence number
is one, the first crossing from the left screen edge is
reported. If the number is two, the second crossing is
reported, etc.
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
This query is not available if the source is FFT (Fast Fourier Transform).
281
Commands by Subsystem
Return Format
<value><NL>
<value> ::= time in seconds of the specified transition in NR3 format
:MEASure:TEDGe
Code
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
See Also
282
Commands by Subsystem
:MEASure:TVALue
(see page 586)
Query Syntax
NOTE
Return Format
This query is not available if the source is FFT (Fast Fourier Transform).
<value><NL>
283
Commands by Subsystem
See Also
284
Commands by Subsystem
:MEASure:VAMPlitude
(see page 586)
Command Syntax
:MEASure:VAMPlitude [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:MEASure:VAMPlitude? [<source>]
<value><NL>
<value> ::= the amplitude of the selected waveform in NR3 format
See Also
285
Commands by Subsystem
:MEASure:VAVerage
(see page 586)
Command Syntax
:MEASure:VAVerage [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:MEASure:VAVerage? [<source>]
<value><NL>
<value> ::= calculated average value in NR3 format
See Also
286
Commands by Subsystem
:MEASure:VBASe
(see page 586)
Command Syntax
:MEASure:VBASe [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
This command is not available if the source is FFT (Fast Fourier Transform).
:MEASure:VBASe? [<source>]
The :MEASure:VBASe? query returns the vertical value at the base of the
waveform. The base value of a pulse is normally not the same as the
minimum value.
Return Format
<base_voltage><NL>
<base_voltage> ::= value at the base of the selected waveform in
NR3 format
See Also
287
Commands by Subsystem
:MEASure:VMAX
(see page 586)
Command Syntax
:MEASure:VMAX [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:MEASure:VMAX? [<source>]
<value><NL>
<value> ::= maximum vertical value of the selected waveform in
NR3 format
See Also
288
Commands by Subsystem
:MEASure:VMIN
(see page 586)
Command Syntax
:MEASure:VMIN [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:MEASure:VMIN? [<source>]
<value><NL>
<value> ::= minimum vertical value of the selected waveform in
NR3 format
See Also
289
Commands by Subsystem
:MEASure:VPP
(see page 586)
Command Syntax
:MEASure:VPP [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:MEASure:VPP? [<source>]
<value><NL>
<value> ::= vertical peak to peak value in NR3 format
See Also
290
Commands by Subsystem
:MEASure:VRATio
(see page 586)
Command Syntax
:MEASure:VRATio [<source1>][,<source2>]
<source1>, <source2> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:MEASure:VRATio? [<source1>][,<source2>]
<value><NL>
<value> ::= the ratio value in dB in NR3 format
See Also
291
Commands by Subsystem
:MEASure:VRMS
(see page 586)
Command Syntax
:MEASure:VRMS [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
This command is not available if the source is FFT (Fast Fourier Transform).
:MEASure:VRMS? [<source>]
<value><NL>
<value> ::= calculated dc RMS value in NR3 format
See Also
292
Commands by Subsystem
:MEASure:VTIMe
(see page 586)
Query Syntax
:MEASure:VTIMe? <vtime_argument>[,<source>]
<vtime_argument> ::= time from trigger in seconds
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Return Format
This query is not available if the source is FFT (Fast Fourier Transform).
<value><NL>
<value> ::= value at the specified time in NR3 format
See Also
293
Commands by Subsystem
:MEASure:VTOP
(see page 586)
Command Syntax
:MEASure:VTOP [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
This query is not available if the source is FFT (Fast Fourier Transform).
:MEASure:VTOP? [<source>]
The :MEASure:VTOP? query returns the vertical value at the top of the
waveform. The top value of the pulse is normally not the same as the
maximum value.
Return Format
<value><NL>
<value> ::= vertical value at the top of the waveform in NR3 format
See Also
294
Commands by Subsystem
:MEASure:XMAX
(see page 586)
Command Syntax
:MEASure:XMAX [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
:MEASure:XMAX? [<source>]
<value><NL>
<value> ::= horizontal value of the maximum in NR3 format
See Also
295
Commands by Subsystem
:MEASure:XMIN
(see page 586)
Command Syntax
:MEASure:XMIN [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
:MEASure:XMIN? [<source>]
<value><NL>
<value> ::= horizontal value of the minimum in NR3 format
See Also
296
Commands by Subsystem
:RECall Commands
Recall previously saved oscilloscope setups and traces. See "Introduction to
:RECall Commands" on page 297.
Table 51 :RECall Commands Summary
Command
Query
:RECall:FILename
<base_name> (see
page 298)
:RECall:FILename?
(see page 298)
:RECall:IMAGe[:STARt]
[<file_spec>] (see
page 299)
n/a
n/a
:RECall:PWD? (see
page 300)
:RECall:SETup[:STARt]
[<file_spec>] (see
page 301)
n/a
Introduction to
:RECall
Commands
297
Commands by Subsystem
:RECall:FILename
(see page 586)
Command Syntax
:RECall:FILename <base_name>
<base_name> ::= quoted ASCII string
NOTE
Query Syntax
This command specifies a file's base name only, without path information or an extension.
:RECall:FILename?
<base_name><NL>
<base_name> ::= quoted ASCII string
See Also
298
Commands by Subsystem
:RECall:IMAGe[:STARt]
(see page 586)
Command Syntax
:RECall:IMAGe[:STARt] [<file_spec>]
<file_spec> ::= {<internal_loc> | <file_name>}
<internal_loc> ::= 0-9; an integer in NR1 format
<file_name> ::= quoted ASCII string
NOTE
See Also
299
Commands by Subsystem
:RECall:PWD
(see page 586)
Query Syntax
:RECall:PWD?
<path_info><NL>
<path_info> ::= quoted ASCII string
See Also
300
Commands by Subsystem
:RECall:SETup[:STARt]
(see page 586)
Command Syntax
:RECall:SETup[:STARt] [<file_spec>]
<file_spec> ::= {<internal_loc> | <file_name>}
<internal_loc> ::= 0-9; an integer in NR1 format
<file_name> ::= quoted ASCII string
NOTE
See Also
301
Commands by Subsystem
:SAVE Commands
Save oscilloscope setups and traces, screen images, and data. See
"Introduction to :SAVE Commands" on page 303.
Table 52 :SAVE Commands Summary
Command
Query
:SAVE:FILename
<base_name> (see
page 304)
:SAVE:FILename? (see
page 304)
:SAVE:IMAGe[:STARt]
[<file_spec>] (see
page 305)
n/a
:SAVE:IMAGe:AREA
<area> (see page 306)
:SAVE:IMAGe:AREA?
(see page 306)
:SAVE:IMAGe:FACTors
{{0 | OFF} | {1 |
ON}} (see page 307)
:SAVE:IMAGe:FACTors?
(see page 307)
{0 | 1}
:SAVE:IMAGe:FORMat
<format> (see
page 308)
:SAVE:IMAGe:FORMat?
(see page 308)
:SAVE:IMAGe:INKSaver
{{0 | OFF} | {1 |
ON}} (see page 309)
:SAVE:IMAGe:INKSaver?
(see page 309)
{0 | 1}
:SAVE:IMAGe:PALette
<palette> (see
page 310)
:SAVE:IMAGe:PALette?
(see page 310)
n/a
:SAVE:PWD? (see
page 311)
:SAVE:SETup[:STARt]
[<file_spec>] (see
page 312)
n/a
:SAVE:WAVeform[:STARt
] [<file_name>] (see
page 313)
n/a
302
Commands by Subsystem
Query
:SAVE:WAVeform:FORMat
<format> (see
page 314)
:SAVE:WAVeform:FORMat
? (see page 314)
:SAVE:WAVeform:LENGth
<length> (see
page 315)
:SAVE:WAVeform:LENGth
? (see page 315)
Introduction to
:SAVE Commands
303
Commands by Subsystem
:SAVE:FILename
(see page 586)
Command Syntax
:SAVE:FILename <base_name>
<base_name> ::= quoted ASCII string
NOTE
Query Syntax
This command specifies a file's base name only, without path information or an extension.
:SAVE:FILename?
<base_name><NL>
<base_name> ::= quoted ASCII string
See Also
304
Commands by Subsystem
:SAVE:IMAGe[:STARt]
(see page 586)
Command Syntax
:SAVE:IMAGe[:STARt] [<file_spec>]
<file_spec> ::= {<internal_loc> | <file_name>}
<internal_loc> ::= 0-9; an integer in NR1 format
<file_name> ::= quoted ASCII string
NOTE
NOTE
See Also
305
Commands by Subsystem
:SAVE:IMAGe:AREA
(see page 586)
Command Syntax
:SAVE:IMAGe:AREA <area>
<area> ::= {GRATicule | SCReen}
The :SAVE:IMAGe:AREA command sets the area that will be saved as part
of the image. If the :SAVE:IMAGe:FORMat is TIFF, the area is GRATicule.
Otherwise, it is SCReen.
Query Syntax
:SAVE:IMAGe:AREA?
<area><NL>
<area> ::= {GRAT | SCR}
See Also
306
Commands by Subsystem
:SAVE:IMAGe:FACTors
(see page 586)
Command Syntax
:SAVE:IMAGe:FACTors <factors>
<factors> ::= {{OFF | 0} | {ON | 1}}
NOTE
Query Syntax
Factors are written to a separate file with the same path and base name but with the ".txt"
extension.
:SAVE:IMAGe:FACTors?
<factors><NL>
<factors> ::= {0 | 1}
See Also
307
Commands by Subsystem
:SAVE:IMAGe:FORMat
(see page 586)
Command Syntax
:SAVE:IMAGe:FORMat <format>
<format> ::= {TIFF | {BMP | BMP24bit} | BMP8bit | PNG}
:SAVE:IMAGe:FORMat?
<format><NL>
<format> ::= {TIFF | BMP | BMP8 | PNG | NONE}
308
Commands by Subsystem
:SAVE:IMAGe:INKSaver
(see page 586)
Command Syntax
:SAVE:IMAGe:INKSaver <value>
<value> ::= {{OFF | 0} | {ON | 1}}
:SAVE:IMAGe:INKSaver?
<value><NL>
<value> ::= {0 | 1}
See Also
309
Commands by Subsystem
:SAVE:IMAGe:PALette
(see page 586)
Command Syntax
:SAVE:IMAGe:PALette <palette>
<palette> ::= {COLor | GRAYscale | MONochrome}
NOTE
Query Syntax
MONochrome is the only valid choice when the :SAVE:IMAGe:FORMat is TIFF. COLor and
GRAYscale are the only valid choices when the format is not TIFF.
:SAVE:IMAGe:PALette?
<palette><NL>
<palette> ::= {COL | GRAY | MON}
See Also
310
Commands by Subsystem
:SAVE:PWD
(see page 586)
Query Syntax
:SAVE:PWD?
<path_info><NL>
<path_info> ::= quoted ASCII string
See Also
311
Commands by Subsystem
:SAVE:SETup[:STARt]
(see page 586)
Command Syntax
:SAVE:SETup[:STARt] [<file_spec>]
<file_spec> ::= {<internal_loc> | <file_name>}
<internal_loc> ::= 0-9; an integer in NR1 format
<file_name> ::= quoted ASCII string
NOTE
See Also
312
Commands by Subsystem
:SAVE:WAVeform[:STARt]
(see page 586)
Command Syntax
:SAVE:WAVeform[:STARt] [<file_name>]
<file_name> ::= quoted ASCII string
NOTE
See Also
313
Commands by Subsystem
:SAVE:WAVeform:FORMat
(see page 586)
Command Syntax
:SAVE:WAVeform:FORMat <format>
<format> ::= {ALB | ASCiixy | CSV | BINary}
:SAVE:WAVeform:FORMat?
<format><NL>
<format> ::= {ALB | ASC | CSV | BIN | NONE}
314
Commands by Subsystem
:SAVE:WAVeform:LENGth
(see page 586)
Command Syntax
:SAVE:WAVeform:LENGth <length>
<length> ::= 100 to max. length; an integer in NR1 format
:SAVE:WAVeform:LENGth?
<length><NL>
<length> ::= 100 to max. length; an integer in NR1 format
See Also
315
Commands by Subsystem
:SBUS Commands
Control oscilloscope functions associated with the serial decode bus. See
"Introduction to :SBUS Commands" on page 317.
Table 53 :SBUS Commands Summary
Command
Query
n/a
:SBUS:CAN:COUNt:ERRor
? (see page 318)
n/a
:SBUS:CAN:COUNt:OVERl
oad? (see page 319)
:SBUS:CAN:COUNt:RESet
(see page 320)
n/a
n/a
n/a
:SBUS:CAN:COUNt:TOTal
? (see page 321)
n/a
:SBUS:CAN:COUNt:UTILi
zation? (see
page 322)
:SBUS:DISPlay {{0 |
OFF} | {1 | ON}} (see
page 323)
:SBUS:DISPlay? (see
page 323)
{0 | 1}
:SBUS:IIC:ASIZe
<size> (see page 324)
:SBUS:IIC:ASIZe? (see
page 324)
:SBUS:LIN:PARity {{0
| OFF} | {1 | ON}}
(see page 325)
:SBUS:LIN:PARity?
(see page 325)
{0 | 1}
:SBUS:MODE <mode>
(see page 326)
:SBUS:MODE? (see
page 326)
:SBUS:SPI:WIDTh
<word_width> (see
page 327)
:SBUS:SPI:WIDTh? (see
page 327)
:SBUS:UART:BASE
<base> (see page 328)
:SBUS:UART:BASE? (see
page 328)
n/a
:SBUS:UART:COUNt:ERRo
r? (see page 329)
:SBUS:UART:COUNt:RESe
t (see page 330)
n/a
n/a
n/a
:SBUS:UART:COUNt:RXFR
ames? (see page 331)
316
Commands by Subsystem
Query
n/a
:SBUS:UART:COUNt:TXFR
ames? (see page 332)
:SBUS:UART:FRAMing
<value> (see
page 333)
:SBUS:UART:FRAMing?
(see page 333)
Introduction to
:SBUS
Commands
NOTE
The :SBUS subsystem commands control the serial decode bus viewing,
mode, and other options.
These commands are only valid on 4 (analog) channel oscilloscope models when a serial
decode option has been licensed.
317
Commands by Subsystem
:SBUS:CAN:COUNt:ERRor
(see page 586)
Query Syntax
:SBUS:CAN:COUNt:ERRor?
<frame_count><NL>
<frame_count> ::= integer in NR1 format
Errors
See Also
318
Commands by Subsystem
:SBUS:CAN:COUNt:OVERload
(see page 586)
Query Syntax
:SBUS:CAN:COUNt:OVERload?
<frame_count><NL>
<frame_count> ::= integer in NR1 format
Errors
See Also
319
Commands by Subsystem
:SBUS:CAN:COUNt:RESet
(see page 586)
Command Syntax
:SBUS:CAN:COUNt:RESet
320
Commands by Subsystem
:SBUS:CAN:COUNt:TOTal
(see page 586)
Query Syntax
:SBUS:CAN:COUNt:TOTal?
<frame_count><NL>
<frame_count> ::= integer in NR1 format
Errors
See Also
321
Commands by Subsystem
:SBUS:CAN:COUNt:UTILization
(see page 586)
Query Syntax
:SBUS:CAN:COUNt:UTILization?
<percent><NL>
<percent> ::= floating-point in NR3 format
Errors
See Also
322
Commands by Subsystem
:SBUS:DISPlay
(see page 586)
Command Syntax
:SBUS:DISPlay <display>
<display> ::= {{1 | ON} | {0 | OFF}}
NOTE
Query Syntax
This command is only valid on 4 (analog) channel oscilloscope models when a serial decode
option has been licensed.
:SBUS:DISPlay?
The :SBUS:DISPlay? query returns the current display setting of the serial
decode bus.
Return Format
<display><NL>
<display> ::= {0 | 1}
Errors
See Also
323
Commands by Subsystem
:SBUS:IIC:ASIZe
(see page 586)
Command Syntax
:SBUS:IIC:ASIZe <size>
<size> ::= {BIT7 | BIT8}
NOTE
Query Syntax
This command is only valid on 4 (analog) channel oscilloscope models when the low-speed
IIC and SPI serial decode option (Option LSS) has been licensed.
:SBUS:IIC:ASIZe?
The :SBUS:IIC:ASIZe? query returns the current IIC address width setting.
Return Format
<mode><NL>
<mode> ::= {BIT7 | BIT8}
Errors
See Also
324
Commands by Subsystem
:SBUS:LIN:PARity
(see page 586)
Command Syntax
:SBUS:LIN:PARity <display>
<display> ::= {{1 | ON} | {0 | OFF}}
NOTE
Query Syntax
This command is only valid on 4 (analog) channel oscilloscope models when the
automotive CAN and LIN serial decode option (Option AMS) has been licensed.
:SBUS:LIN:PARity?
The :SBUS:LIN:PARity? query returns the current LIN parity bits display
setting of the serial decode bus.
Return Format
<display><NL>
<display> ::= {0 | 1}
Errors
See Also
325
Commands by Subsystem
:SBUS:MODE
(see page 586)
Command Syntax
:SBUS:MODE <mode>
<mode> ::= {IIC | SPI | CAN | LIN | UART}
The :SBUS:MODE command determines the decode mode for the serial
bus.
NOTE
Query Syntax
This command is only valid on 4 (analog) channel oscilloscope models when a serial decode
option has been licensed.
:SBUS:MODE?
The :SBUS:MODE? query returns the current serial bus decode mode
setting.
Return Format
<mode><NL>
<mode> ::= {IIC | SPI | CAN | LIN | UART | NONE}
Errors
See Also
326
Commands by Subsystem
:SBUS:SPI:WIDTh
(see page 586)
Command Syntax
:SBUS:SPI:WIDTh <word_width>
<word_width> ::= integer 4-16 in NR1 format
NOTE
Query Syntax
This command is only valid on 4 (analog) channel oscilloscope models when the low-speed
IIC and SPI serial decode option (Option LSS) has been licensed.
:SBUS:SPI:WIDTh?
The :SBUS:SPI:WIDTh? query returns the current SPI decode word width.
Return Format
<word_width><NL>
<word_width> ::= integer 4-16 in NR1 format
Errors
See Also
327
Commands by Subsystem
:SBUS:UART:BASE
(see page 586)
Command Syntax
:SBUS:UART:BASE <base>
<base> ::= {ASCii | BINary | HEX}
The :SBUS:UART:BASE command determines the base to use for the UART
decode display.
NOTE
Query Syntax
This command is only valid on 4 (analog) channel oscilloscope models when the
UART/RS-232 triggering and serial decode option (Option 232) has been licensed.
:SBUS:UART:BASE?
<base><NL>
<base> ::= {ASCii | BINary | HEX}
Errors
See Also
328
Commands by Subsystem
:SBUS:UART:COUNt:ERRor
(see page 586)
Query Syntax
:SBUS:UART:COUNt:ERRor?
NOTE
Return Format
This command is only valid on 4 (analog) channel oscilloscope models when the
UART/RS-232 triggering and serial decode option (Option 232) has been licensed.
<frame_count><NL>
<frame_count> ::= integer in NR1 format
Errors
See Also
329
Commands by Subsystem
:SBUS:UART:COUNt:RESet
(see page 586)
Command Syntax
:SBUS:UART:COUNt:RESet
NOTE
Errors
See Also
This command is only valid on 4 (analog) channel oscilloscope models when the
UART/RS-232 triggering and serial decode option (Option 232) has been licensed.
330
Commands by Subsystem
:SBUS:UART:COUNt:RXFRames
(see page 586)
Query Syntax
:SBUS:UART:COUNt:RXFRames?
NOTE
Return Format
This command is only valid on 4 (analog) channel oscilloscope models when the
UART/RS-232 triggering and serial decode option (Option 232) has been licensed.
<frame_count><NL>
<frame_count> ::= integer in NR1 format
Errors
See Also
331
Commands by Subsystem
:SBUS:UART:COUNt:TXFRames
(see page 586)
Query Syntax
:SBUS:UART:COUNt:TXFRames?
NOTE
Return Format
This command is only valid on 4 (analog) channel oscilloscope models when the
UART/RS-232 triggering and serial decode option (Option 232) has been licensed.
<frame_count><NL>
<frame_count> ::= integer in NR1 format
Errors
See Also
332
Commands by Subsystem
:SBUS:UART:FRAMing
(see page 586)
Command Syntax
:SBUS:UART:FRAMing <value>
<value> ::= {OFF | <decimal> | <nondecimal>}
<decimal> ::= 8-bit integer in decimal from 0-255 (0x00-0xff)
<nondecimal> ::= #Hnn where n ::= {0,..,9 | A,..,F} for hexadecimal
<nondecimal> ::= #Bnn...n where n ::= {0 | 1} for binary
NOTE
Query Syntax
This command is only valid on 4 (analog) channel oscilloscope models when the
UART/RS-232 triggering and serial decode option (Option 232) has been licensed.
:SBUS:UART:FRAMing?
<value><NL>
<value> ::= {OFF | <decimal>}
<decimal> ::= 8-bit integer in decimal from 0-255
Errors
See Also
333
Commands by Subsystem
:SYSTem Commands
Control basic system functions of the oscilloscope. See "Introduction to
:SYSTem Commands" on page 334.
Table 54 :SYSTem Commands Summary
Command
Query
:SYSTem:DATE <date>
(see page 335)
:SYSTem:DATE? (see
page 335)
:SYSTem:DSP <string>
(see page 336)
n/a
n/a
:SYSTem:ERRor? (see
page 337)
:SYSTem:LOCK <value>
(see page 338)
:SYSTem:LOCK? (see
page 338)
:SYSTem:PROTection:LO
CK <value> (see
page 339)
:SYSTem:PROTection:LO
CK? (see page 339)
:SYSTem:SETup
<setup_data> (see
page 340)
:SYSTem:SETup? (see
page 340)
:SYSTem:TIME <time>
(see page 342)
:SYSTem:TIME? (see
page 342)
Introduction to
:SYSTem
Commands
334
Commands by Subsystem
:SYSTem:DATE
(see page 586)
Command Syntax
:SYSTem:DATE <date>
<date> ::= <year>,<month>,<day>
<year> ::= 4-digit year in NR1 format
<month> ::= {1,..,12 | JANuary | FEBruary | MARch | APRil | MAY | JUNe
| JULy | AUGust | SEPtember | OCTober | NOVember | DECember}
<day> ::= {1,..,31}
:SYSTem:DATE?
<year>,<month>,<day><NL>
335
Commands by Subsystem
:SYSTem:DSP
(see page 586)
Command Syntax
:SYSTem:DSP <string>
<string> ::= quoted ASCII string (up to 254 characters)
336
Commands by Subsystem
:SYSTem:ERRor
(see page 586)
Query Syntax
:SYSTem:ERRor?
The :SYSTem:ERRor? query outputs the next error number and text from
the error queue. The instrument has an error queue that is 30 errors deep
and operates on a first- in, first- out basis. Repeatedly sending the
:SYSTem:ERRor? query returns the errors in the order that they occurred
until the queue is empty. Any further queries then return zero until
another error occurs.
Return Format
337
Commands by Subsystem
:SYSTem:LOCK
(see page 586)
Command Syntax
:SYSTem:LOCK <value>
<value> ::= {{1 | ON} | {0 | OFF}}
:SYSTem:LOCK?
The :SYSTem:LOCK? query returns the lock status of the front panel.
Return Format
<value><NL>
<value> ::= {1 | 0}
See Also
338
Commands by Subsystem
:SYSTem:PROTection:LOCK
(see page 586)
Command Syntax
:SYSTem:PROTection:LOCK <value>
<value> ::= {{1 | ON} | {0 | OFF}}
:SYSTem:PROTection:LOCK?
<value><NL>
<value> ::= {1 | 0}
See Also
339
Commands by Subsystem
:SYSTem:SETup
(see page 586)
Command Syntax
:SYSTem:SETup <setup_data>
<setup_data> ::= binary block data in IEEE 488.2 # format.
:SYSTem:SETup?
<setup_data><NL>
<setup_data> ::= binary block data data in IEEE 488.2 # format
See Also
Example Code
340
Commands by Subsystem
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
341
Commands by Subsystem
:SYSTem:TIME
(see page 586)
Command Syntax
:SYSTem:TIME <time>
<time> ::= hours,minutes,seconds in NR1 format
The :SYSTem:TIME command sets the system time, using a 24- hour format.
Commas are used as separators. Validity checking is performed to ensure
that the time is valid.
Query Syntax
:SYSTem:TIME? <time>
<time><NL>
<time> ::= hours,minutes,seconds in NR1 format
See Also
342
Commands by Subsystem
:TIMebase Commands
Control all horizontal sweep functions. See "Introduction to :TIMebase
Commands" on page 343.
Table 55 :TIMebase Commands Summary
Command
Query
:TIMebase:MODE
<value> (see
page 345)
:TIMebase:MODE? (see
page 345)
:TIMebase:POSition
<pos> (see page 346)
:TIMebase:POSition?
(see page 346)
:TIMebase:RANGe
<range_value> (see
page 347)
:TIMebase:RANGe? (see
page 347)
:TIMebase:REFerence
{LEFT | CENTer |
RIGHt} (see page 348)
:TIMebase:REFerence?
(see page 348)
:TIMebase:SCALe
<scale_value> (see
page 349)
:TIMebase:SCALe? (see
page 349)
:TIMebase:VERNier {{0
| OFF} | {1 | ON}}
(see page 350)
:TIMebase:VERNier?
(see page 350)
{0 | 1}
:TIMebase:WINDow:POSi
tion <pos> (see
page 351)
:TIMebase:WINDow:POSi
tion? (see page 351)
:TIMebase:WINDow:RANG
e <range_value> (see
page 352)
:TIMebase:WINDow:RANG
e? (see page 352)
:TIMebase:WINDow:SCAL
e <scale_value> (see
page 353)
:TIMebase:WINDow:SCAL
e? (see page 353)
Introduction to
:TIMebase
Commands
343
Commands by Subsystem
344
Commands by Subsystem
:TIMebase:MODE
(see page 586)
Command Syntax
:TIMebase:MODE <value>
<value> ::= {MAIN | WINDow | XY | ROLL}
The :TIMebase:MODE command sets the current time base. There are four
time base modes:
MAIN The normal time base mode is the main time base. It is the
default time base mode after the *RST (Reset) command.
WINDow In the WINDow (delayed) time base mode, measurements are
made in the delayed time base if possible; otherwise, the measurements
are made in the main time base.
XY In the XY mode, the :TIMebase:RANGe, :TIMebase:POSition, and
:TIMebase:REFerence commands are not available. No measurements are
available in this mode.
ROLL In the ROLL mode, data moves continuously across the display
from left to right. The oscilloscope runs continuously and is untriggered.
The :TIMebase:REFerence selection changes to RIGHt.
NOTE
Query Syntax
:TIMebase:MODE?
<value><NL>
<value> ::= {MAIN | WIND | XY | ROLL}
See Also
Example Code
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
345
Commands by Subsystem
:TIMebase:POSition
(see page 586)
Command Syntax
:TIMebase:POSition <pos>
<pos> ::= time in seconds from the trigger to the display reference
in NR3 format
NOTE
Query Syntax
:TIMebase:POSition?
The :TIMebase:POSition? query returns the current time from the trigger to
the display reference in seconds.
Return Format
<pos><NL>
<pos> ::= time in seconds from the trigger to the display reference
in NR3 format
See Also
346
Commands by Subsystem
:TIMebase:RANGe
(see page 586)
Command Syntax
:TIMebase:RANGe <range_value>
<range_value> ::= 10 ns through 500 s in NR3 format
:TIMebase:RANGe?
The :TIMebase:RANGe query returns the current full- scale range value for
the main window.
Return Format
<range_value><NL>
<range_value> ::= 10 ns through 500 s in NR3 format
See Also
Example Code
' TIME_RANGE - Sets the full scale horizontal time in seconds. The
' range value is 10 times the time per division.
myScope.WriteString ":TIM:RANG 2e-3"
' Set the time range to 0.002
seconds.
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
347
Commands by Subsystem
:TIMebase:REFerence
(see page 586)
Command Syntax
:TIMebase:REFerence <reference>
<reference> ::= {LEFT | CENTer | RIGHt}
:TIMebase:REFerence?
<reference><NL>
<reference> ::= {LEFT | CENT | RIGH}
See Also
Example Code
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
348
Commands by Subsystem
:TIMebase:SCALe
(see page 586)
Command Syntax
:TIMebase:SCALe <scale_value>
<scale_value> ::= 1 ns through 50 s in NR3 format
:TIMebase:SCALe?
<scale_value><NL>
<scale_value> ::= 1 ns through 50 s in NR3 format
See Also
349
Commands by Subsystem
:TIMebase:VERNier
(see page 586)
Command Syntax
:TIMebase:VERNier?
The :TIMebase:VERNier? query returns the current state of the time base
control's vernier setting.
Return Format
<vernier value><NL>
<vernier value> ::= {0 | 1}
See Also
350
Commands by Subsystem
:TIMebase:WINDow:POSition
(see page 586)
Command Syntax
:TIMebase:WINDow:POSition?
<value><NL>
<value> ::= position value in seconds
See Also
351
Commands by Subsystem
:TIMebase:WINDow:RANGe
(see page 586)
Command Syntax
:TIMebase:WINDow:RANGe?
<value><NL>
<value> ::= range value in seconds
See Also
352
Commands by Subsystem
:TIMebase:WINDow:SCALe
(see page 586)
Command Syntax
:TIMebase:WINDow:SCALe <scale_value>
<scale_value> ::= scale value in seconds in NR3 format
:TIMebase:WINDow:SCALe?
<scale_value><NL>
<scale_value> ::= current seconds per division for the delayed window
See Also
353
Commands by Subsystem
:TRIGger Commands
Control the trigger modes and parameters for each trigger type. See:
"Introduction to :TRIGger Commands" on page 354
"General :TRIGger Commands" on page 357
":TRIGger:CAN Commands" on page 365
":TRIGger:DURation Commands" on page 376
":TRIGger[:EDGE] Commands" on page 382
":TRIGger:GLITch Commands" on page 388 (Pulse Width trigger)
":TRIGger:IIC Commands" on page 396
":TRIGger:LIN Commands" on page 405
":TRIGger:SPI Commands" on page 413
":TRIGger:TV Commands" on page 422
":TRIGger:UART Commands" on page 428
Introduction to
:TRIGger
Commands
354
Commands by Subsystem
NOTE
The CAN and LIN serial decode option (Option ASM) replaces the functionality that was
available with the N2758A CAN trigger module for the 54620/54640 Series oscilloscopes.
355
Commands by Subsystem
356
Commands by Subsystem
Query
:TRIGger:HFReject {{0
| OFF} | {1 | ON}}
(see page 358)
:TRIGger:HFReject?
(see page 358)
{0 | 1}
:TRIGger:HOLDoff
<holdoff_time> (see
page 359)
:TRIGger:HOLDoff?
(see page 359)
<holdoff_time> ::= 60 ns to 10 s
in NR3 format
:TRIGger:MODE <mode>
(see page 360)
:TRIGger:MODE? (see
page 360)
:TRIGger:NREJect {{0
| OFF} | {1 | ON}}
(see page 361)
:TRIGger:NREJect?
(see page 361)
{0 | 1}
:TRIGger:PATTern
<value>, <mask>
[,<edge
source>,<edge>] (see
page 362)
:TRIGger:PATTern?
(see page 362)
:TRIGger:SWEep
<sweep> (see
page 364)
:TRIGger:SWEep? (see
page 364)
357
Commands by Subsystem
:TRIGger:HFReject
(see page 586)
Command Syntax
:TRIGger:HFReject <value>
<value> ::= {{0 | OFF} | {1 | ON}}
The :TRIGger:HFReject command turns the high frequency reject filter off
and on. The high frequency reject filter adds a 50 kHz low- pass filter in
the trigger path to remove high frequency components from the trigger
waveform. Use this filter to remove high- frequency noise, such as AM or
FM broadcast stations, from the trigger path.
Query Syntax
:TRIGger:HFReject?
<value><NL>
<value> ::= {0 | 1}
See Also
358
Commands by Subsystem
:TRIGger:HOLDoff
(see page 586)
Command Syntax
:TRIGger:HOLDoff <holdoff_time>
<holdoff_time> ::= 60 ns to 10 s in NR3 format
:TRIGger:HOLDoff?
The :TRIGger:HOLDoff? query returns the holdoff time value for the
current trigger mode.
Return Format
<holdoff_time><NL>
<holdoff_time> ::= the holdoff time value in seconds in NR3 format.
See Also
359
Commands by Subsystem
:TRIGger:MODE
(see page 586)
Command Syntax
:TRIGger:MODE <mode>
1234567890123456789012345678901234567890123456789012345678901234567890
<mode> ::= {EDGE | GLITch | PATTern | CAN | DURation | IIC | LIN | SPI
| TV | USB | FLEXray | UART}
:TRIGger:MODE?
<mode><NL>
<mode> ::= {NONE | EDGE | GLITch | PATTern | CAN | DURation | IIC
| LIN | SPI | TV | USB | FLEXray | UART}
See Also
Example Code
' TRIGGER_MODE - Set the trigger mode to EDGE, GLITch, PATTern, CAN,
' DURation, IIC, LIN, SPI, TV, USB, FLEXray, or UART.
' Set the trigger mode to EDGE.
myScope.WriteString ":TRIGGER:MODE EDGE"
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
360
Commands by Subsystem
:TRIGger:NREJect
(see page 586)
Command Syntax
:TRIGger:NREJect <value>
<value> ::= {{0 | OFF} | {1 | ON}}
The :TRIGger:NREJect command turns the noise reject filter off and on.
When the noise reject filter is on, the trigger circuitry is less sensitive to
noise but may require a greater amplitude waveform to trigger the
oscilloscope. This command is not valid in TV trigger mode.
Query Syntax
:TRIGger:NREJect?
The :TRIGger:NREJect? query returns the current noise reject filter mode.
Return Format
<value><NL>
<value> ::= {0 | 1}
See Also
361
Commands by Subsystem
:TRIGger:PATTern
(see page 586)
Command Syntax
:TRIGger:PATTern <pattern>
<pattern> ::= <value>, <mask> [, <edge source>, <edge>]
<value> ::= integer in NR1 format or <string>
<mask> ::= integer in NR1 format or <string>
<string> ::= "0xnn"; n ::= {0,..,9 | A,..,F}
(# bits = # channels, see following table)
<edge source> ::= {CHANnel<n> | EXTernal | NONE}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
<edge> ::= {POSitive | NEGative}
4 analog channels
2 analog channels
Set a <value> bit to "0" to set the pattern for the corresponding channel to
low. Set a <value> bit to "1" to set the pattern to high.
Set a <mask> bit to "0" to ignore the data for the corresponding channel.
Only channels with a "1" set on the appropriate mask bit are used.
NOTE
Query Syntax
The optional source and the optional edge should be sent together or not at all. The edge
will be set in the simple pattern if it is included. If the edge source is also specified in the
mask, the edge takes precedence.
:TRIGger:PATTern?
The :TRIGger:PATTern? query returns the pattern value, the mask, and the
edge of interest in the simple pattern.
Return Format
See Also
362
<pattern><NL>
Commands by Subsystem
363
Commands by Subsystem
:TRIGger:SWEep
(see page 586)
Command Syntax
:TRIGger:SWEep <sweep>
<sweep> ::= {AUTO | NORMal}
NOTE
Query Syntax
:TRIGger:SWEep?
<sweep><NL>
<sweep> ::= current trigger sweep mode
See Also
364
Commands by Subsystem
:TRIGger:CAN Commands
Table 57 :TRIGger:CAN Commands Summary
Command
Query
:TRIGger:CAN:PATTern:
DATA <value>, <mask>
(see page 367)
:TRIGger:CAN:PATTern:
DATA? (see page 367)
:TRIGger:CAN:PATTern:
DATA:LENGth <length>
(see page 368)
:TRIGger:CAN:PATTern:
DATA:LENGth? (see
page 368)
:TRIGger:CAN:PATTern:
ID <value>, <mask>
(see page 369)
:TRIGger:CAN:PATTern:
ID? (see page 369)
:TRIGger:CAN:PATTern:
ID:MODE <value> (see
page 370)
:TRIGger:CAN:PATTern:
ID:MODE? (see
page 370)
:TRIGger:CAN:SAMPlepo
int <value> (see
page 371)
:TRIGger:CAN:SAMPlepo
int? (see page 371)
:TRIGger:CAN:SIGNal:B
AUDrate <baudrate>
(see page 372)
:TRIGger:CAN:SIGNal:B
AUDrate? (see
page 372)
365
Commands by Subsystem
Query
:TRIGger:CAN:SOURce
<source> (see
page 373)
:TRIGger:CAN:SOURce?
(see page 373)
:TRIGger:CAN:TRIGger
<condition> (see
page 374)
:TRIGger:CAN:TRIGger?
(see page 375)
366
Commands by Subsystem
:TRIGger:CAN:PATTern:DATA
(see page 586)
Command Syntax
:TRIGger:CAN:PATTern:DATA <value>,<mask>
<value> ::= 64-bit integer in decimal, <nondecimal>, or <string>
<mask> ::= 64-bit integer in decimal, <nondecimal>, or <string>
<nondecimal> ::= #Hnn...n where n ::= {0,..,9 | A,..,F} for hexadecimal
<nondecimal> ::= #Bnn...n where n ::= {0 | 1} for binary
<string> ::= "0xnn...n" where n ::= {0,..,9 | A,..,F} for hexadecimal
NOTE
If more bytes are sent for <value> or <mask> than specified by the
:TRIGger:CAN:PATTern:DATA:LENGth command, the most significant bytes will be
truncated. If the data length is changed after the <value> and <mask> are programmed, the
added or deleted bytes will be added to or deleted from the least significant bytes.
NOTE
This command is only valid when the automotive CAN and LIN serial decode option (Option
AMS) has been licensed.
Query Syntax
:TRIGger:CAN:PATTern:DATA?
367
Commands by Subsystem
:TRIGger:CAN:PATTern:DATA:LENGth
(see page 586)
Command Syntax
:TRIGger:CAN:PATTern:DATA:LENGth <length>
<length> ::= integer from 1 to 8 in NR1 format
NOTE
Query Syntax
This command is only valid when the automotive CAN and LIN serial decode option (Option
AMS) has been licensed.
:TRIGger:CAN:PATTern:DATA:LENGth?
<count><NL>
<count> ::= integer from 1 to 8 in NR1 format
Errors
See Also
368
Commands by Subsystem
:TRIGger:CAN:PATTern:ID
(see page 586)
Command Syntax
NOTE
If more bits are sent than allowed (11 bits in standard mode, 29 bits in extended mode) by
the :TRIGger:CAN:PATTern:ID:MODE command, the most significant bytes will be
truncated. If the ID mode is changed after the <value> and <mask> are programmed, the
added or deleted bits will be added to or deleted from the most significant bits.
NOTE
This command is only valid when the automotive CAN and LIN serial decode option (Option
AMS) has been licensed.
Query Syntax
:TRIGger:CAN:PATTern:ID?
369
Commands by Subsystem
:TRIGger:CAN:PATTern:ID:MODE
(see page 586)
Command Syntax
:TRIGger:CAN:PATTern:ID:MODE <value>
<value> ::= {STANdard | EXTended}
NOTE
Query Syntax
This command is only valid when the automotive CAN and LIN serial decode option (Option
AMS) has been licensed.
:TRIGger:CAN:PATTern:ID:MODE?
<value><NL>
<value> ::= {STAN | EXT}
Errors
See Also
370
Commands by Subsystem
:TRIGger:CAN:SAMPlepoint
(see page 586)
Command Syntax
:TRIGger:CAN:SAMPlepoint <value>
<value><NL>
<value> ::= {60 | 62.5 | 68 | 70 | 75 | 80 | 87.5} in NR3 format
:TRIGger:CAN:SAMPlepoint?
<value><NL>
<value> ::= {60 | 62.5 | 68 | 70 | 75 | 80 | 87.5} in NR3 format
See Also
371
Commands by Subsystem
:TRIGger:CAN:SIGNal:BAUDrate
(see page 586)
Command Syntax
:TRIGger:CAN:SIGNal:BAUDrate <baudrate>
<baudrate> ::= integer in NR1 format
<baudrate> ::= {10000 | 20000 | 33300 | 50000 | 62500 | 83300 | 100000
| 125000 | 250000 | 500000 | 800000 |1000000}
:TRIGger:CAN:SIGNal:BAUDrate?
<baudrate><NL>
<baudrate> ::= integer = {10000 | 20000 | 33300 | 50000 | 62500
| 83300 | 100000 | 125000 | 250000 | 500000
| 800000 |1000000}
See Also
372
Commands by Subsystem
:TRIGger:CAN:SOURce
(see page 586)
Command Syntax
:TRIGger:CAN:SOURce <source>
<source> ::= {CHANnel<n> | EXTernal} for the DSO models
<source> ::= {CHANnel<n> | DIGital0,..,DIGital15} for the MSO models
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The :TRIGger:CAN:SOURce command sets the source for the CAN signal.
The source setting is only valid when :TRIGger:CAN:TRIGger is set to SOF
(start of frame).
Query Syntax
:TRIGger:CAN:SOURce?
The :TRIGger:CAN:SOURce? query returns the current source for the CAN
signal.
Return Format
See Also
<source><NL>
373
Commands by Subsystem
:TRIGger:CAN:TRIGger
(see page 586)
Command Syntax
:TRIGger:CAN:TRIGger <condition>
<condition> ::= {SOF | DATA | ERRor | IDData | IDEither | IDRemote |
ALLerrors | OVERload | ACKerror}
374
SOF
DATA
ERRor
IDData
IDEither
IDRemote
ALLerrors
OVERload
ACKerror
Commands by Subsystem
NOTE
Query Syntax
SOF is the only valid selection for analog oscilloscopes. If the automotive CAN and LIN
serial decode option (Option AMS) has not been licensed, SOF is the only valid selection.
:TRIGger:CAN:TRIGger?
<condition><NL>
<condition> ::= {SOF | DATA | ERR | IDD | IDE | IDR | ALL | OVER | ACK}
Errors
See Also
375
Commands by Subsystem
:TRIGger:DURation Commands
Table 58 :TRIGger:DURation Commands Summary
Command
Query
:TRIGger:DURation:GRE
aterthan <greater
than time>[suffix]
(see page 377)
:TRIGger:DURation:GRE
aterthan? (see
page 377)
:TRIGger:DURation:LES
Sthan <less than
time>[suffix] (see
page 378)
:TRIGger:DURation:LES
Sthan? (see page 378)
:TRIGger:DURation:PAT
Tern <value>, <mask>
(see page 379)
:TRIGger:DURation:PAT
Tern? (see page 379)
:TRIGger:DURation:QUA
Lifier <qualifier>
(see page 380)
:TRIGger:DURation:QUA
Lifier? (see
page 380)
:TRIGger:DURation:RAN
Ge <greater than
time>[suffix], <less
than time>[suffix]
(see page 381)
:TRIGger:DURation:RAN
Ge? (see page 381)
376
Commands by Subsystem
:TRIGger:DURation:GREaterthan
(see page 586)
Command Syntax
:TRIGger:DURation:GREaterthan?
377
Commands by Subsystem
:TRIGger:DURation:LESSthan
(see page 586)
Command Syntax
:TRIGger:DURation:LESSthan?
378
Commands by Subsystem
:TRIGger:DURation:PATTern
(see page 586)
Command Syntax
4 analog channels
2 analog channels
Set a <value> bit to "0" to set the pattern for the corresponding channel to
low. Set a <value> bit to "1" to set the pattern to high.
Set a <mask> bit to "0" to ignore the data for the corresponding channel.
Only channels with a "1" set on the appropriate mask bit are used.
Query Syntax
:TRIGger:DURation:PATTern?
<value>, <mask><NL>
<value> ::= a 32-bit integer in NR1 format.
<mask> ::= a 32-bit integer in NR1 format.
See Also
379
Commands by Subsystem
:TRIGger:DURation:QUALifier
(see page 586)
Command Syntax
:TRIGger:DURation:QUALifier <qualifier>
<qualifier> ::= {GREaterthan | LESSthan | INRange | OUTRange | TIMeout}
:TRIGger:DURation:QUALifier?
<qualifier><NL>
380
Commands by Subsystem
:TRIGger:DURation:RANGe
(see page 586)
Command Syntax
NOTE
Query Syntax
If you set the minimum duration longer than the maximum duration, the order of the
parameters is automatically reversed.
:TRIGger:DURation:RANGe?
381
Commands by Subsystem
:TRIGger[:EDGE] Commands
Table 59 :TRIGger[:EDGE] Commands Summary
Command
Query
:TRIGger[:EDGE]:COUPl
ing {AC | DC | LF}
(see page 383)
:TRIGger[:EDGE]:COUPl
ing? (see page 383)
{AC | DC | LF}
:TRIGger[:EDGE]:LEVel
<level> [,<source>]
(see page 384)
:TRIGger[:EDGE]:LEVel
? [<source>] (see
page 384)
:TRIGger[:EDGE]:REJec
t {OFF | LF | HF}
(see page 385)
:TRIGger[:EDGE]:REJec
t? (see page 385)
{OFF | LF | HF}
:TRIGger[:EDGE]:SLOPe
<polarity> (see
page 386)
:TRIGger[:EDGE]:SLOPe
? (see page 386)
:TRIGger[:EDGE]:SOURc
e <source> (see
page 387)
:TRIGger[:EDGE]:SOURc
e? (see page 387)
382
Commands by Subsystem
:TRIGger[:EDGE]:COUPling
(see page 586)
Command Syntax
:TRIGger[:EDGE]:COUPling <coupling>
<coupling> ::= {AC | DC | LFReject}
NOTE
Query Syntax
:TRIGger[:EDGE]:COUPling?
<coupling><NL>
<coupling> ::= {AC | DC | LFR}
See Also
383
Commands by Subsystem
:TRIGger[:EDGE]:LEVel
(see page 586)
Command Syntax
:TRIGger[:EDGE]:LEVel <level>
<level> ::= <level>[,<source>]
<level> ::= 0.75 x full-scale voltage from center screen in NR3 format
for internal triggers
<level> ::= 2 V with probe attenuation at 1:1 in NR3 format for
external triggers
<source> ::= {CHANnel<n> | EXTernal}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The :TRIGger[:EDGE]:LEVel command sets the trigger level voltage for the
active trigger source.
NOTE
Query Syntax
If the optional source is specified and is not the active source, the level on the active source
is not affected and the active source is not changed.
:TRIGger[:EDGE]:LEVel? [<source>]
<level><NL>
384
Commands by Subsystem
:TRIGger[:EDGE]:REJect
(see page 586)
Command Syntax
:TRIGger[:EDGE]:REJect <reject>
<reject> ::= {OFF | LFReject | HFReject}
NOTE
Query Syntax
:TRIGger[:EDGE]:REJect?
<reject><NL>
<reject> ::= {OFF | LFR | HFR}
See Also
385
Commands by Subsystem
:TRIGger[:EDGE]:SLOPe
(see page 586)
Command Syntax
:TRIGger[:EDGE]:SLOPe <slope>
<slope> ::= {NEGative | POSitive | ALTernate}
:TRIGger[:EDGE]:SLOPe?
<slope><NL>
<slope> ::= {NEG | POS | ALT}
See Also
Example Code
' TRIGGER_EDGE_SLOPE - Sets the slope of the edge for the trigger.
' Set the slope to positive.
myScope.WriteString ":TRIGGER:EDGE:SLOPE POSITIVE"
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
386
Commands by Subsystem
:TRIGger[:EDGE]:SOURce
(see page 586)
Command Syntax
:TRIGger[:EDGE]:SOURce <source>
<source> ::= {CHANnel<n> | EXTernal | LINE}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:TRIGger[:EDGE]:SOURce?
<source><NL>
<source> ::= {CHAN<n> | EXT | LINE | NONE}
See Also
Example Code
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
387
Commands by Subsystem
:TRIGger:GLITch Commands
Table 60 :TRIGger:GLITch Commands Summary
Command
Query
:TRIGger:GLITch:GREat
erthan <greater than
time>[suffix] (see
page 389)
:TRIGger:GLITch:GREat
erthan? (see
page 389)
:TRIGger:GLITch:LESSt
han <less than
time>[suffix] (see
page 390)
:TRIGger:GLITch:LESSt
han? (see page 390)
:TRIGger:GLITch:LEVel
<level> [<source>]
(see page 391)
:TRIGger:GLITch:LEVel
? (see page 391)
:TRIGger:GLITch:POLar
ity <polarity> (see
page 392)
:TRIGger:GLITch:POLar
ity? (see page 392)
:TRIGger:GLITch:QUALi
fier <qualifier> (see
page 393)
:TRIGger:GLITch:QUALi
fier? (see page 393)
:TRIGger:GLITch:RANGe
<greater than
time>[suffix], <less
than time>[suffix]
(see page 394)
:TRIGger:GLITch:RANGe
? (see page 394)
:TRIGger:GLITch:SOURc
e <source> (see
page 395)
:TRIGger:GLITch:SOURc
e? (see page 395)
388
Commands by Subsystem
:TRIGger:GLITch:GREaterthan
(see page 586)
Command Syntax
:TRIGger:GLITch:GREaterthan <greater_than_time>[<suffix>]
<greater_than_time> ::= 32-bit floating-point number (5 ns - 10 seconds)
in NR3 format
<suffix> ::= {s | ms | us | ns | ps}
:TRIGger:GLITch:GREaterthan?
<greater_than_time><NL>.
389
Commands by Subsystem
:TRIGger:GLITch:LESSthan
(see page 586)
Command Syntax
:TRIGger:GLITch:LESSthan <less_than_time>[<suffix>]
<less_than_time> ::= floating-point number (5 ns - 10 seconds)
<suffix> ::= {s | ms | us | ns | ps}
:TRIGger:GLITch:LESSthan?
<less_than_time><NL>
<less_than_time> ::= a 32-bit floating-point number in NR3 format.
See Also
390
Commands by Subsystem
:TRIGger:GLITch:LEVel
(see page 586)
Command Syntax
:TRIGger:GLITch:LEVel <level_argument>
<level_argument> ::= <level>[, <source>]
<level> ::= .75 x full-scale voltage from center screen in NR3 format
for internal triggers
<level> ::= 2 V with probe attenuation at 1:1 in NR3 format for
external triggers
<source> ::= {CHANnel<n> | EXTernal}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The :TRIGger:GLITch:LEVel command sets the trigger level voltage for the
active pulse width trigger.
Query Syntax
:TRIGger:GLITch:LEVel?
<level_argument><NL>
391
Commands by Subsystem
:TRIGger:GLITch:POLarity
(see page 586)
Command Syntax
:TRIGger:GLITch:POLarity <polarity>
<polarity> ::= {POSitive | NEGative}
:TRIGger:GLITch:POLarity?
<polarity><NL>
<polarity> ::= {POS | NEG}
See Also
392
Commands by Subsystem
:TRIGger:GLITch:QUALifier
(see page 586)
Command Syntax
:TRIGger:GLITch:QUALifier <operator>
<operator> ::= {GREaterthan | LESSthan | RANGe}
This command sets the mode of operation of the glitch pulse width trigger.
The oscilloscope can trigger on a pulse width that is greater than a time
value, less than a time value, or within a range of time values.
Query Syntax
:TRIGger:GLITch:QUALifier?
<operator><NL>
<operator> ::= {GRE | LESS | RANG}
See Also
393
Commands by Subsystem
:TRIGger:GLITch:RANGe
(see page 586)
Command Syntax
:TRIGger:GLITch:RANGe?
394
Commands by Subsystem
:TRIGger:GLITch:SOURce
(see page 586)
Command Syntax
:TRIGger:GLITch:SOURce <source>
<source> ::= {CHANnel<n> | EXTernal}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:TRIGger:GLITch:SOURce?
<source><NL>
Example Code
395
Commands by Subsystem
:TRIGger:IIC Commands
Table 61 :TRIGger:IIC Commands Summary
Command
Query
:TRIGger:IIC:PATTern:
ADDRess <value> (see
page 397)
:TRIGger:IIC:PATTern:
ADDRess? (see
page 397)
:TRIGger:IIC:PATTern:
DATA <value> (see
page 398)
:TRIGger:IIC:PATTern:
DATA? (see page 398)
:TRIGger:IIC:PATTern:
DATa2 <value> (see
page 399)
:TRIGger:IIC:PATTern:
DATa2? (see page 399)
:TRIGger:IIC[:SOURce]
:CLOCk <source> (see
page 400)
:TRIGger:IIC[:SOURce]
:CLOCk? (see
page 400)
:TRIGger:IIC[:SOURce]
:DATA <source> (see
page 401)
:TRIGger:IIC[:SOURce]
:DATA? (see page 401)
:TRIGger:IIC:TRIGger:
QUALifier <value>
(see page 402)
:TRIGger:IIC:TRIGger:
QUALifier? (see
page 402)
:TRIGger:IIC:TRIGger[
:TYPE] <type> (see
page 403)
:TRIGger:IIC:TRIGger[
:TYPE]? (see
page 403)
396
Commands by Subsystem
:TRIGger:IIC:PATTern:ADDRess
(see page 586)
Command Syntax
:TRIGger:IIC:PATTern:ADDRess <value>
<value> ::= integer or <string>
<string> ::= "0xnn" where n ::= {0,..,9 | A,..,F}
:TRIGger:IIC:PATTern:ADDRess?
<value><NL>
<value> ::= integer
See Also
397
Commands by Subsystem
:TRIGger:IIC:PATTern:DATA
(see page 586)
Command Syntax
:TRIGger:IIC:PATTern:DATA <value>
<value> ::= integer or <string>
<string> ::= "0xnn" where n ::= {0,..,9 | A,..,F}
:TRIGger:IIC:PATTern:DATA?
<value><NL>
398
Commands by Subsystem
:TRIGger:IIC:PATTern:DATa2
(see page 586)
Command Syntax
:TRIGger:IIC:PATTern:DATa2 <value>
<value> ::= integer or <string>
<string> ::= "0xnn" where n ::= {0,..,9 | A,..,F}
:TRIGger:IIC:PATTern:DATa2?
<value><NL>
399
Commands by Subsystem
:TRIGger:IIC:SOURce:CLOCk
(see page 586)
Command Syntax
:TRIGger:IIC:[SOURce:]CLOCk <source>
<source> ::= {CHANnel<n> | EXTernal} for the DSO models
<source> ::= {CHANnel<n> | DIGital0,..,DIGital15} for the MSO models
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:TRIGger:IIC:[SOURce:]CLOCk?
<source><NL>
400
Commands by Subsystem
:TRIGger:IIC:SOURce:DATA
(see page 586)
Command Syntax
:TRIGger:IIC:[SOURce:]DATA <source>
<source> ::= {CHANnel<n> | EXTernal} for the DSO models
<source> ::= {CHANnel<n> | DIGital0,..,DIGital15} for the MSO models
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:TRIGger:IIC:[SOURce:]DATA?
<source><NL>
401
Commands by Subsystem
:TRIGger:IIC:TRIGger:QUALifier
(see page 586)
Command Syntax
:TRIGger:IIC:TRIGger:QUALifier <value>
<value> ::= {EQUal | NOTequal | LESSthan | GREaterthan}
:TRIGger:IIC:TRIGger:QUALifier?
<value><NL>
<value> ::= {EQUal | NOTequal | LESSthan | GREaterthan}
See Also
402
Commands by Subsystem
:TRIGger:IIC:TRIGger[:TYPE]
(see page 586)
Command Syntax
:TRIGger:IIC:TRIGger[:TYPE] <value>
<value> ::= {STARt | STOP | READ7 | READEprom | WRITe7 | WRITe10
| NACKnowledge | ANACknowledge | R7Data2 | W7Data2 | RESTart}
NOTE
Query Syntax
The short form of READ7 (READ7), READEprom (READE), WRITe7 (WRIT7), and WRITe10
(WRIT10) do not follow the defined Long Form to Short Form Truncation Rules (see
page 588).
:TRIGger:IIC:TRIGger[:TYPE]?
<value><NL>
<value> ::= {STAR | STOP | READ7 | READE | WRIT7 | WRIT10 | NACK | ANAC
| R7D2 | W7D2 | REST}
See Also
403
Commands by Subsystem
404
Commands by Subsystem
:TRIGger:LIN Commands
Table 62 :TRIGger:LIN Commands Summary
Command
Query
:TRIGger:LIN:ID
<value> (see
page 406)
:TRIGger:LIN:ID? (see
page 406)
:TRIGger:LIN:SAMPlepo
int <value> (see
page 407)
:TRIGger:LIN:SAMPlepo
int? (see page 407)
:TRIGger:LIN:SIGNal:B
AUDrate <baudrate>
(see page 408)
:TRIGger:LIN:SIGNal:B
AUDrate? (see
page 408)
:TRIGger:LIN:SOURce
<source> (see
page 409)
:TRIGger:LIN:SOURce?
(see page 409)
:TRIGger:LIN:STANdard
<std> (see page 410)
:TRIGger:LIN:STANdard
? (see page 410)
:TRIGger:LIN:SYNCbrea
k <value> (see
page 411)
:TRIGger:LIN:SYNCbrea
k? (see page 411)
:TRIGger:LIN:TRIGger
<condition> (see
page 412)
:TRIGger:LIN:TRIGger?
(see page 412)
405
Commands by Subsystem
:TRIGger:LIN:ID
(see page 586)
Command Syntax
:TRIGger:LIN:ID <value>
<value> ::= 7-bit integer in decimal, <nondecimal>, or <string>
from 0-63 or 0x00-0x3f
<nondecimal> ::= #Hnn where n ::= {0,..,9 | A,..,F} for hexadecimal
<nondecimal> ::= #Bnn...n where n ::= {0 | 1} for binary
<string> ::= "0xnn" where n ::= {0,..,9 | A,..,F} for hexadecimal
NOTE
This command is only valid when the automotive CAN and LIN serial decode option (Option
AMS) has been licensed.
:TRIGger:LIN:ID?
<value><NL>
<value> ::= integer in decimal
Errors
See Also
406
Commands by Subsystem
:TRIGger:LIN:SAMPlepoint
(see page 586)
Command Syntax
:TRIGger:LIN:SAMPlepoint <value>
<value><NL>
<value> ::= {60 | 62.5 | 68 | 70 | 75 | 80 | 87.5} in NR3 format
The :TRIGger:LIN:SAMPlepoint command sets the point during the bit time
where the bit level is sampled to determine whether the bit is dominant or
recessive. The sample point represents the percentage of time between the
beginning of the bit time to the end of the bit time.
NOTE
Query Syntax
The sample point values are not limited by the baud rate.
:TRIGger:LIN:SAMPlepoint?
<value><NL>
<value> ::= {60 | 62.5 | 68 | 70 | 75 | 80 | 87.5} in NR3 format
See Also
407
Commands by Subsystem
:TRIGger:LIN:SIGNal:BAUDrate
(see page 586)
Command Syntax
:TRIGger:LIN:SIGNal:BAUDrate <baudrate>
<baudrate> ::= integer in NR1 format
<baudrate> ::= {2400 | 9600 | 19200}
:TRIGger:LIN:SIGNal:BAUDrate?
<baudrate><NL>
<baudrate> ::= integer = {2400 | 9600 | 19200}
See Also
408
Commands by Subsystem
:TRIGger:LIN:SOURce
(see page 586)
Command Syntax
:TRIGger:LIN:SOURce <source>
<source> ::= {CHANnel<n> | EXTernal} for the DSO models
<source> ::= {CHANnel<n> | DIGital0,..,DIGital15} for the MSO models
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The :TRIGger:LIN:SOURce command sets the source for the LIN signal.
Query Syntax
:TRIGger:LIN:SOURce?
The :TRIGger:LIN:SOURce? query returns the current source for the LIN
signal.
Return Format
See Also
<source><NL>
409
Commands by Subsystem
:TRIGger:LIN:STANdard
(see page 586)
Command Syntax
:TRIGger:LIN:STANdard <std>
<std> ::= {LIN13 | LIN20}
:TRIGger:LIN:STANdard?
<std><NL>
<std> ::= {LIN13 | LIN20}
See Also
410
Commands by Subsystem
:TRIGger:LIN:SYNCbreak
(see page 586)
Command Syntax
:TRIGger:LIN:SYNCbreak <value>
<value> ::= integer = {11 | 12 | 13}
:TRIGger:LIN:SYNCbreak?
<value><NL>
<value> ::= {11 | 12 | 13}
See Also
411
Commands by Subsystem
:TRIGger:LIN:TRIGger
(see page 586)
Command Syntax
:TRIGger:LIN:TRIGger <condition>
<condition> ::= {SYNCbreak | ID}
NOTE
Query Syntax
The ID option is available when the automotive CAN and LIN serial decode option (Option
AMS) has been licensed.
:TRIGger:LIN:TRIGger?
<condition><NL>
<condition> ::= {SYNC | ID}
Errors
See Also
412
Commands by Subsystem
:TRIGger:SPI Commands
Table 63 :TRIGger:SPI Commands Summary
Command
Query
:TRIGger:SPI:CLOCk:SL
OPe <slope> (see
page 414)
:TRIGger:SPI:CLOCk:SL
OPe? (see page 414)
:TRIGger:SPI:CLOCk:TI
Meout <time_value>
(see page 415)
:TRIGger:SPI:CLOCk:TI
Meout? (see page 415)
:TRIGger:SPI:FRAMing
<value> (see
page 416)
:TRIGger:SPI:FRAMing?
(see page 416)
:TRIGger:SPI:PATTern:
DATA <value>, <mask>
(see page 417)
:TRIGger:SPI:PATTern:
DATA? (see page 417)
:TRIGger:SPI:PATTern:
WIDTh <width> (see
page 418)
:TRIGger:SPI:PATTern:
WIDTh? (see page 418)
:TRIGger:SPI:SOURce:C
LOCk <source> (see
page 419)
:TRIGger:SPI:SOURce:C
LOCk? (see page 419)
:TRIGger:SPI:SOURce:D
ATA <source> (see
page 420)
:TRIGger:SPI:SOURce:D
ATA? (see page 420)
:TRIGger:SPI:SOURce:F
RAMe <source> (see
page 421)
:TRIGger:SPI:SOURce:F
RAMe? (see page 421)
413
Commands by Subsystem
:TRIGger:SPI:CLOCk:SLOPe
(see page 586)
Command Syntax
:TRIGger:SPI:CLOCk:SLOPe <slope>
<slope> ::= {NEGative | POSitive}
:TRIGger:SPI:CLOCk:SLOPe?
<slope><NL>
<slope> ::= {NEG | POS}
See Also
414
Commands by Subsystem
:TRIGger:SPI:CLOCk:TIMeout
(see page 586)
Command Syntax
:TRIGger:SPI:CLOCk:TIMeout <time_value>
<time_value> ::= time in seconds in NR1 format
:TRIGger:SPI:CLOCk:TIMeout?
<time value><NL>
<time_value> ::= time in seconds in NR1 format
See Also
415
Commands by Subsystem
:TRIGger:SPI:FRAMing
(see page 586)
Command Syntax
:TRIGger:SPI:FRAMing <value>
<value> ::= {CHIPselect | NOTChipselect | TIMeout}
:TRIGger:SPI:FRAMing?
<value><NL>
<value> ::= {CHIPselect | NOTChipselect | TIMeout}
See Also
416
Commands by Subsystem
:TRIGger:SPI:PATTern:DATA
(see page 586)
Command Syntax
:TRIGger:SPI:PATTern:DATA <value>,<mask>
<value> ::= integer or <string>
<mask> ::= integer or <string>
<string> ::= "0xnnnnnn" where n ::= {0,..,9 | A,..,F}
:TRIGger:SPI:PATTern:DATA?
<value>, <mask><NL>
417
Commands by Subsystem
:TRIGger:SPI:PATTern:WIDTh
(see page 586)
Command Syntax
:TRIGger:SPI:PATTern:WIDTh <width>
<width> ::= integer from 4 to 32 in NR1 format
:TRIGger:SPI:PATTern:WIDTh?
<width><NL>
<width> ::= integer from 4 to 32 in NR1 format
See Also
418
Commands by Subsystem
:TRIGger:SPI:SOURce:CLOCk
(see page 586)
Command Syntax
:TRIGger:SPI:SOURce:CLOCk <source>
<source> ::= {CHANnel<n> | EXTernal} for the DSO models
<source> ::= {CHANnel<n> | DIGital0,..,DIGital15} for the MSO models
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:TRIGger:SPI:SOURce:CLOCk?
<source><NL>
419
Commands by Subsystem
:TRIGger:SPI:SOURce:DATA
(see page 586)
Command Syntax
:TRIGger:SPI:SOURce:DATA <source>
<source> ::= {CHANnel<n> | EXTernal} for the DSO models
<source> ::= {CHANnel<n> | DIGital0,..,DIGital15} for the MSO models
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
The :TRIGger:SPI:SOURce:DATA command sets the source for the SPI serial
data.
Query Syntax
:TRIGger:SPI:SOURce:DATA?
<source><NL>
420
Commands by Subsystem
:TRIGger:SPI:SOURce:FRAMe
(see page 586)
Command Syntax
:TRIGger:SPI:SOURce:FRAMe <source>
<source> ::= {CHANnel<n> | EXTernal} for the DSO models
<source> ::= {CHANnel<n> | DIGital0,..,DIGital15} for the MSO models
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:TRIGger:SPI:SOURce:FRAMe?
<source><NL>
421
Commands by Subsystem
:TRIGger:TV Commands
Table 64 :TRIGger:TV Commands Summary
Command
Query
:TRIGger:TV:LINE
<line number> (see
page 423)
:TRIGger:TV:LINE?
(see page 423)
:TRIGger:TV:MODE <tv
mode> (see page 424)
:TRIGger:TV:MODE?
(see page 424)
:TRIGger:TV:POLarity
<polarity> (see
page 425)
:TRIGger:TV:POLarity?
(see page 425)
:TRIGger:TV:SOURce
<source> (see
page 426)
:TRIGger:TV:SOURce?
(see page 426)
:TRIGger:TV:STANdard
<standard> (see
page 427)
:TRIGger:TV:STANdard?
(see page 427)
422
Commands by Subsystem
:TRIGger:TV:LINE
(see page 586)
Command Syntax
:TRIGger:TV:LINE <line_number>
<line_number> ::= integer in NR1 format
Mode
LINE
Query Syntax
LFIeld1
LFIeld2
LALTernate
NTSC
1 to 263
1 to 262
1 to 262
PAL
1 to 313
314 to 625
1 to 312
PAL-M
1 to 263
264 to 525
1 to 262
SECAM
1 to 313
314 to 625
1 to 312
GENERIC
1 to 1024
1 to 1024
P480L60HZ
1 to 525
P720L60HZ
1 to 750
P1080L24HZ
1 to 1125
P1080L25HZ
1 to 1125
I1080L50HZ
1 to 1125
I1080L60HZ
1 to 1125
VERTical
1 to 1024
:TRIGger:TV:LINE?
<line_number><NL>
<line_number>::= integer in NR1 format
See Also
423
Commands by Subsystem
:TRIGger:TV:MODE
(see page 586)
Command Syntax
:TRIGger:TV:MODE <mode>
<mode> ::= {FIEld1 | FIEld2 | AFIelds | ALINes | LINE | VERTical
| LFIeld1 | LFIeld2 | LALTernate | LVERtical}
Query Syntax
<mode>
FIEld1
F1
FIEld2
F2
AFIelds
ALLFields, ALLFLDS
ALINes
ALLLines
LFIeld1
LINEF1, LINEFIELD1
LFIeld2
LINEF2, LINEFIELD2
LALTernate
LINEAlt
LVERtical
LINEVert
:TRIGger:TV:MODE?
<value><NL>
<value> ::= {FIE1 | FIE2 | AFI | ALIN | LINE | VERT | LFI1 | LFI2
| LALT | LVER}
See Also
424
Commands by Subsystem
:TRIGger:TV:POLarity
(see page 586)
Command Syntax
:TRIGger:TV:POLarity <polarity>
<polarity> ::= {POSitive | NEGative}
:TRIGger:TV:POLarity?
<polarity><NL>
<polarity> ::= {POS | NEG}
See Also
425
Commands by Subsystem
:TRIGger:TV:SOURce
(see page 586)
Command Syntax
:TRIGger:TV:SOURce <source>
<source> ::= {CHANnel<n>}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:TRIGger:TV:SOURce?
<source><NL>
<source> ::= {CHAN<n>}
See Also
Example Code
426
Commands by Subsystem
:TRIGger:TV:STANdard
(see page 586)
Command Syntax
:TRIGger:TV:STANdard <standard>
<standard> ::= {GENeric | NTSC | PALM
| {P480L60HZ | P480} |
| {P1080L24HZ | P1080}
| {I1080L50HZ | I1080}
| PAL | SECam
{P720L60HZ | P720}
| P1080L25HZ
| I1080L60HZ}
:TRIGger:TV:STANdard?
<standard><NL>
<standard> ::= {GEN | NTSC | PALM | PAL | SEC | P480L60HZ | P760L60HZ
| P1080L24HZ | P1080L25HZ | I1080L50HZ | I1080L60HZ}
427
Commands by Subsystem
:TRIGger:UART Commands
Table 66 :TRIGger:UART Commands Summary
Command
Query
:TRIGger:UART:BAUDrat
e <baudrate> (see
page 430)
:TRIGger:UART:BAUDrat
e? (see page 430)
:TRIGger:UART:BITorde
r <bitorder> (see
page 431)
:TRIGger:UART:BITorde
r? (see page 431)
:TRIGger:UART:BURSt
<value> (see
page 432)
:TRIGger:UART:BURSt?
(see page 432)
:TRIGger:UART:DATA
<value> (see
page 433)
:TRIGger:UART:DATA?
(see page 433)
:TRIGger:UART:IDLE
<time_value> (see
page 434)
:TRIGger:UART:IDLE?
(see page 434)
:TRIGger:UART:PARity
<parity> (see
page 435)
:TRIGger:UART:PARity?
(see page 435)
:TRIGger:UART:POLarit
y <polarity> (see
page 436)
:TRIGger:UART:POLarit
y? (see page 436)
:TRIGger:UART:QUALifi
er <value> (see
page 437)
:TRIGger:UART:QUALifi
er? (see page 437)
:TRIGger:UART:SOURce:
RX <source> (see
page 438)
:TRIGger:UART:SOURce:
RX? (see page 438)
428
Commands by Subsystem
Query
:TRIGger:UART:SOURce:
TX <source> (see
page 439)
:TRIGger:UART:SOURce:
TX? (see page 439)
:TRIGger:UART:TYPE
<value> (see
page 440)
:TRIGger:UART:TYPE?
(see page 440)
<value> ::=
RDATa | RD1
PARityerror
TDATa | TD1
:TRIGger:UART:WIDTh
<width> (see
page 441)
:TRIGger:UART:WIDTh?
(see page 441)
<width> ::= {5 | 6 | 7 | 8 | 9}
{RSTArt | RSTOp |
| RD0 | RDX |
| TSTArt | TSTOp |
| TD0 | TDX}
429
Commands by Subsystem
:TRIGger:UART:BAUDrate
(see page 586)
Command Syntax
:TRIGger:UART:BAUDrate <baudrate>
<baudrate> ::= integer in NR1 format
<baudrate> ::= {1200 | 1800 | 2000 | 2400 | 3600 | 4800 | 7200 | 9600
| 14400 | 15200 | 19200 | 28800 | 38400 | 56000 | 57600
| 76800 | 115200 | 128000 | 230400 | 460800 | 921600
| 1382400 | 1843200 | 2764800}
The :TRIGger:UART:BAUDrate command selects the bit rate (in bps) for the
serial decoder and/or trigger when in UART mode.
If the baud rate you select does not match the system baud rate, false
triggers may occur.
Query Syntax
:TRIGger:UART:BAUDrate?
<baudrate><NL>
<baudrate> ::= integer in NR1 format
<baudrate> ::= {1200 | 1800 | 2000 | 2400 | 3600 | 4800 | 7200 | 9600
| 14400 | 15200 | 19200 | 28800 | 38400 | 56000 | 57600
| 76800 | 115200 | 128000 | 230400 | 460800 | 921600
| 1382400 | 1843200 | 2764800}
See Also
430
Commands by Subsystem
:TRIGger:UART:BITorder
(see page 586)
Command Syntax
:TRIGger:UART:BITorder <bitorder>
<bitorder> ::= {LSBFirst | MSBFirst}
:TRIGger:UART:BITorder?
<bitorder><NL>
<bitorder> ::= {LSBF | MSBF}
See Also
431
Commands by Subsystem
:TRIGger:UART:BURSt
(see page 586)
Command Syntax
:TRIGger:UART:BURSt <value>
<value> ::= {OFF | 1 to 4096 in NR1 format}
:TRIGger:UART:BURSt?
<value><NL>
<value> ::= {OFF | 1 to 4096 in NR1 format}
See Also
432
Commands by Subsystem
:TRIGger:UART:DATA
(see page 586)
Command Syntax
:TRIGger:UART:DATA <value>
<value> ::= 8-bit integer in decimal or <nondecimal> from 0-255
(0x00-0xff)
<nondecimal> ::= #Hnn where n ::= {0,..,9 | A,..,F} for hexadecimal
<nondecimal> ::= #Bnn...n where n ::= {0 | 1} for binary
:TRIGger:UART:DATA?
<value><NL>
<value> ::= 8-bit integer in decimal from 0-255
See Also
433
Commands by Subsystem
:TRIGger:UART:IDLE
(see page 586)
Command Syntax
:TRIGger:UART:IDLE <time_value>
<time_value> ::= time from 1 us to 10 s in NR3 format
The :TRIGger:UART:IDLE command selects the value of the idle period for
burst trigger in the range from 1 us to 10 s when in UART mode.
Query Syntax
:TRIGger:UART:IDLE?
<time_value><NL>
<time_value> ::= time from 1 us to 10 s in NR3 format
See Also
434
Commands by Subsystem
:TRIGger:UART:PARity
(see page 586)
Command Syntax
:TRIGger:UART:PARity <parity>
<parity> ::= {EVEN | ODD | NONE}
:TRIGger:UART:PARity?
<parity><NL>
<parity> ::= {EVEN | ODD | NONE}
See Also
435
Commands by Subsystem
:TRIGger:UART:POLarity
(see page 586)
Command Syntax
:TRIGger:UART:POLarity <polarity>
<polarity> ::= {HIGH | LOW}
:TRIGger:UART:POLarity?
<polarity><NL>
<polarity> ::= {HIGH | LOW}
See Also
436
Commands by Subsystem
:TRIGger:UART:QUALifier
(see page 586)
Command Syntax
:TRIGger:UART:QUALifier <value>
<value> ::= {EQUal | NOTequal | GREaterthan | LESSthan}
:TRIGger:UART:QUALifier?
<value><NL>
<value> ::= {EQU | NOT | GRE | LESS}
See Also
437
Commands by Subsystem
:TRIGger:UART:SOURce:RX
(see page 586)
Command Syntax
:TRIGger:UART:SOURce:RX <source>
<source> ::= {CHANnel<n> | EXTernal} for the DSO models
<source> ::= {CHANnel<n> | DIGital0,..,DIGital15} for the MSO models
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:TRIGger:UART:SOURce:RX?
<source><NL>
438
Commands by Subsystem
:TRIGger:UART:SOURce:TX
(see page 586)
Command Syntax
:TRIGger:UART:SOURce:TX <source>
<source> ::= {CHANnel<n> | EXTernal} for the DSO models
<source> ::= {CHANnel<n> | DIGital0,..,DIGital15} for the MSO models
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:TRIGger:UART:SOURce:TX?
<source><NL>
439
Commands by Subsystem
:TRIGger:UART:TYPE
(see page 586)
Command Syntax
:TRIGger:UART:TYPE <value>
<value> ::= {RSTArt | RSTOp | RDATa | RD1 | RD0 | RDX | PARityerror
| TSTArt | TSTOp | TDATa | TD1 | TD0 | TDX}
:TRIGger:UART:TYPE?
<value><NL>
<value> ::= {RSTA | RSTO | RDAT | RD1 | RD0 | RDX | PAR | TSTA |
TSTO | TDAT | TD1 | TD0 | TDX}
See Also
440
Commands by Subsystem
:TRIGger:UART:WIDTh
(see page 586)
Command Syntax
:TRIGger:UART:WIDTh <width>
<width> ::= {5 | 6 | 7 | 8 | 9}
:TRIGger:UART:WIDTh?
<width><NL>
<width> ::= {5 | 6 | 7 | 8 | 9}
See Also
441
Commands by Subsystem
:WAVeform Commands
Provide access to waveform data. See "Introduction to :WAVeform
Commands" on page 444.
Table 67 :WAVeform Commands Summary
Command
Query
:WAVeform:BYTeorder
<value> (see
page 449)
:WAVeform:BYTeorder?
(see page 449)
n/a
:WAVeform:COUNt? (see
page 450)
n/a
:WAVeform:DATA? (see
page 451)
:WAVeform:FORMat
<value> (see
page 453)
:WAVeform:FORMat?
(see page 453)
:WAVeform:POINts
<# points> (see
page 454)
:WAVeform:POINts?
(see page 454)
:WAVeform:POINts:MODE
<points_mode> (see
page 456)
:WAVeform:POINts:MODE
? (see page 456)
442
Commands by Subsystem
Query
n/a
:WAVeform:PREamble?
(see page 458)
0
1
2
3
for
for
for
for
NORMal type
PEAK detect type
AVERage type
HRESolution type
:WAVeform:SEGMented:C
OUNt? (see page 461)
n/a
:WAVeform:SEGMented:T
TAG? (see page 462)
:WAVeform:SOURce
<source> (see
page 463)
:WAVeform:SOURce?
(see page 463)
:WAVeform:SOURce:SUBS
ource <subsource>
(see page 467)
:WAVeform:SOURce:SUBS
ource? (see page 467)
n/a
:WAVeform:TYPE? (see
page 468)
:WAVeform:UNSigned
{{0 | OFF} | {1 |
ON}} (see page 469)
:WAVeform:UNSigned?
(see page 469)
{0 | 1}
:WAVeform:VIEW <view>
(see page 470)
:WAVeform:VIEW? (see
page 470)
n/a
:WAVeform:XINCrement?
(see page 471)
443
Commands by Subsystem
Query
n/a
:WAVeform:XORigin?
(see page 472)
n/a
:WAVeform:XREFerence?
(see page 473)
<return_value> ::= 0
(x-reference value in the current
preamble in NR1 format)
n/a
:WAVeform:YINCrement?
(see page 474)
n/a
:WAVeform:YORigin?
(see page 475)
n/a
:WAVeform:YREFerence?
(see page 476)
Introduction to
:WAVeform
Commands
444
Commands by Subsystem
Once you have acquired data with the :DIGitize command, the instrument
is stopped. If the instrument is restarted (via the programming interface
or the front panel), or if any instrument setting is changed, the data
acquired with the :DIGitize command may be overwritten.You should first
acquire the data with the :DIGitize command, then immediately read the
data with the :WAVeform:DATA? query (see page 451) before changing any
instrument setup.
A waveform record consists of either all of the acquired points or a subset
of the acquired points. The number of points acquired may be queried
using :ACQuire:POINts? (see page 160).
Helpful Hints:
The number of points transferred to the computer is controlled using the
:WAVeform:POINts command (see page 454). If :WAVeform:POINts
MAXimum is specified and the instrument is not running (stopped), all of
the points that are displayed are transferred. This can be as many as
4,000,000 in some operating modes. Fewer points may be specified to
speed data transfers and minimize controller analysis time. The
:WAVeform:POINts may be varied even after data on a channel is acquired.
However, this decimation may result in lost pulses and transitions. The
number of points selected for transfer using :WAVeform:POINts must be an
even divisor of 1,000 or be set to MAXimum. :WAVeform:POINts determines
the increment between time buckets that will be transferred. If POINts =
MAXimum, the data cannot be decimated. For example:
:WAVeform:POINts 1000 returns time buckets 0, 1, 2, 3, 4 ,.., 999.
:WAVeform:POINts 500 returns time buckets 0, 2, 4, 6, 8 ,.., 998.
:WAVeform:POINts 250 returns time buckets 0, 4, 8, 12, 16 ,.., 996.
:WAVeform:POINts 100 returns time buckets 0, 10, 20, 30, 40 ,..,
990.
Analog Channel Data
NORMal Data
Normal data consists of the last data point (hit) in each time bucket. This
data is transmitted over the programming interface in a linear fashion
starting with time bucket 0 and going through time bucket n - 1, where n
is the number returned by the :WAVeform:POINts? query (see page 454).
Only the magnitude values of each data point are transmitted. The first
voltage value corresponds to the first time bucket on the left side of the
screen and the last value corresponds to the next- to- last time bucket on
the right side of the screen. Time buckets without data return 0. The time
values for each data point correspond to the position of the data point in
the data array. These time values are not transmitted.
445
Commands by Subsystem
AVERage Data
AVERage data consists of the average of the first n hits in a time bucket,
where n is the value returned by the :ACQuire:COUNt query (see
page 157). Time buckets that have fewer than n hits return the average of
the data they do have. If a time bucket does not have any data in it, it
returns 0.
This data is transmitted over the interface linearly, starting with time
bucket 0 and proceeding through time bucket n- 1, where n is the number
returned by the :WAVeform:POINts? query (see page 454). The first value
corresponds to a point at the left side of the screen and the last value
corresponds to one point away from the right side of the screen. The
maximum number of points that can be returned in average mode is 1000
unless ACQuire:COUNt has been set to 1.
PEAK Data
Peak detect display mode is used to detect glitches for time base settings
of 500 us/div and slower. In this mode, the oscilloscope can sample more
data than it can store and display. So, when peak detect is turned on, the
oscilloscope scans through the extra data, picks up the minimum and
maximum for each time bucket, then stores the data in an array. Each
time bucket contains two data sample.
The array is transmitted over the interface bus linearly, starting with time
bucket 0 proceeding through time bucket n- 1, where n is the number
returned by the :WAVeform:POINts? query (see page 454). In each time
bucket, two values are transmitted, first the minimum, followed by the
maximum. The first pair of values corresponds to the time bucket at the
leftmost side of the screen. The last pair of values corresponds to the time
bucket at the far right side of the screen. In :ACQuire:TYPE PEAK mode
(see page 165), the value returned by the :WAVeform:XINCrement query
(see page 471) should be doubled to find the time difference between the
min- max pairs.
HRESolution Data
The high resolution (smoothing) mode is used to reduce noise at slower
sweep speeds where the digitizer samples faster than needed to fill
memory for the displayed time range.
Data Conversion
Word or byte data sent from the oscilloscope must be scaled for useful
interpretation. The values used to interpret the data are the X and Y
references, X and Y origins, and X and Y increments. These values are
read from the waveform preamble. Each channel has its own waveform
preamble.
In converting a data value to a voltage value, the following formula is
used:
446
Commands by Subsystem
447
Commands by Subsystem
448
Commands by Subsystem
:WAVeform:BYTeorder
(see page 586)
Command Syntax
:WAVeform:BYTeorder <value>
<value> ::= {LSBFirst | MSBFirst}
:WAVeform:BYTeorder?
<value><NL>
<value> ::= {LSBF | MSBF}
See Also
Example Code
449
Commands by Subsystem
:WAVeform:COUNt
(see page 586)
Query Syntax
:WAVeform:COUNt?
<count_argument><NL>
<count_argument> ::= an integer from 1 to 65536 in NR1 format
See Also
450
Commands by Subsystem
:WAVeform:DATA
(see page 586)
Query Syntax
:WAVeform:DATA?
Example Code
451
Commands by Subsystem
'
'
<header><waveform_data><NL>
'
' Where:
'
<header> = #800001000 (This is an example header)
' The "#8" may be stripped off of the header and the remaining
' numbers are the size, in bytes, of the waveform data block. The
' size can vary depending on the number of points acquired for the
' waveform. You can then read that number of bytes from the
' oscilloscope and the terminating NL character.
'
Dim lngI As Long
Dim lngDataValue As Long
varQueryResult = myScope.ReadIEEEBlock(BinaryType_UI1)
' Unsigned integer bytes.
For lngI = 0 To UBound(varQueryResult) _
Step (UBound(varQueryResult) / 20)
' 20 points.
If intBytesPerData = 2 Then
lngDataValue = varQueryResult(lngI) * 256 _
+ varQueryResult(lngI + 1)
' 16-bit value.
Else
lngDataValue = varQueryResult(lngI)
' 8-bit value.
End If
strOutput = strOutput + "Data point " + _
CStr(lngI / intBytesPerData) + ", " + _
FormatNumber((lngDataValue - lngYReference) _
* sngYIncrement + sngYOrigin) + " V, " + _
FormatNumber(((lngI / intBytesPerData - lngXReference) _
* sngXIncrement + dblXOrigin) * 1000000) + " us" + vbCrLf
Next lngI
MsgBox "Waveform data:" + vbCrLf + strOutput
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
452
Commands by Subsystem
:WAVeform:FORMat
(see page 586)
Command Syntax
:WAVeform:FORMat <value>
<value> ::= {WORD | BYTE | ASCii}
:WAVeform:FORMat?
The :WAVeform:FORMat query returns the current output format for the
transfer of waveform data.
Return Format
<value><NL>
<value> ::= {WORD | BYTE | ASC}
See Also
Example Code
453
Commands by Subsystem
:WAVeform:POINts
(see page 586)
Command Syntax
NOTE
:WAVeform:POINts?
454
<# points><NL>
Commands by Subsystem
NOTE
See Also
If a full screen of data is not displayed, the number of points returned will not be 1000 or an
even divisor of it.
Example Code
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
455
Commands by Subsystem
:WAVeform:POINts:MODE
(see page 586)
Command Syntax
:WAVeform:POINts:MODE <points_mode>
<points_mode> ::= {NORMal | MAXimum | RAW}
Query Syntax
456
:WAVeform:POINts:MODE?
Commands by Subsystem
<points_mode><NL>
<points_mode> ::= {NORMal | MAXimum | RAW}
See Also
457
Commands by Subsystem
:WAVeform:PREamble
(see page 586)
Query Syntax
:WAVeform:PREamble?
<preamble_block><NL>
<preamble_block> ::= <format 16-bit NR1>,
<type 16-bit NR1>,
<points 32-bit NR1>,
<count 32-bit NR1>,
<xincrement 64-bit floating point NR3>,
<xorigin 64-bit floating point NR3>,
<xreference 32-bit NR1>,
<yincrement 32-bit floating point NR3>,
<yorigin 32-bit floating point NR3>,
<yreference 32-bit NR1>
<format> ::= 0 for BYTE format, 1 for WORD format, 4 for ASCii format;
an integer in NR1 format (format set by :WAVeform:FORMat).
<type> ::= 2 for AVERage type, 0 for NORMal type, 1 for PEAK detect
type; an integer in NR1 format (type set by :ACQuire:TYPE).
<count> ::= Average count or 1 if PEAK or NORMal; an integer in NR1
format (count set by :ACQuire:COUNt).
458
Commands by Subsystem
<LQFUHPHQW
YROWDJHRI9VWHS
<RULJLQ9
2IIVHW
<UHIHUHQFH 9VWHSV
9VWHSV
LIIRUPDW :25'
LIIRUPDW %<7(
;RULJLQW
;UHIHUHQFH
;LQFUHPHQWW WLPHEHWZHHQVXFFHVVLYHSRLQWV
See Also
Example Code
459
Commands by Subsystem
'
'
'
'
'
'
'
'
'
'
'
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
TYPE
POINTS
COUNT
XINCREMENT
XORIGIN
XREFERENCE
YINCREMENT
YORIGIN
YREFERENCE
:
:
:
:
:
:
Preamble()
intFormat As Integer
intType As Integer
lngPoints As Long
lngCount As Long
dblXIncrement As Double
dblXOrigin As Double
lngXReference As Long
sngYIncrement As Single
sngYOrigin As Single
lngYReference As Long
strOutput As String
myScope.WriteString ":WAVEFORM:PREAMBLE?"
' Query for the preamble.
Preamble() = myScope.ReadList
' Read preamble information.
intFormat = Preamble(0)
intType = Preamble(1)
lngPoints = Preamble(2)
lngCount = Preamble(3)
dblXIncrement = Preamble(4)
dblXOrigin = Preamble(5)
lngXReference = Preamble(6)
sngYIncrement = Preamble(7)
sngYOrigin = Preamble(8)
lngYReference = Preamble(9)
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
460
Commands by Subsystem
:WAVeform:SEGMented:COUNt
(see page 586)
Query Syntax
NOTE
:WAVeform:SEGMented:COUNt?
This command is available when the segmented memory option (Option SGM) is enabled.
Example Code
461
Commands by Subsystem
:WAVeform:SEGMented:TTAG
(see page 586)
Query Syntax
NOTE
:WAVeform:SEGMented:TTAG?
This command is available when the segmented memory option (Option SGM) is enabled.
Example Code
462
Commands by Subsystem
:WAVeform:SOURce
(see page 586)
Command Syntax
:WAVeform:SOURce <source>
<source> ::= {CHANnel<n> | FUNCtion | MATH | SBUS}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
:WAVeform:SOURce?
NOTE
Return Format
MATH is an alias for FUNCtion. The :WAVeform:SOURce? query returns FUNC if the source
is FUNCtion or MATH.
<source><NL>
<source> ::= {CHAN<n> | FUNC | SBUS}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
See Also
Example Code
463
Commands by Subsystem
464
Commands by Subsystem
lngXReference = Preamble(6)
sngYIncrement = Preamble(7)
sngYOrigin = Preamble(8)
lngYReference = Preamble(9)
strOutput = ""
'strOutput = strOutput + "Format = " + CStr(intFormat) + vbCrLf
'strOutput = strOutput + "Type = " + CStr(intType) + vbCrLf
'strOutput = strOutput + "Points = " + CStr(lngPoints) + vbCrLf
'strOutput = strOutput + "Count = " + CStr(lngCount) + vbCrLf
'strOutput = strOutput + "X increment = " + _
'
FormatNumber(dblXIncrement * 1000000) + " us" + vbCrLf
'strOutput = strOutput + "X origin = " + _
'
FormatNumber(dblXOrigin * 1000000) + " us" + vbCrLf
'strOutput = strOutput + "X reference = " + _
'
CStr(lngXReference) + vbCrLf
'strOutput = strOutput + "Y increment = " + _
'
FormatNumber(sngYIncrement * 1000) + " mV" + vbCrLf
'strOutput = strOutput + "Y origin = " + _
'
FormatNumber(sngYOrigin) + " V" + vbCrLf
'strOutput = strOutput + "Y reference = " + _
'
CStr(lngYReference) + vbCrLf
strOutput = strOutput + "Volts/Div = " + _
FormatNumber(lngVSteps * sngYIncrement / 8) + _
" V" + vbCrLf
strOutput = strOutput + "Offset = " + _
FormatNumber((lngVSteps / 2 - lngYReference) * _
sngYIncrement + sngYOrigin) + " V" + vbCrLf
strOutput = strOutput + "Sec/Div = " + _
FormatNumber(lngPoints * dblXIncrement / 10 * _
1000000) + " us" + vbCrLf
strOutput = strOutput + "Delay = " + _
FormatNumber(((lngPoints / 2 - lngXReference) * _
dblXIncrement + dblXOrigin) * 1000000) + " us" + vbCrLf
' QUERY_WAVE_DATA - Outputs waveform data that is stored in a buffer.
' Query the oscilloscope for the waveform data.
myScope.WriteString ":WAV:DATA?"
' READ_WAVE_DATA - The wave data consists of two parts: the header,
' and the actual waveform data followed by a new line (NL) character.
' The query data has the following format:
'
'
<header><waveform_data><NL>
'
' Where:
'
<header> = #800001000 (This is an example header)
' The "#8" may be stripped off of the header and the remaining
' numbers are the size, in bytes, of the waveform data block. The
' size can vary depending on the number of points acquired for the
' waveform. You can then read that number of bytes from the
' oscilloscope and the terminating NL character.
'
Dim lngI As Long
Dim lngDataValue As Long
' Unsigned integer bytes.
465
Commands by Subsystem
varQueryResult = myScope.ReadIEEEBlock(BinaryType_UI1)
For lngI = 0 To UBound(varQueryResult) _
Step (UBound(varQueryResult) / 20)
' 20 points.
If intBytesPerData = 2 Then
lngDataValue = varQueryResult(lngI) * 256 _
+ varQueryResult(lngI + 1)
' 16-bit value.
Else
lngDataValue = varQueryResult(lngI)
' 8-bit value.
End If
strOutput = strOutput + "Data point " + _
CStr(lngI / intBytesPerData) + ", " + _
FormatNumber((lngDataValue - lngYReference) _
* sngYIncrement + sngYOrigin) + " V, " + _
FormatNumber(((lngI / intBytesPerData - lngXReference) _
* sngXIncrement + dblXOrigin) * 1000000) + " us" + vbCrLf
Next lngI
MsgBox "Waveform data:" + vbCrLf + strOutput
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
466
Commands by Subsystem
:WAVeform:SOURce:SUBSource
(see page 586)
Command Syntax
:WAVeform:SOURce:SUBSource <subsource>
<subsource> ::= {{NONE | RX} | TX}
If the :WAVeform:SOURce is SBUS (serial decode), more than one data set
may be available, and this command lets you choose from the available
data sets.
Currently, only UART serial decode lets you get "TX" data. The default,
NONE, specifies "RX" data. (RX is an alias for NONE.)
If the :WAVeform:SOURce is not SBUS, or the :SBUS:MODE is not UART,
the only valid subsource is NONE.
Query Syntax
:WAVeform:SOURce:SUBSource?
<subsource><NL>
<subsource> ::= {NONE | TX}
See Also
467
Commands by Subsystem
:WAVeform:TYPE
(see page 586)
Query Syntax
:WAVeform:TYPE?
<mode><NL>
<mode> ::= {NORM | PEAK | AVER | HRES}
See Also
468
Commands by Subsystem
:WAVeform:UNSigned
(see page 586)
Command Syntax
:WAVeform:UNSigned <unsigned>
<unsigned> ::= {{0 | OFF} | {1 | ON}}
:WAVeform:UNSigned?
<unsigned><NL>
<unsigned> ::= {0 | 1}
See Also
469
Commands by Subsystem
:WAVeform:VIEW
(see page 586)
Command Syntax
:WAVeform:VIEW <view>
<view> ::= {MAIN}
The :WAVeform:VIEW command sets the view setting associated with the
currently selected waveform. Currently, the only legal value for the view
setting is MAIN.
Query Syntax
:WAVeform:VIEW?
The :WAVeform:VIEW? query returns the view setting associated with the
currently selected waveform.
Return Format
<view><NL>
<view> ::= {MAIN}
See Also
470
Commands by Subsystem
:WAVeform:XINCrement
(see page 586)
Query Syntax
:WAVeform:XINCrement?
<value><NL>
<value> ::= x-increment in the current preamble in 64-bit
floating point NR3 format
See Also
Example Code
471
Commands by Subsystem
:WAVeform:XORigin
(see page 586)
Query Syntax
:WAVeform:XORigin?
The :WAVeform:XORigin? query returns the x- origin value for the currently
specified source. XORigin is the X- axis value of the data point specified by
the :WAVeform:XREFerence value. In this product, that is always the
X- axis value of the first data point (XREFerence = 0).
Return Format
<value><NL>
<value> ::= x-origin value in the current preamble in 64-bit
floating point NR3 format
See Also
Example Code
472
Commands by Subsystem
:WAVeform:XREFerence
(see page 586)
Query Syntax
:WAVeform:XREFerence?
<value><NL>
<value> ::= x-reference value = 0 in 32-bit NR1 format
See Also
Example Code
473
Commands by Subsystem
:WAVeform:YINCrement
(see page 586)
Query Syntax
:WAVeform:YINCrement?
<value><NL>
<value> ::= y-increment value in the current preamble in 32-bit
floating point NR3 format
See Also
Example Code
474
Commands by Subsystem
:WAVeform:YORigin
(see page 586)
Query Syntax
:WAVeform:YORigin?
The :WAVeform:YORigin? query returns the y- origin value for the currently
specified source. This value is the Y- axis value of the data value specified
by the :WAVeform:YREFerence value. For this product, this is the Y- axis
value of the center of the screen.
Return Format
<value><NL>
<value> ::= y-origin in the current preamble in 32-bit
floating point NR3 format
See Also
Example Code
475
Commands by Subsystem
:WAVeform:YREFerence
(see page 586)
Query Syntax
:WAVeform:YREFerence?
<value><NL>
<value> ::= y-reference value in the current preamble in 32-bit
NR1 format
See Also
Example Code
476
6
Commands A-Z
A 477
B 478
C 478
D 480
E 481
F 482
G 483
H 483
I 484
L 484
M 485
N 487
O 487
P 487
Q 489
R 489
S 490
T 493
U 496
V 497
W 498
X 498
Y 499
477
Commands A-Z
478
Commands A-Z
CAN Commands:
":SBUS:CAN:COUNt:ERRor" on page 318
":SBUS:CAN:COUNt:OVERload" on page 319
":SBUS:CAN:COUNt:RESet" on page 320
":SBUS:CAN:COUNt:TOTal" on page 321
":SBUS:CAN:COUNt:UTILization" on page 322
":TRIGger:CAN Commands" on page 365
":CDISplay" on page 125
CENTer, ":FUNCtion:CENTer" on page 217
":CHANnel:LABel" on page 506
":CHANnel2:SKEW" on page 507
":CHANnel<n>:BWLimit" on page 178
":CHANnel<n>:COUPling" on page 179
":CHANnel<n>:DISPlay" on page 180
":CHANnel<n>:IMPedance" on page 181
":CHANnel<n>:INPut" on page 508
":CHANnel<n>:INVert" on page 182
":CHANnel<n>:LABel" on page 183
":CHANnel<n>:OFFSet" on page 184
":CHANnel<n>:PMODe" on page 509
":CHANnel<n>:PROBe" on page 185
":CHANnel<n>:PROBe:ID" on page 186
":CHANnel<n>:PROBe:SKEW" on page 187
":CHANnel<n>:PROBe:STYPe" on page 188
":CHANnel<n>:PROTection" on page 189
":CHANnel<n>:RANGe" on page 190
":CHANnel<n>:SCALe" on page 191
":CHANnel<n>:UNITs" on page 192
":CHANnel<n>:VERNier" on page 193
CLEar Commands:
":DISPlay:CLEar" on page 196
":MEASure:CLEar" on page 259
CLOCk Commands:
":TRIGger:IIC:SOURce:CLOCk" on page 400
":TRIGger:SPI:CLOCk:SLOPe" on page 414
479
Commands A-Z
480
Commands A-Z
DATE Commands:
":CALibrate:DATE" on page 168
":SYSTem:DATE" on page 335
DEFine, ":MEASure:DEFine" on page 261
DELay Commands:
":MEASure:DELay" on page 264
":TIMebase:DELay" on page 539
DESTination, ":HARDcopy:DESTination" on page 516
DEVice, ":HARDcopy:DEVice" on page 517
":DIGitize" on page 126
DISPlay Commands:
":CHANnel<n>:DISPlay" on page 180
":FUNCtion:DISPlay" on page 218
":SBUS:DISPlay" on page 323
":DISPlay:CLEar" on page 196
":DISPlay:CONNect" on page 510
":DISPlay:DATA" on page 197
":DISPlay:LABel" on page 199
":DISPlay:LABList" on page 200
":DISPlay:PERSistence" on page 201
":DISPlay:SOURce" on page 202
":DISPlay:VECTors" on page 203
DSP, ":SYSTem:DSP" on page 336
DURation, ":TRIGger:DURation Commands" on page 376
DUTYcycle, ":MEASure:DUTYcycle" on page 266
E
481
Commands A-Z
FACTors Commands:
":HARDcopy:FACTors" on page 235
":SAVE:IMAGe:FACTors" on page 307
FALLtime, ":MEASure:FALLtime" on page 267
FFEed, ":HARDcopy:FFEed" on page 236
FILename Commands:
":HARDcopy:FILename" on page 518
":RECall:FILename" on page 298
":SAVE:FILename" on page 304
FORMat Commands:
":HARDcopy:FORMat" on page 519
":SAVE:IMAGe:FORMat" on page 308
":SAVE:WAVeform:FORMat" on page 314
":WAVeform:FORMat" on page 453
FRAMe, ":TRIGger:SPI:SOURce:FRAMe" on page 421
FRAMing Commands:
":SBUS:UART:FRAMing" on page 333
":TRIGger:SPI:FRAMing" on page 416
FREQuency, ":MEASure:FREQuency" on page 268
":FUNCtion:CENTer" on page 217
":FUNCtion:DISPlay" on page 218
":FUNCtion:GOFT:OPERation" on page 219
":FUNCtion:GOFT:SOURce1" on page 220
":FUNCtion:GOFT:SOURce2" on page 221
":FUNCtion:OFFSet" on page 222
":FUNCtion:OPERation" on page 223
":FUNCtion:RANGe" on page 224
482
Commands A-Z
483
Commands A-Z
ID Commands:
":TRIGger:CAN:PATTern:ID" on page 369
":TRIGger:CAN:PATTern:ID:MODE" on page 370
IDLE, ":TRIGger:UART:IDLE" on page 434
"*IDN (Identification Number)" on page 100
IIC Commands:
":SBUS:IIC:ASIZe" on page 324
":TRIGger:IIC Commands" on page 396
IGColors Commands:
":HARDcopy:IGColors" on page 521
":SAVE:IMAGe:INKSaver" on page 309
IMAGe Commands:
":RECall:IMAGe[:STARt]" on page 299
":SAVE:IMAGe:AREA" on page 306
":SAVE:IMAGe:FACTors" on page 307
":SAVE:IMAGe:FORMat" on page 308
":SAVE:IMAGe:INKSaver" on page 309
":SAVE:IMAGe:PALette" on page 310
":SAVE:IMAGe[:STARt]" on page 305
IMPedance Commands:
":CHANnel<n>:IMPedance" on page 181
":EXTernal:IMPedance" on page 207
INDex, ":ACQuire:SEGMented:INDex" on page 162
INKSaver, ":HARDcopy:INKSaver" on page 237
INVert, ":CHANnel<n>:INVert" on page 182
LABel Commands:
":CALibrate:LABel" on page 169
":CHANnel:LABel" on page 506
":CHANnel<n>:LABel" on page 183
":DISPlay:LABel" on page 199
LABList, ":DISPlay:LABList" on page 200
LENGth Commands:
":SAVE:WAVeform:LENGth" on page 315
":TRIGger:CAN:PATTern:DATA:LENGth" on page 368
LESSthan Commands:
484
Commands A-Z
485
Commands A-Z
486
Commands A-Z
OFFSet Commands:
":CHANnel<n>:OFFSet" on page 184
":FUNCtion:OFFSet" on page 222
"*OPC (Operation Complete)" on page 102
":OPEE (Operation Status Enable Register)" on page 135
OPERation Commands:
":FUNCtion:GOFT:OPERation" on page 219
":FUNCtion:OPERation" on page 223
":OPERegister:CONDition (Operation Status Condition Register)" on
page 137
":OPERegister[:EVENt] (Operation Status Event Register)" on page 139
"*OPT (Option Identification)" on page 103
OVERload, ":SBUS:CAN:COUNt:OVERload" on page 319
OVERshoot, ":MEASure:OVERshoot" on page 270
":OVLenable (Overload Event Enable Register)" on page 141
":OVLRegister (Overload Event Register)" on page 143
PALette Commands:
":HARDcopy:PALette" on page 238
":SAVE:IMAGe:PALette" on page 310
PARity Commands:
":SBUS:LIN:PARity" on page 325
":TRIGger:UART:PARity" on page 435
PATTern Commands:
":TRIGger:CAN:PATTern:DATA" on page 367
487
Commands A-Z
488
Commands A-Z
QUALifier Commands:
":TRIGger:DURation:QUALifier" on page 380
":TRIGger:GLITch:QUALifier" on page 393
":TRIGger:IIC:TRIGger:QUALifier" on page 402
":TRIGger:UART:QUALifier" on page 437
RANGe Commands:
":CHANnel<n>:RANGe" on page 190
":EXTernal:RANGe" on page 212
":FUNCtion:RANGe" on page 224
":TIMebase:RANGe" on page 347
":TIMebase:WINDow:RANGe" on page 352
":TRIGger:DURation:RANGe" on page 381
":TRIGger:GLITch:RANGe" on page 394
"*RCL (Recall)" on page 104
":RECall:FILename" on page 298
":RECall:IMAGe[:STARt]" on page 299
":RECall:PWD" on page 300
":RECall:SETup[:STARt]" on page 301
REFerence Commands:
":FUNCtion:REFerence" on page 225
":TIMebase:REFerence" on page 348
REJect, ":TRIGger[:EDGE]:REJect" on page 385
RESet Commands:
":SBUS:CAN:COUNt:RESet" on page 320
":SBUS:UART:COUNt:RESet" on page 330
RISetime, ":MEASure:RISetime" on page 276
489
Commands A-Z
SAMPlepoint Commands:
":TRIGger:CAN:SAMPlepoint" on page 371
":TRIGger:LIN:SAMPlepoint" on page 407
"*SAV (Save)" on page 108
":SAVE:FILename" on page 304
":SAVE:IMAGe:AREA" on page 306
":SAVE:IMAGe:FACTors" on page 307
":SAVE:IMAGe:FORMat" on page 308
":SAVE:IMAGe:INKSaver" on page 309
":SAVE:IMAGe:PALette" on page 310
":SAVE:IMAGe[:STARt]" on page 305
":SAVE:PWD" on page 311
":SAVE:SETup[:STARt]" on page 312
":SAVE:WAVeform:FORMat" on page 314
":SAVE:WAVeform:LENGth" on page 315
":SAVE:WAVeform[:STARt]" on page 313
":SBUS:CAN:COUNt:ERRor" on page 318
":SBUS:CAN:COUNt:OVERload" on page 319
":SBUS:CAN:COUNt:RESet" on page 320
":SBUS:CAN:COUNt:TOTal" on page 321
":SBUS:CAN:COUNt:UTILization" on page 322
":SBUS:DISPlay" on page 323
":SBUS:IIC:ASIZe" on page 324
":SBUS:LIN:PARity" on page 325
":SBUS:MODE" on page 326
":SBUS:SPI:WIDTh" on page 327
":SBUS:UART:BASE" on page 328
":SBUS:UART:COUNt:ERRor" on page 329
":SBUS:UART:COUNt:RESet" on page 330
":SBUS:UART:COUNt:RXFRames" on page 331
490
Commands A-Z
491
Commands A-Z
492
Commands A-Z
STATus Commands:
":CALibrate:STATus" on page 171
":STATus" on page 149
"*STB (Read Status Byte)" on page 111
":STOP" on page 150
SUBSource, ":WAVeform:SOURce:SUBSource" on page 467
SWEep, ":TRIGger:SWEep" on page 364
SWITch, ":CALibrate:SWITch" on page 172
SYNCbreak, ":TRIGger:LIN:SYNCbreak" on page 411
":SYSTem:DATE" on page 335
":SYSTem:DSP" on page 336
":SYSTem:ERRor" on page 337
":SYSTem:LOCK" on page 338
":SYSTem:SETup" on page 340
":SYSTem:TIME" on page 342
T
493
Commands A-Z
494
Commands A-Z
495
Commands A-Z
UART Commands:
":SBUS:UART:BASE" on page 328
":SBUS:UART:COUNt:ERRor" on page 329
":SBUS:UART:COUNt:RESet" on page 330
":SBUS:UART:COUNt:RXFRames" on page 331
":SBUS:UART:COUNt:TXFRames" on page 332
":SBUS:UART:FRAMing" on page 333
496
Commands A-Z
497
Commands A-Z
498
Commands A-Z
499
500
Commands A-Z
7
Obsolete and Discontinued Commands
ANALog<n>:BWLimit
:CHANnel<n>:BWLimit (see
page 178)
ANALog<n>:COUPling
:CHANnel<n>:COUPling (see
page 179)
ANALog<n>:INVert
:CHANnel<n>:INVert (see
page 182)
ANALog<n>:LABel
:CHANnel<n>:LABel (see
page 183)
ANALog<n>:OFFSet
:CHANnel<n>:OFFSet (see
page 184)
ANALog<n>:PROBe
:CHANnel<n>:PROBe (see
page 185)
ANALog<n>:PMODe
none
ANALog<n>:RANGe
:CHANnel<n>:RANGe (see
page 190)
:CHANnel:LABel (see
page 506)
:CHANnel<n>:LABel (see
page 183)
:CHANnel2:SKEW (see
page 507)
:CHANnel<n>:PROBe:SKEW
(see page 187)
:CHANnel<n>:INPut (see
page 508)
:CHANnel<n>:IMPedance
(see page 181)
:CHANnel<n>:PMODe (see
page 509)
none
:DISPlay:CONNect (see
page 510)
:DISPlay:VECTors (see
page 203)
Behavior Differences
501
502
Obsolete Command
Behavior Differences
:EXTernal:INPut (see
page 512)
:EXTernal:IMPedance (see
page 207)
:EXTernal:PMODe (see
page 513)
none
FUNCtion1, FUNCtion2
:FUNCtion:SOURce (see
page 514)
:FUNCtion:SOURce1 (see
page 227)
:FUNCtion:VIEW (see
page 515)
:FUNCtion:DISPlay (see
page 218)
:HARDcopy:DESTination (see
page 516)
:HARDcopy:FILename (see
page 518)
:HARDcopy:DEVice (see
page 517)
:HARDcopy:FORMat (see
page 519)
:HARDcopy:FILename (see
page 518)
:RECall:FILename (see
page 298)
:SAVE:FILename (see
page 298)
:HARDcopy:FORMat (see
page 519)
:HARDcopy:APRinter (see
page 234)
:SAVE:IMAGe:FORMat (see
page 308)
:SAVE:WAVeform:FORMat
(see page 314)
:HARDcopy:GRAYscale (see
page 520)
:HARDcopy:PALette (see
page 238)
:HARDcopy:IGColors (see
page 521)
:HARDcopy:INKSaver (see
page 237)
:HARDcopy:PDRiver (see
page 522)
:HARDcopy:APRinter (see
page 234)
:MEASure:LOWer (see
page 523)
:MEASure:DEFine:THResholds
(see page 261)
:MEASure:SCRatch (see
page 524)
:MEASure:CLEar (see
page 259)
:MEASure:TDELta (see
page 525)
:MARKer:XDELta (see
page 248)
MEASure:DEFine:THResholds
can define absolute values or
percentage
Obsolete Command
Behavior Differences
:MEASure:THResholds (see
page 526)
:MEASure:DEFine:THResholds
(see page 261)
MEASure:DEFine:THResholds
can define absolute values or
percentage
:MEASure:TMAX (see
page 527)
:MEASure:XMAX (see
page 295)
:MEASure:TMIN (see
page 528)
:MEASure:XMIN (see
page 296)
:MEASure:TSTArt (see
page 529)
:MARKer:X1Position (see
page 244)
:MEASure:TSTOp (see
page 530)
:MARKer:X2Position (see
page 246)
:MEASure:TVOLt (see
page 531)
:MEASure:TVALue (see
page 283)
:MEASure:UPPer (see
page 533)
:MEASure:DEFine:THResholds
(see page 261)
MEASure:DEFine:THResholds
can define absolute values or
percentage
:MEASure:VDELta (see
page 534)
:MARKer:YDELta (see
page 251)
:MEASure:VSTArt (see
page 535)
:MARKer:Y1Position (see
page 249)
:MEASure:VSTOp (see
page 536)
:MARKer:Y2Position (see
page 250)
:DISPlay:DATA? (see
page 197)
:TIMebase:DELay (see
page 539)
:TIMebase:POSition (see
page 346) or
:TIMebase:WINDow:POSition
(see page 351)
:TRIGger:CAN:ACKNowledge
(see page 540)
none
:TRIGger:CAN:SIGNal:DEFiniti
on (see page 541)
none
:TRIGger:LIN:SIGNal:DEFinitio
n (see page 542)
none
:TRIGger:TV:TVMode (see
page 543)
:TRIGger:TV:MODE (see
page 424)
TIMebase:POSition is position
value of main time base;
TIMebase:WINDow:POSition
is position value of delayed
time base window.
503
Discontinued
Commands
ASTore
:DISPlay:PERSistence INFinite
(see page 201)
CHANnel:MATH
:FUNCtion:OPERation (see
page 223)
CHANnel<n>:PROTect
:CHANnel<n>:PROTection
(see page 189)
DISPlay:INVerse
none
DISPlay:COLumn
none
DISPlay:GRID
none
DISPLay:LINE
none
DISPlay:PIXel
none
DISPlay:POSition
none
DISPlay:ROW
none
DISPlay:TEXT
none
FUNCtion:MOVE
none
FUNCtion:PEAKs
none
HARDcopy:ADDRess
none
MASK
none
SYSTem:KEY
none
TEST:ALL
TRACE subsystem
none
TRIGger:ADVanced subsystem
504
Comments
Discontinued Command
TRIGger:TV:FIELd
:TRIGger:TV:MODE (see
page 424)
Comments
TRIGger:TV:TVHFrej
Discontinued
Parameters
TRIGger:TV:VIR
none
VAUToscale
none
505
:CHANnel:LABel
(see page 586)
Command Syntax
:CHANnel:LABel <source_text><string>
<source_text> ::= {CHANnel1 | CHANnel2 | DIGital0,..,DIGital15}
<string> ::= quoted ASCII string
The :CHANnel:LABel command sets the source text to the string that
follows. Setting a channel will also result in the name being added to the
label list.
NOTE
Query Syntax
:CHANnel:LABel?
<string><NL>
<string> ::= quoted ASCII string
506
:CHANnel2:SKEW
(see page 586)
Command Syntax
NOTE
NOTE
This command is only valid for the two channel oscilloscope models.
Query Syntax
:CHANnel2:SKEW?
The :CHANnel2:SKEW? query returns the current probe skew setting for
the selected channel.
Return Format
<skew value><NL>
<skew value> ::= skew value in NR3 format
See Also
507
:CHANnel<n>:INPut
(see page 586)
Command Syntax
:CHANnel<n>:INPut <impedance>
<impedance> ::= {ONEMeg | FIFTy}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
:CHANnel<n>:INPut?
<impedance value><NL>
<impedance value> ::= {ONEM | FIFT}
508
:CHANnel<n>:PMODe
(see page 586)
Command Syntax
NOTE
Query Syntax
:CHANnel<n>:PMODe?
<pmode value><NL>
<pmode value> ::= {AUT | MAN}
509
:DISPlay:CONNect
(see page 586)
Command Syntax
:DISPlay:CONNect <connect>
<connect> ::= {{ 1 | ON} | {0 | OFF}}
NOTE
Query Syntax
:DISPlay:CONNect?
<connect><NL>
<connect> ::= {1 | 0}
See Also
510
:ERASe
(see page 586)
Command Syntax
:ERASe
NOTE
511
:EXTernal:INPut
(see page 586)
Command Syntax
:EXTernal:INPut <impedance>
<impedance> ::= {ONEMeg | FIFTy}
NOTE
Query Syntax
:EXTernal:INPut?
<impedance value><NL>
<impedance value> ::= {ONEM | FIFT}
See Also
512
:EXTernal:PMODe
(see page 586)
Command Syntax
NOTE
Query Syntax
:EXTernal:PMODe?
<pmode value><NL>
<pmode value> ::= {AUT | MAN}
513
:FUNCtion:SOURce
(see page 586)
Command Syntax
:FUNCtion:SOURce <value>
<value> ::= {CHANnel<n> | ADD | SUBTract | MULTiply}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
:FUNCtion:SOURce?
<value><NL>
<value> ::= {CHAN<n> | ADD | SUBT | MULT}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
See Also
514
:FUNCtion:VIEW
(see page 586)
Command Syntax
:FUNCtion:VIEW <view>
<view> ::= {{1 | ON} | (0 | OFF}}
NOTE
Query Syntax
:FUNCtion:VIEW?
<view><NL>
<view> ::= {1 | 0}
515
:HARDcopy:DESTination
(see page 586)
Command Syntax
:HARDcopy:DESTination <destination>
<destination> ::= {CENTronics | FLOPpy}
NOTE
Query Syntax
:HARDcopy:DESTination?
<destination><NL>
<destination> ::= {CENT | FLOP}
See Also
516
:HARDcopy:DEVice
(see page 586)
Command Syntax
:HARDcopy:DEVice <device>
<device> ::= {TIFF | GIF | BMP | LASerjet | EPSon | DESKjet
| BWDeskjet | SEIKo}
NOTE
NOTE
Query Syntax
:HARDcopy:DEVice?
<device><NL>
<device> ::= {TIFF | GIF | BMP | LAS | EPS | DESK | BWD | SEIK}
517
:HARDcopy:FILename
(see page 586)
Command Syntax
:HARDcopy:FILename <string>
<string> ::= quoted ASCII string
NOTE
Query Syntax
:HARDcopy:FILename?
<string><NL>
<string> ::= quoted ASCII string
See Also
518
:HARDcopy:FORMat
(see page 586)
Command Syntax
:HARDcopy:FORMat <format>
<format> ::= {BMP[24bit] | BMP8bit | PNG | CSV | ASCiixy | BINary
| PRINter0 | PRINter1}
NOTE
Query Syntax
:HARDcopy:FORMat?
<format><NL>
<format> ::= {BMP | BMP8 | PNG | CSV | ASC | BIN | PRIN0 | PRIN1}
See Also
519
:HARDcopy:GRAYscale
(see page 586)
Command Syntax
:HARDcopy:GRAYscale <gray>
<gray> ::= {{OFF | 0} | {ON | 1}}
NOTE
Query Syntax
:HARDcopy:GRAYscale?
<gray><NL>
<gray> ::= {0 | 1}
See Also
520
:HARDcopy:IGColors
(see page 586)
Command Syntax
:HARDcopy:IGColors <value>
<value> ::= {{OFF | 0} | {ON | 1}}
NOTE
Query Syntax
:HARDcopy:IGColors?
<value><NL>
<value> ::= {0 | 1}
See Also
521
:HARDcopy:PDRiver
(see page 586)
Command Syntax
:HARDcopy:PDRiver <driver>
<driver> ::= {AP2Xxx | AP21xx | {AP2560 | AP25} | {DJ350 | DJ35} |
DJ6xx | {DJ630 | DJ63} | DJ6Special | DJ6Photo |
DJ8Special | DJ8xx | DJ9Vip | OJPRokx50 | DJ9xx | GVIP |
DJ55xx | {PS470 | PS47} {PS100 | PS10} | CLASer |
MLASer | LJFastraster | POSTscript}
NOTE
Query Syntax
:HARDcopy:PDRiver?
<driver><NL>
<driver> ::= {AP2X | AP21 | AP25 | DJ35 | DJ6 | DJ63 | DJ6S | DJ6P |
DJ8S | DJ8 | DJ9V | OJPR | DJ9 | GVIP | DJ55 | PS10 |
PS47 | CLAS | MLAS | LJF | POST}
See Also
522
:MEASure:LOWer
(see page 586)
Command Syntax
:MEASure:LOWer <voltage>
NOTE
Query Syntax
:MEASure:LOWer?
<voltage><NL>
<voltage> ::= the user-defined lower threshold in volts in NR3 format
See Also
523
:MEASure:SCRatch
(see page 586)
Command Syntax
:MEASure:SCRatch
NOTE
524
:MEASure:TDELta
(see page 586)
Query Syntax
:MEASure:TDELta?
NOTE
Return Format
<value><NL>
<value> ::= time difference between start and stop markers in NR3 format
See Also
525
:MEASure:THResholds
(see page 586)
Command Syntax
NOTE
Query Syntax
:MEASure:THResholds?
See Also
526
:MEASure:TMAX
(see page 586)
Command Syntax
:MEASure:TMAX [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
:MEASure:TMAX? [<source>]
The :MEASure:TMAX? query returns the horizontal axis value at which the
maximum vertical value occurs on the current source. If the optional
source is specified, the current source is modified. If all channels are off,
the query returns 9.9E+37.
Return Format
<value><NL>
<value> ::= time at maximum in NR3 format
See Also
527
:MEASure:TMIN
(see page 586)
Command Syntax
:MEASure:TMIN [<source>]
<source> ::= {CHANnel<n> | FUNCtion | MATH}
<n> ::= {1 | 2 | 3 | 4} for the four channel oscilloscope models
<n> ::= {1 | 2} for the two channel oscilloscope models
NOTE
Query Syntax
:MEASure:TMIN? [<source>]
The :MEASure:TMIN? query returns the horizontal axis value at which the
minimum vertical value occurs on the current source. If the optional
source is specified, the current source is modified. If all channels are off,
the query returns 9.9E+37.
Return Format
<value><NL>
<value> ::= time at minimum in NR3 format
See Also
528
:MEASure:TSTArt
(see page 586)
Command Syntax
The :MEASure:TSTArt command moves the start marker (X1 cursor) to the
specified time with respect to the trigger time.
NOTE
The short form of this command, TSTA, does not follow the defined Long Form to Short
Form Truncation Rules (see page 588). The normal short form "TST" would be the same for
both TSTArt and TSTOp, so sending TST for the TSTArt command produces an error.
NOTE
Query Syntax
:MEASure:TSTArt?
The :MEASure:TSTArt? query returns the time at the start marker (X1
cursor).
Return Format
<value><NL>
<value> ::= time at the start marker in NR3 format
See Also
529
:MEASure:TSTOp
(see page 586)
Command Syntax
The :MEASure:TSTOp command moves the stop marker (X2 cursor) to the
specified time with respect to the trigger time.
NOTE
The short form of this command, TSTO, does not follow the defined Long Form to Short
Form Truncation Rules (see page 588). The normal short form "TST" would be the same for
both TSTArt and TSTOp, so sending TST for the TSTOp command produces an error.
NOTE
Query Syntax
:MEASure:TSTOp?
The :MEASure:TSTOp? query returns the time at the stop marker (X2
cursor).
Return Format
<value><NL>
<value> ::= time at the stop marker in NR3 format
See Also
530
:MEASure:TVOLt
(see page 586)
Query Syntax
NOTE
Return Format
<value><NL>
531
532
:MEASure:UPPer
(see page 586)
Command Syntax
:MEASure:UPPer <value>
NOTE
Query Syntax
:MEASure:UPPer?
<value><NL>
<value> ::= the user-defined upper threshold in NR3 format
See Also
533
:MEASure:VDELta
(see page 586)
Query Syntax
:MEASure:VDELta?
NOTE
Return Format
<value><NL>
<value> ::= delta V value in NR1 format
See Also
534
:MEASure:VSTArt
(see page 586)
Command Syntax
:MEASure:VSTArt <vstart_argument>
<vstart_argument> ::= value for vertical marker 1
NOTE
The short form of this command, VSTA, does not follow the defined Long Form to Short
Form Truncation Rules (see page 588). The normal short form, VST, would be the same for
both VSTArt and VSTOp, so sending VST for the VSTArt command produces an error.
NOTE
Query Syntax
:MEASure:VSTArt?
<value><NL>
<value> ::= voltage at voltage marker 1 in NR3 format
See Also
535
:MEASure:VSTOp
(see page 586)
Command Syntax
:MEASure:VSTOp <vstop_argument>
<vstop_argument> ::= value for Y2 cursor
NOTE
The short form of this command, VSTO, does not follow the defined Long Form to Short
Form Truncation Rules (see page 588). The normal short form, VST, would be the same for
both VSTArt and VSTOp, so sending VST for the VSTOp command produces an error.
NOTE
Query Syntax
:MEASure:VSTOp?
<value><NL>
<value> ::= value of the Y2 cursor in NR3 format
See Also
536
:PRINt?
(see page 586)
Query Syntax
:PRINt? [<options>]
<options> ::= [<print option>][,..,<print option>]
<print option> ::= {COLor | GRAYscale | BMP8bit | BMP}
The :PRINt? query pulls image data back over the bus for storage.
NOTE
Print Option
:PRINt command
:PRINt? query
COLor
Sets palette=COLor
GRAYscale
Sets
palette=GRAYscale
PRINter0,1
Not used
N/A
BMP8bit
N/A
BMP
Selects BMP
formatting for query
N/A
FACTors
Selects outputting of
additional settings
information for
:PRINT
Not used
N/A
NOFactors
Deselects outputting
of additional settings
information for
:PRINT
Not used
N/A
palette=COLor
Is Now:
HIRes
COLor
LORes
GRAYscale
PARallel
PRINter0
Query Default
537
NOTE
See Also
Is Now:
DISK
invalid
PCL
invalid
538
:TIMebase:DELay
(see page 586)
Command Syntax
:TIMebase:DELay <delay_value>
<delay_value> ::= time in seconds from trigger to the delay reference
point on the screen.
The valid range for delay settings depends on the time/division
setting for the main time base.
The :TIMebase:DELay command sets the main time base delay. This delay
is the time between the trigger event and the delay reference point on the
screen. The delay reference point is set with the :TIMebase:REFerence
command (see page 348).
NOTE
Query Syntax
:TIMebase:DELay?
<delay_value><NL>
<delay_value> ::= time from trigger to display reference in seconds
in NR3 format.
Example Code
Example program from the start: "VISA COM Example in Visual Basic" on
page 672
539
:TRIGger:CAN:ACKNowledge
(see page 586)
Command Syntax
:TRIGger:CAN:ACKNowledge <value>
<value> ::= {0 | OFF}
This command was used with the N2758A CAN trigger module for
54620/54640 Series mixed- signal oscilloscopes. The InfiniiVision
5000 Series oscilloscopes do not support the N2758A CAN trigger module.
Query Syntax
:TRIGger:CAN:ACKNowledge?
<value><NL>
<value> ::= 0
See Also
540
:TRIGger:CAN:SIGNal:DEFinition
(see page 586)
Command Syntax
:TRIGger:CAN:SIGNal:DEFinition <value>
<value> ::= {CANH | CANL | RX | TX | DIFFerential}
NOTE
Query Syntax
With InfiniiVision 5000 Series oscilloscope software version 5.00 or greater, this command
is available, but the only legal value is DIFF.
:TRIGger:CAN:SIGNal:DEFinition?
<value><NL>
<value> ::= DIFF
See Also
541
:TRIGger:LIN:SIGNal:DEFinition
(see page 586)
Command Syntax
:TRIGger:LIN:SIGNal:DEFinition <value>
<value> ::= {LIN | RX | TX}
NOTE
Query Syntax
With InfiniiVision 5000 Series oscilloscope software version 5.00 or greater, this command
is available, but the only legal value is LIN.
:TRIGger:LIN:SIGNal:DEFinition?
<value><NL>
<value> ::= LIN
See Also
542
:TRIGger:TV:TVMode
(see page 586)
Command Syntax
:TRIGger:TV:TVMode <mode>
<mode> ::= {FIEld1 | FIEld2 | AFIelds | ALINes | LINE | VERTical
| LFIeld1 | LFIeld2 | LALTernate | LVERtical}
NOTE
Query Syntax
<mode>
FIEld1
F1
FIEld2
F2
AFIeld
ALLFields, ALLFLDS
ALINes
ALLLines
LFIeld1
LINEF1, LINEFIELD1
LFIeld2
LINEF2, LINEFIELD2
LALTernate
LINEAlt
LVERtical
LINEVert
:TRIGger:TV:TVMode?
<value><NL>
<value> ::= {FIE1 | FIE2 | AFI | ALIN | LINE | VERT | LFI1 | LFI2
| LALT | LVER}
543
544
8
Error Messages
545
Error Messages
546
Error Messages
547
Error Messages
548
Error Messages
549
Error Messages
550
Error Messages
551
552
Error Messages
9
Status Reporting
Status Reporting Data Structures 555
Status Byte Register (STB) 558
Service Request Enable Register (SRE) 560
Trigger Event Register (TER) 561
Output Queue 562
Message Queue 563
(Standard) Event Status Register (ESR) 564
(Standard) Event Status Enable Register (ESE) 565
Error Queue 566
Operation Status Event Register (:OPERegister[:EVENt]) 567
Operation Status Condition Register (:OPERegister:CONDition) 568
Arm Event Register (AER) 569
Hardware Event Event Register (:HWERegister[:EVENt]) 570
Hardware Event Condition Register (:HWERegister:CONDition) 571
Clearing Registers and Queues 572
Status Reporting Decision Chart 573
553
Status Reporting
7ULJJHU(YHQW
5HJLVWHU
(UURU
4XHXH
0HVVDJH
4XHXH
581
%LW
2XWSXW
4XHXH
0DVN
$UP(YHQW
5HJLVWHU
2YHUORDG
(YHQW
5HJLVWHU
2YHUORDG
(YHQW
(QDEOH
5HJLVWHU
0DVN
6WDQGDUG
(YHQW
6WDWXV
5HJLVWHU
6WDQGDUG
(YHQW
6WDWXV
(QDEOH
5HJLVWHU
0DVN
+DUGZDUH
(YHQW
&RQGLWLRQ
(YHQW
5HJLVWHUV
+DUGZDUH
(YHQW
(QDEOH
5HJLVWHU
2SHUDWLRQ
6WDWXV
&RQGLWLRQ
(YHQW
5HJLVWHUV
2SHUDWLRQ
6WDWXV
(QDEOH
5HJLVWHU
6WDWXV
%\WH
5HJLVWHU
6HUYLFH
5HTXHVW
(QDEOH
5HJLVWHU
6HUYLFH
5HTXHVW
*HQHUDWLRQ
6HUYLFH
5HTXHVW654
,QWHUUXSW
WR&RPSXWHU
To monitor an event, first clear the event; then, enable the event. All of
the events are cleared when you initialize the instrument.
To allow a service request (SRQ) interrupt to an external controller,
enable at least one bit in the Status Byte Register (by setting, or
unmasking, the bit in the Service Request Enable register).
The Status Byte Register, the Standard Event Status Register group, and
the Output Queue are defined as the Standard Status Data Structure
Model in IEEE 488.2- 1987.
The bits in the status byte act as summary bits for the data structures
residing behind them. In the case of queues, the summary bit is set if the
queue is not empty. For registers, the summary bit is set if any enabled
bit in the event register is set. The events are enabled with the
corresponding event enable register. Events captured by an event register
remain set until the register is read or cleared. Registers are read with
their associated commands. The *CLS command clears all event registers
and all queues except the output queue. If you send *CLS immediately
after a program message terminator, the output queue is also cleared.
554
Status Reporting
555
Status Reporting
%DW
21
3//
/RFNHG
+:(5HJLVWHU&21'LWLRQ"
+DUGZDUH(YHQW&RQGLWLRQ5HJLVWHU
%DW
21
+:(5HJLVWHU>(9(1W@"
+DUGZDUH(YHQW(YHQW5HJLVWHU
+:(HQDEOH
+:(HQDEOH"
+DUGZDUH(YHQW(QDEOH0$6.5HJLVWHU
25
29/5"
2YHUORDG(YHQW5HJLVWHU
29/
29/"
2YHUORDG(YHQW(QDEOH0DVN5HJLVWHU
25
$UP
5HJ
5XQ
+:( 29/5
:DLW
7ULJ
5XQ
5XQELWVHWLIRVFLOORVFRSHQRWVWRSSHG
:DLW
7ULJ
+:( 29/5
$(5 "
23(5DWLRQ&21'LWLRQ"
2SHUDWLRQ6WDWXV&RQGLWLRQ5HJLVWHU
23(5DWLRQ>(9(1W@"
2SHUDWLRQ6WDWXV(YHQW5HJLVWHU
23((
23(("
2SHUDWLRQ6WDWXV(QDEOH0DVN5HJLVWHU
25
321
854
&0(
(;(
''(
4<(
54/
23&
(65"
6WDQGDUG(YHQW6WDWXV5HJLVWHU
(6(
(6("
6WDQGDUG(YHQW6WDWXV(QDEOH0DVN5HJLVWHU
25
546
23(5 066 (6%
2XWSXW
4XHXH
0$9
75*
5HJ
7(5"
7ULJJHU(YHQW5HJLVWHU
67%"
6WDWXV%\WH5HJLVWHU
06*
865
75*
65(
65("
6HUYLFH5HTXHVW(QDEOH0DVN5HJLVWHU
25
654
556
6HUYLFH5HTXHVW
Status Reporting
The status register bits are described in more detail in the following
tables:
"Status Byte Register (STB)" on page 111
"Standard Event Status Register (ESR)" on page 98
"Operation Status Condition Register" on page 137
"Operation Status Event Register" on page 139
"Overload Event Register (OVLR)" on page 143
"Hardware Event Condition Register" on page 130
"Hardware Event Event Register" on page 132
The status registers picture above shows how the different status reporting
data structures work together. To make it possible for any of the Standard
Event Status Register bits to generate a summary bit, the bits must be
enabled. These bits are enabled by using the *ESE common command to
set the corresponding bit in the Standard Event Status Enable Register.
To generate a service request (SRQ) interrupt to an external controller, at
least one bit in the Status Byte Register must be enabled. These bits are
enabled by using the *SRE common command to set the corresponding bit
in the Service Request Enable Register. These enabled bits can then set
RQS and MSS (bit 6) in the Status Byte Register.
557
Status Reporting
558
Status Reporting
The next program prints 0xD1 and clears bit 6 (RQS) and bit 4 (MAV) of
the Status Byte Register. The difference in the output value between this
example and the previous one is the value of bit 6 (weight = 64). Bit 6 is
set when the first enabled summary bit is set and is cleared when the
Status Byte Register is read by the serial poll command.
Example
The following example uses the resource session object's ReadSTB method
to read the contents of the oscilloscope's Status Byte Register.
varQueryResult = myScope.IO.ReadSTB
MsgBox "Status Byte Register, Serial Poll: 0x" + Hex(varQueryResult)
NOTE
Use Serial Polling to Read Status Byte Register. Serial polling is the preferred method to
read the contents of the Status Byte Register because it resets bit 6 and allows the next
enabled event that occurs to generate a new SRQ interrupt.
559
Status Reporting
The following example sets bit 4 (MAV) and bit 5 (ESB) in the Service
Request Enable Register.
myScope.WriteString "*SRE " + CStr(CInt("&H30"))
This example uses the decimal parameter value of 48, the string returned
by CStr(CInt("&H30")), to enable the oscilloscope to generate an SRQ
interrupt under the following conditions:
When one or more bytes in the Output Queue set bit 4 (MAV).
When an enabled event in the Standard Event Status Register generates
a summary bit that sets bit 5 (ESB).
560
Status Reporting
561
Status Reporting
Output Queue
The output queue stores the oscilloscope- to- controller responses that are
generated by certain instrument commands and queries. The output queue
generates the Message Available summary bit when the output queue
contains one or more bytes. This summary bit sets the MAV bit (bit 4) in
the Status Byte Register.
When using the Agilent VISA COM library, the output queue may be read
with the FormattedIO488 object's ReadString, ReadNumber, ReadList, or
ReadIEEEBlock methods.
562
Status Reporting
Message Queue
The message queue contains the text of the last message written to the
advisory line on the screen of the oscilloscope. The length of the
oscilloscope's message queue is 1. Note that messages sent with the
:SYSTem:DSP command do not set the MSG status bit in the Status Byte
Register.
563
Status Reporting
The following example uses the *ESR query to read the contents of the
Standard Event Status Register.
myScope.WriteString "*ESR?"
varQueryResult = myScope.ReadNumber
MsgBox "Standard Event Status Register: 0x" + Hex(varQueryResult)
If bit 4 (weight = 16) and bit 5 (weight = 32) are set, the program prints
the sum of the two weights.
564
Status Reporting
Whenever an error occurs, it sets one of these bits in the (Standard) Event
Status Register. Because all the error related bits are enabled, a summary
bit is generated to set bit 5 (ESB) in the Status Byte Register.
If bit 5 (ESB) in the Status Byte Register is enabled (via the *SRE
command), an SRQ service request interrupt is sent to the controller PC.
NOTE
Disabled (Standard) Event Status Register bits respond but do not generate a summary
bit. (Standard) Event Status Register bits that are not enabled still respond to their
corresponding conditions (that is, they are set if the corresponding event occurs). However,
because they are not enabled, they do not generate a summary bit to the Status Byte
Register.
565
Status Reporting
Error Queue
As errors are detected, they are placed in an error queue. This queue is
first in, first out. If the error queue overflows, the last error in the queue
is replaced with error 350, Queue overflow. Any time the queue overflows,
the least recent errors remain in the queue, and the most recent error is
discarded. The length of the oscilloscope's error queue is 30 (29 positions
for the error messages, and 1 position for the Queue overflow message).
The error queue is read with the :SYSTem:ERRor? query. Executing this
query reads and removes the oldest error from the head of the queue,
which opens a position at the tail of the queue for a new error. When all
the errors have been read from the queue, subsequent error queries return
"0, No error".
The error queue is cleared when:
the instrument is powered up,
the instrument receives the *CLS common command, or
the last item is read from the error queue.
566
Status Reporting
567
Status Reporting
568
Status Reporting
569
Status Reporting
570
Status Reporting
571
Status Reporting
572
Status Reporting
QR
'R\RXZDQW
WRGRVWDWXV
UHSRUWLQJ"
\HV
5HVHWWKHLQVWUXPHQWDQG
FOHDUWKHVWDWXVUHJLVWHUV
P\6FRSH:ULWH6WULQJ
567
P\6FRSH:ULWH6WULQJ
&/6
'R\RXZDQWWR
VHQGD6HUYLFH5HTXHVW
654LQWHUUXSWWRWKH
FRQWUROOHU"
QR<RXUSURJUDPVFDQUHDGWKHVWDWXVUHJLVWHUVLQVWHDG
\HV
8VHWKHIROORZLQJWRUHDGWKH
6WDQGDUG(YHQW6WDWXV5HJLVWHU
'R\RXZDQWWR
UHSRUWHYHQWVPRQLWRUHGE\
WKH6WDQGDUG(YHQW6WDWXV
5HJLVWHU"
\HV
8VHWKH
(6(FRPPRQFRPPDQG
WRHQDEOHWKHELWV\RXZDQWWR
XVHWRJHQHUDWHWKH(6%VXPPDU\
ELWLQWKH6WDWXV%\WH5HJLVWHU
8VHWKH
65(FRPPRQFRPPDQG
WRHQDEOHWKHELWV\RXZDQWWR
JHQHUDWHWKH546066ELWWRVHW
ELWLQWKH6WDWXV%\WH5HJLVWHU
DQGVHQGDQ654WRWKHFRPSXWHU
,IHYHQWVDUHPRQLWRUHGE\WKH
6WDQGDUG(YHQW6WDWXV5HJLVWHU
DOVRHQDEOH(6%ZLWKWKH
65(
FRPPDQG
MN
$FWLYDWHWKHLQVWUXPHQWIXQFWLRQ
WKDW\RXZDQWWRPRQLWRU
P\6FRSH:ULWH6WULQJ
(65"
YDU5 P\6FRSH5HDG1XPEHU
0VJ%R[(65[+H[YDU5
:KHQDQLQWHUUXSWRFFXUVLQWHUUXSW
KDQGOHUVKRXOGVHULDOSROO67%ZLWK
YDU5 P\6FRSH,25HDG67%
8VHWKHIROORZLQJWRVHHLIDQ
RSHUDWLRQLVFRPSOHWH
7RUHDGWKH6WDWXV%\WH5HJLVWHU
XVHWKHIROORZLQJ
P\6FRSH:ULWH6WULQJ
23&"
YDU5 P\6FRSH5HDG1XPEHU
0VJ%R[23&[+H[YDU5
P\6FRSH:ULWH6WULQJ
67%"
YDU5 P\6FRSH5HDG1XPEHU
0VJ%R[67%[+H[YDU5
7KLVGLVSOD\VWKHKH[DGHFPDOYDOXH
RIWKH6WDWXV%\WH5HJLVWHU
'HWHUPLQHZKLFKELWVLQWKH
6WDWXV%\WH5HJLVWHUDUHVHW
8VHWKHIROORZLQJWRUHDGWKH
FRQWHQWVRIWKHVWDWXVE\WH
P\6FRSH:ULWH6WULQJ
67%"
YDU5 P\6FRSH5HDG1XPEHU
0VJ%R[67%[+H[YDU5
(1'
573
574
Status Reporting
10
Synchronizing Acquisitions
Synchronization in the Programming Flow 576
Blocking Synchronization 577
Polling Synchronization With Timeout 578
Synchronizing with a Single-Shot Device Under Test (DUT) 580
Synchronization with an Averaging Acquisition 582
575
10 Synchronizing Acquisitions
NOTE
It is not necessary to use *OPC?, hard coded waits, or status checking when setting up the
oscilloscope. After the oscilloscope is configured, it is ready for an acquisition.
Acquire a Waveform
When acquiring a waveform there are two possible methods used to wait
for the acquisition to complete. These methods are blocking and polling.
The table below details when each method should be chosen and why.
Blocking Wait
Polling Wait
Use When
Advantages
Disadvantages
Slower method.
Requires polling loop.
Requires known maximum wait time.
Implementation
Details
Retrieve Results
Once the acquisition is complete, it is safe to retrieve measurements and
statistics.
576
Synchronizing Acquisitions
10
Blocking Synchronization
Use the :DIGitize command to start the acquisition. This blocks subsequent
queries until the acquisition and processing is complete. For example:
'
' Synchronizing acquisition using blocking.
' ===================================================================
Option Explicit
Public
Public
Public
Public
myMgr As VisaComLib.ResourceManager
myScope As VisaComLib.FormattedIO488
varQueryResult As Variant
strQueryResult As String
Sub Main()
On Error GoTo VisaComError
' Create the VISA COM I/O resource.
Set myMgr = New VisaComLib.ResourceManager
Set myScope = New VisaComLib.FormattedIO488
Set myScope.IO = myMgr.Open("TCPIP0::130.29.69.12::inst0::INSTR")
myScope.IO.Clear
' Clear the interface.
' Set up.
' ----------------------------------------------------------------myScope.WriteString ":TRIGger:MODE EDGE"
myScope.WriteString ":TRIGger:EDGE:LEVel 2"
myScope.WriteString ":TIMebase:SCALe 5e-8"
' Acquire.
' ----------------------------------------------------------------myScope.WriteString ":DIGitize"
' Get results.
' ----------------------------------------------------------------myScope.WriteString ":MEASure:RISetime"
myScope.WriteString ":MEASure:RISetime?"
varQueryResult = myScope.ReadNumber
' Read risetime.
Debug.Print "Risetime: " + _
FormatNumber(varQueryResult * 1000000000, 1) + " ns"
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End Sub
577
10 Synchronizing Acquisitions
myMgr As VisaComLib.ResourceManager
myScope As VisaComLib.FormattedIO488
varQueryResult As Variant
strQueryResult As String
578
Synchronizing Acquisitions
10
myScope.WriteString ":OPERegister:CONDition?"
varQueryResult = myScope.ReadNumber
' Mask RUN bit (bit 3, &H8).
If (varQueryResult And &H8) = 0 Then
Exit Do
Else
Sleep 100
' Small wait to prevent excessive queries.
lngElapsed = lngElapsed + 100
End If
Loop
' Get results.
' ----------------------------------------------------------------If lngElapsed < lngTimeout Then
myScope.WriteString ":MEASure:RISetime"
myScope.WriteString ":MEASure:RISetime?"
varQueryResult = myScope.ReadNumber
' Read risetime.
Debug.Print "Risetime: " + _
FormatNumber(varQueryResult * 1000000000, 1) + " ns"
Else
Debug.Print "Timeout waiting for single-shot trigger."
End If
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End Sub
579
10 Synchronizing Acquisitions
NOTE
The blocking :DIGitize command cannot be used for a single shot DUT because once the
:DIGitize command is issued, the oscilloscope is blocked from any further commands until
the acquisition is complete.
myMgr As VisaComLib.ResourceManager
myScope As VisaComLib.FormattedIO488
varQueryResult As Variant
strQueryResult As String
580
Synchronizing Acquisitions
10
581
10 Synchronizing Acquisitions
myMgr As VisaComLib.ResourceManager
myScope As VisaComLib.FormattedIO488
varQueryResult As Variant
strQueryResult As String
582
Synchronizing Acquisitions
10
583
10 Synchronizing Acquisitions
584
11
More About Oscilloscope Commands
Command Classifications 586
Valid Command/Query Strings 587
Query Return Values 604
All Oscilloscope Commands Are Sequential 605
585
Command Classifications
To help you use existing programs with your oscilloscope, or use current
programs with the next generation of oscilloscopes, commands are
classified by the following categories:
"Core Commands" on page 586
"Non- Core Commands" on page 586
"Obsolete Commands" on page 586
Core Commands
Core commands are a common set of commands that provide basic
oscilloscope functionality on this oscilloscope and future Agilent
oscilloscopes. Core commands are unlikely to be modified in the future. If
you restrict your programs to core commands, the programs should work
across product offerings in the future, assuming appropriate programming
methods are employed.
Non-Core Commands
Non- core commands are commands that provide specific features, but are
not universal across all oscilloscope models. Non- core commands may be
modified or deleted in the future. With a command structure as complex
as the one for your oscilloscope, some evolution over time is inevitable.
Agilent's intent is to continue to expand command subsystems, such as the
rich and evolving trigger feature set.
Obsolete Commands
Obsolete commands are older forms of commands that are provided to
reduce customer rework for existing systems and programs. Generally,
these commands are mapped onto some of the Core and Non- core
commands, but may not strictly have the same behavior as the new
command. None of the obsolete commands are guaranteed to remain
functional in future products. New systems and programs should use the
Core (and Non- core) commands. Obsolete commands are listed in:
"Obsolete and Discontinued Commands" on page 501
As well as: "Commands A- Z" on page 477
586
11
3URJUDP0HVVDJH
',63/$</$%(/21
,QVWUXFWLRQ+HDGHU
6HSDUDWRU
3URJUDP'DWD
Instructions (both commands and queries) normally appear as a string
embedded in a statement of your host language, such as Visual Basic or
C/C++. The only time a parameter is not meant to be expressed as a string
is when the instruction's syntax definition specifies <block data>, such as
<learn string>. There are only a few instructions that use block data.
Program messages can have long or short form commands (and data in
some cases see "Long Form to Short Form Truncation Rules" on
page 588), and upper and/or lower case ASCII characters may be used.
(Query responses, however, are always returned in upper case.)
Instructions are composed of two main parts:
The header, which specifies the command or query to be sent.
The program data, which provide additional information needed to
clarify the meaning of the instruction.
587
Instruction
Header
White Space
(Separator)
White space is used to separate the instruction header from the program
data. If the instruction does not require any program data parameters, you
do not need to include any white space. White space is defined as one or
more space characters. ASCII defines a space to be character 32 (in
decimal).
Program Data
Program data are used to clarify the meaning of the command or query.
They provide necessary information, such as whether a function should be
on or off, or which waveform is to be displayed. Each instruction's syntax
definition shows the program data, as well as the values they accept.
"Program Data Syntax Rules" on page 590 describes all of the general rules
about acceptable values.
When there is more than one data parameter, they are separated by
commas(,). Spaces can be added around the commas to improve
readability.
Program
Message
Terminator
NOTE
The program instructions within a data message are executed after the
program message terminator is received. The terminator may be either an
NL (New Line) character, an EOI (End- Or- Identify) asserted in the
programming interface, or a combination of the two. Asserting the EOI
sets the EOI control line low on the last byte of the data message. The NL
character is an ASCII linefeed (decimal 10).
New Line Terminator Functions. The NL (New Line) terminator has the same function as
an EOS (End Of String) and EOT (End Of Text) terminator.
588
11
Short form
RANGe
RANG
PATTern
PATT
TIMebase
TIM
DELay
DEL
TYPE
TYPE
589
Numeric Program
Data
590
11
Command Tree
The command tree shows all of the commands and the relationships of the
commands to each other. The IEEE 488.2 common commands are not
listed as part of the command tree because they do not affect the position
of the parser within the tree. When a program message terminator (<NL>,
linefeed- ASCII decimal 10) or a leading colon (:) is sent to the instrument,
the parser is set to the root of the command tree.
: (root)
591
592
11
593
594
11
595
596
11
597
598
11
599
600
11
Common
Commands (IEEE
488.2)
Duplicate Mnemonics
Identical function mnemonics can be used in more than one subsystem.
For example, the function mnemonic RANGe may be used to change the
vertical range or to change the horizontal range:
:CHANnel1:RANGe .4
601
A leading colon (<NL> or EOI true on the last byte) places the parser at
the root of the command tree. A leading colon is a colon that is the
first character of a program header. Executing a subsystem command
lets you access that subsystem until a leading colon or a program
message terminator (<NL>) or EOI true is found.
In the command tree, use the last mnemonic in the compound header
as the reference point (for example, RANGe). Then find the last colon
above that mnemonic (TIMebase:). That is the point where the parser
resides. Any command below that point can be sent within the current
program message without sending the mnemonics which appear above
them (for example, POSition).
The output statements in the examples are written using the Agilent VISA
COM library in Visual Basic. The quoted string is placed on the bus,
followed by a carriage return and linefeed (CRLF).
To execute more than one function within the same subsystem, separate
the functions with a semicolon (;):
:<subsystem>:<function><separator><data>;<function><separator><data><ter
minator>
For example:
myScope.WriteString ":TIMebase:RANGe 0.5;POSition 0"
NOTE
Example 2:
Program
Message
Terminator Sets
Parser Back to
Root
NOTE
or
myScope.WriteString ":TIMebase:REFerence CENTer"
myScope.WriteString ":TIMebase:POSition 0.00001"
In the first line of example 2, the subsystem selector is implied for the POSition command in
the compound command. The POSition command must be in the same program message as
the REFerence command because the program message terminator places the parser back
at the root of the command tree.
602
Example 3:
Selecting
Multiple
Subsystems
11
You can send multiple program commands and program queries for
different subsystems on the same line by separating each command with a
semicolon. The colon following the semicolon enables you to enter a new
subsystem. For example:
<program mnemonic><data>;:<program mnemonic><data><terminator>
For example:
myScope.WriteString ":TIMebase:REFerence CENTer;:DISPlay:VECTors ON"
NOTE
The leading colon before DISPlay:VECTors ON tells the parser to go back to the root of the
command tree. The parser can then see the DISPlay:VECTors ON command. The space
between REFerence and CENter is required; so is the space between VECTors and ON.
603
pass the value across the bus to the controller and place it in the variable
strQueryResult.
NOTE
Infinity
Representation
604
Read Query Results Before Sending Another Command. Sending another command or
query before reading the result of a query clears the output buffer (the current response)
and places a Query INTERRUPTED error in the error queue.
11
605
606
12
Programming Examples
SICL Examples 608
VISA Examples 626
VISA COM Examples 672
Example programs are ASCII text files that can be cut from the help file
and pasted into your favorite text editor.
607
12 Programming Examples
SICL Examples
"SICL Example in C" on page 608
"SICL Example in Visual Basic" on page 617
SICL Example in C
To compile and run this example in Microsoft Visual Studio 2005:
1 Open Visual Studio.
2 Create a new Visual C++, Win32, Win32 Console Application project.
3 In the Win32 Application Wizard, click Next >. Then, check Empty
project directory.
5 In Visual Studio 2005, right- click the Source Files folder, choose Add >
Add Existing Item..., select the example.c file, and click Add.
6 Edit the program to use the SICL address of your oscilloscope.
7 Choose Project > Properties.... In the Property Pages dialog, update
Solutions.
c Show directories for Include files, and add the include directory (for
608
12
Programming Examples
/* For printf(). */
/* SICL routines. */
/* GPIB */
/* LAN */
/* USB */
WAVE_DATA_SIZE 5000
TIMEOUT
5000
SETUP_STR_SIZE 3000
IMG_SIZE
300000
/* Function prototypes */
void initialize(void);
void extra(void);
void save_waveform(void);
void retrieve_waveform(void);
/* Global variables */
INST id;
char buf[256] = { 0 };
void capture(void);
void analyze(void);
void get_waveform(void);
609
12 Programming Examples
610
Programming Examples
12
*/
iprintf(id, ":AUTOSCALE\n");
/* CHANNEL_PROBE - Sets the probe attenuation factor for the
* selected channel. The probe attenuation factor may be from
* 0.1 to 1000.
*/
iprintf(id, ":CHAN1:PROBE 10\n");
/* CHANNEL_RANGE - Sets the full scale vertical range in volts.
* The range value is eight times the volts per division.
*/
iprintf(id, ":CHANNEL1:RANGE 8\n");
/* TIME_RANGE - Sets the full scale horizontal time in seconds.
* The range value is ten times the time per division.
*/
iprintf(id, ":TIM:RANG 2e-3\n");
/* TIME_REFERENCE - Possible values are LEFT and CENTER:
* - LEFT sets the display reference one time division from the
*
left.
* - CENTER sets the display reference to the center of the screen.
*/
iprintf(id, ":TIMEBASE:REFERENCE CENTER\n");
/* TRIGGER_SOURCE - Selects the channel that actually produces the
* TV trigger. Any channel can be selected.
*/
iprintf(id, ":TRIGGER:TV:SOURCE CHANNEL1\n");
/* TRIGGER_MODE - Set the trigger mode to, EDGE, GLITch, PATTern,
* CAN, DURation, IIC, LIN, SEQuence, SPI, TV, or USB.
*/
iprintf(id, ":TRIGGER:MODE EDGE\n");
/* TRIGGER_EDGE_SLOPE - Set the slope of the edge for the trigger
* to either POSITIVE or NEGATIVE.
*/
iprintf(id, ":TRIGGER:EDGE:SLOPE POSITIVE\n");
}
/*
* extra
* -----------------------------------------------------------------* The commands in this function are not executed and are shown for
* reference purposes only. To execute these commands, call this
* function from main.
*/
void extra (void)
{
/* RUN_STOP (not executed in this example):
* - RUN starts the acquisition of data for the active waveform
*
display.
* - STOP stops the data acquisition and turns off AUTOSTORE.
*/
611
12 Programming Examples
iprintf(id, ":RUN\n");
iprintf(id, ":STOP\n");
/* VIEW_BLANK (not executed in this example):
* - VIEW turns on (starts displaying) an active channel or pixel
*
memory.
* - BLANK turns off (stops displaying) a specified channel or
*
pixel memory.
*/
iprintf(id, ":BLANK CHANNEL1\n");
iprintf(id, ":VIEW CHANNEL1\n");
/* TIME_MODE (not executed in this example) - Set the time base
* mode to MAIN, DELAYED, XY or ROLL.
*/
iprintf(id, ":TIMEBASE:MODE MAIN\n");
}
/*
* capture
* -----------------------------------------------------------------* This function prepares the scope for data acquisition and then
* uses the DIGITIZE MACRO to capture some data.
*/
void capture (void)
{
/* AQUIRE_TYPE - Sets the acquisition mode. There are three
* acquisition types NORMAL, PEAK, or AVERAGE.
*/
iprintf(id, ":ACQUIRE:TYPE NORMAL\n");
/* AQUIRE_COMPLETE - Specifies the minimum completion criteria
* for an acquisition. The parameter determines the percentage
* of time buckets needed to be "full" before an acquisition is
* considered to be complete.
*/
iprintf(id, ":ACQUIRE:COMPLETE 100\n");
/* DIGITIZE - Used to acquire the waveform data for transfer over
* the interface. Sending this command causes an acquisition to
* take place with the resulting data being placed in the buffer.
*/
/* NOTE! The use of the DIGITIZE command is highly recommended
* as it will ensure that sufficient data is available for
* measurement. Keep in mind when the oscilloscope is running,
* communication with the computer interrupts data acquisition.
* Setting up the oscilloscope over the bus causes the data
* buffers to be cleared and internal hardware to be reconfigured.
* If a measurement is immediately requested there may not have
* been enough time for the data acquisition process to collect
* data and the results may not be accurate. An error value of
* 9.9E+37 may be returned over the bus in this situation.
*/
iprintf(id, ":DIGITIZE CHAN1\n");
}
612
12
Programming Examples
/*
* analyze
* -----------------------------------------------------------------* In this example we will do the following:
* - Save the system setup to a file for restoration at a later time.
* - Save the oscilloscope display to a file which can be printed.
* - Make single channel measurements.
*/
void analyze (void)
{
double frequency, vpp;
/* Measurements. */
double vdiv, off, sdiv, delay;
/* Calculated from preamble data. */
int i;
/* Loop counter. */
/* Array for setup string. */
unsigned char setup_string[SETUP_STR_SIZE];
int setup_size;
FILE *fp;
unsigned char image_data[IMG_SIZE];
/* Array for image data. */
int img_size;
/* SAVE_SYSTEM_SETUP - The :SYSTEM:SETUP? query returns a program
* message that contains the current state of the instrument. Its
* format is a definite-length binary block, for example,
*
#800002204<setup string><NL>
* where the setup string is 2204 bytes in length.
*/
setup_size = SETUP_STR_SIZE;
/* Query and read setup string. */
ipromptf(id, ":SYSTEM:SETUP?\n", "%#b\n", &setup_size, setup_string);
printf("Read setup string query (%d bytes).\n", setup_size);
/* Write setup string to file. */
fp = fopen ("c:\\scope\\config\\setup.dat", "wb");
setup_size = fwrite(setup_string, sizeof(unsigned char), setup_size,
fp);
fclose (fp);
printf("Wrote setup string (%d bytes) to file.\n", setup_size);
/* RESTORE_SYSTEM_SETUP - Uploads a previously saved setup string
* to the oscilloscope.
*/
/* Read setup string from file. */
fp = fopen ("c:\\scope\\config\\setup.dat", "rb");
setup_size = fread (setup_string, sizeof(unsigned char),
SETUP_STR_SIZE, fp);
fclose (fp);
printf("Read setup string (%d bytes) from file.\n", setup_size);
/* Restore setup string. */
iprintf(id, ":SYSTEM:SETUP #8%08d", setup_size);
ifwrite(id, setup_string, setup_size, 1, &setup_size);
printf("Restored setup string (%d bytes).\n", setup_size);
/* IMAGE_TRANSFER - In this example we will query for the image
* data with ":DISPLAY:DATA?" to read the data and save the data
* to the file "image.dat" which you can then send to a printer.
*/
613
12 Programming Examples
itimeout(id, 30000);
printf("Transferring image to c:\\scope\\data\\screen.bmp\n");
img_size = IMG_SIZE;
ipromptf(id, ":DISPLAY:DATA? BMP8bit, SCREEN, COLOR\n", "%#b\n",
&img_size, image_data);
printf("Read display data query (%d bytes).\n", img_size);
/* Write image data to file. */
fp = fopen ("c:\\scope\\data\\screen.bmp", "wb");
img_size = fwrite(image_data, sizeof(unsigned char), img_size, fp);
fclose (fp);
printf("Wrote image data (%d bytes) to file.\n", img_size);
itimeout(id, 5000);
/* MEASURE - The commands in the MEASURE subsystem are used to
* make measurements on displayed waveforms.
*/
/* Set source to measure. */
iprintf(id, ":MEASURE:SOURCE CHANNEL1\n");
/* Query for frequency. */
ipromptf(id, ":MEASURE:FREQUENCY?\n", "%lf", &frequency);
printf("The frequency is: %.4f kHz\n", frequency / 1000);
/* Query for peak to peak voltage. */
ipromptf(id, ":MEASURE:VPP?\n", "%lf", &vpp);
printf("The peak to peak voltage is: %.2f V\n", vpp);
/* WAVEFORM_DATA - Get waveform data from oscilloscope.
*/
get_waveform();
/* Make
vdiv =
off
=
sdiv =
delay =
}
/*
614
Programming Examples
12
* get_waveform
* -----------------------------------------------------------------* This function transfers the data displayed on the oscilloscope to
* the computer for storage, plotting, or further analysis.
*/
void get_waveform (void)
{
int waveform_size;
/* WAVEFORM_DATA - To obtain waveform data, you must specify the
* WAVEFORM parameters for the waveform data prior to sending the
* ":WAVEFORM:DATA?" query.
*
* Once these parameters have been sent, the ":WAVEFORM:PREAMBLE?"
* query provides information concerning the vertical and horizontal
* scaling of the waveform data.
*
* With the preamble information you can then use the
* ":WAVEFORM:DATA?" query and read the data block in the
* correct format.
*/
/* WAVE_FORMAT - Sets the data transmission mode for waveform data
* output. This command controls how the data is formatted when
* sent from the oscilloscope and can be set to WORD or BYTE format.
*/
/* Set waveform format to BYTE. */
iprintf(id, ":WAVEFORM:FORMAT BYTE\n");
/* WAVE_POINTS - Sets the number of points to be transferred.
* The number of time points available is returned by the
* "ACQUIRE:POINTS?" query. This can be set to any binary
* fraction of the total time points available.
*/
iprintf(id, ":WAVEFORM:POINTS 1000\n");
/* GET_PREAMBLE - The preamble contains all of the current WAVEFORM
* settings returned in the form <preamble block><NL> where the
* <preamble block> is:
*
FORMAT
: int16 - 0 = BYTE, 1 = WORD, 2 = ASCII.
*
TYPE
: int16 - 0 = NORMAL, 1 = PEAK DETECT, 2 = AVERAGE.
*
POINTS
: int32 - number of data points transferred.
*
COUNT
: int32 - 1 and is always 1.
*
XINCREMENT : float64 - time difference between data points.
*
XORIGIN
: float64 - always the first data point in memory.
*
XREFERENCE : int32 - specifies the data point associated
*
with the x-origin.
*
YINCREMENT : float32 - voltage difference between data points.
*
YORIGIN
: float32 - value of the voltage at center screen.
*
YREFERENCE : int32 - data point where y-origin occurs.
*/
printf("Reading preamble\n");
ipromptf(id, ":WAVEFORM:PREAMBLE?\n", "%,10lf\n", preamble);
/*
printf("Preamble FORMAT: %e\n", preamble[0]);
615
12 Programming Examples
printf("Preamble
printf("Preamble
printf("Preamble
printf("Preamble
printf("Preamble
printf("Preamble
printf("Preamble
printf("Preamble
printf("Preamble
*/
616
Programming Examples
12
{
FILE *fp;
fp = fopen("c:\\scope\\data\\wave.dat", "wb");
/* Write preamble. */
fwrite(preamble, sizeof(preamble[0]), 10, fp);
/* Write actually waveform data. */
fwrite(waveform_data, sizeof(waveform_data[0]),
(int)preamble[2], fp);
fclose (fp);
}
/*
* retrieve_waveform
* -----------------------------------------------------------------* This function retrieves previously saved waveform data from a
* file called "wave.dat".
*/
void retrieve_waveform(void)
{
FILE *fp;
fp = fopen("c:\\scope\\data\\wave.dat", "rb");
/* Read preamble. */
fread (preamble, sizeof(preamble[0]), 10, fp);
/* Read the waveform data. */
fread (waveform_data, sizeof(waveform_data[0]),
(int)preamble[2], fp);
fclose (fp);
}
the changes.
7 Run the program.
617
12 Programming Examples
'
'
'
'
'
'
Option Explicit
Public id As Integer
618
Programming Examples
12
619
12 Programming Examples
620
Programming Examples
12
621
12 Programming Examples
Close hFile
' Close file.
MsgBox "Screen image written to " + strPath
' Download waveform data.
' ----------------------------------------------------------------Dim lngPoints As Long
Dim dblXIncrement As Double
Dim dblXOrigin As Double
Dim dblYIncrement As Double
Dim dblYOrigin As Double
Dim dblYReference As Double
' Set the waveform source.
DoCommand ":WAVeform:SOURce CHANnel1"
Debug.Print "Waveform source: " + _
DoQueryString(":WAVeform:SOURce?")
' Get the number of waveform points:
' How do you get max depth like when saving CSV from front panel?
dblQueryResult = DoQueryNumber(":WAVeform:POINts?")
lngPoints = dblQueryResult
Debug.Print "Waveform points, channel 1: " + _
CStr(lngPoints)
' Display the waveform settings:
dblXIncrement = DoQueryNumber(":WAVeform:XINCrement?")
Debug.Print "Waveform X increment, channel 1: " + _
Format(dblXIncrement, "Scientific")
dblXOrigin = DoQueryNumber(":WAVeform:XORigin?")
Debug.Print "Waveform X origin, channel 1: " + _
Format(dblXOrigin, "Scientific")
dblYIncrement = DoQueryNumber(":WAVeform:YINCrement?")
Debug.Print "Waveform Y increment, channel 1: " + _
Format(dblYIncrement, "Scientific")
dblYOrigin = DoQueryNumber(":WAVeform:YORigin?")
Debug.Print "Waveform Y origin, channel 1: " + _
Format(dblYOrigin, "Scientific")
dblYReference = DoQueryNumber(":WAVeform:YREFerence?")
Debug.Print "Waveform Y reference, channel 1: " + _
Format(dblYReference, "Scientific")
' Choose the format of the data returned (WORD, BYTE, ASCII):
DoCommand ":WAVeform:FORMat BYTE"
Debug.Print "Waveform format: " + _
DoQueryString(":WAVeform:FORMat?")
' Data in range 0 to 255.
Dim lngVSteps As Long
Dim intBytesPerData As Integer
lngVSteps = 256
intBytesPerData = 1
' Get the waveform data
Dim lngNumBytes As Long
lngNumBytes = DoQueryIEEEBlock_Bytes(":WAVeform:DATA?")
Debug.Print "Waveform data IEEEBlock bytes: " + CStr(lngNumBytes)
622
Programming Examples
12
623
12 Programming Examples
624
12
Programming Examples
End Function
Private Function DoQueryIEEEBlock_Bytes(query As String) As Long
On Error GoTo ErrorHandler
' Send query.
Call ivprintf(id, query + vbLf)
' Read definite-length block bytes.
Call ifread(id, byteArray(), ByteArraySize, vbNull, retCount)
' retCount is now actual number of bytes returned by read.
CheckForInstrumentErrors query
DoQueryIEEEBlock_Bytes = retCount
Exit Function
ErrorHandler:
MsgBox "*** Error : " + Error, vbExclamation
End
End Function
Private Sub CheckForInstrumentErrors(strCmdOrQuery As String)
On Error GoTo ErrorHandler
Dim strErrVal As String * 200
Dim strOut As String
Do
Call ivprintf(id, "SYSTem:ERRor?" + vbLf) ' Request error message.
Call ivscanf(id, "%200t", strErrVal) ' Read: Errno,"Error String".
If Val(strErrVal) <> 0 Then
strOut = strOut + "INST Error: " + RTrim(strErrVal) + vbLf
End If
Loop While Val(strErrVal) <> 0
' End if find: 0,"No Error".
If Not strOut = "" Then
MsgBox strOut, vbExclamation, "INST Error Messages, " + _
strCmdOrQuery
Call iflush(id, I_BUF_DISCARD_READ Or I_BUF_DISCARD_WRITE)
End If
Exit Sub
ErrorHandler:
MsgBox "*** Error: " + Error, vbExclamation
End Sub
625
12 Programming Examples
VISA Examples
"VISA Example in C" on page 626
"VISA Example in Visual Basic" on page 635
"VISA Example in C#" on page 645
"VISA Example in Visual Basic .NET" on page 659
VISA Example in C
To compile and run this example in Microsoft Visual Studio 2005:
1 Open Visual Studio.
2 Create a new Visual C++, Win32, Win32 Console Application project.
3 In the Win32 Application Wizard, click Next >. Then, check Empty
project directory.
5 In Visual Studio 2005, right- click the Source Files folder, choose Add >
Add Existing Item..., select the example.c file, and click Add.
6 Edit the program to use the VISA address of your oscilloscope.
7 Choose Project > Properties.... In the Property Pages dialog, update
Solutions.
c Show directories for Include files, and add the include directory (for
626
Programming Examples
12
/* For printf(). */
/* Agilent VISA routines. */
/* GPIB */
/* #define RESOURCE "GPIB0::7::INSTR" */
/* LAN */
/* #define RESOURCE "TCPIP0::a-mso6102-90541::inst0::INSTR" */
/* USB */
#define RESOURCE "USB0::2391::5970::30D3090541::0::INSTR"
#define
#define
#define
#define
WAVE_DATA_SIZE 5000
TIMEOUT
5000
SETUP_STR_SIZE
3000
IMG_SIZE
300000
/* Function prototypes */
void initialize(void);
void extra(void);
void capture(void);
void analyze(void);
void get_waveform(void);
void save_waveform(void);
void retrieve_waveform(void);
/* Global variables */
ViSession defaultRM, vi;
/* Device session ID. */
char buf[256] = { 0 };
/* Buffer for IDN string. */
unsigned char waveform_data[WAVE_DATA_SIZE];
/* Array for waveform
data. */
double preamble[10];
/* Array for preamble. */
void main(void)
{
/* Open session. */
viOpenDefaultRM(&defaultRM);
viOpen(defaultRM, RESOURCE, VI_NULL,VI_NULL, &vi);
printf ("Oscilloscope session initialized!\n");
/* Clear the interface. */
viClear(vi);
initialize();
/* The extras function contains miscellaneous commands that do not
* need to be executed for the proper operation of this example.
627
12 Programming Examples
628
Programming Examples
12
629
12 Programming Examples
630
/* Measurements. */
/* Values calculated from preamble
data. */
12
Programming Examples
int i;
/* Loop counter. */
unsigned char setup_string[SETUP_STR_SIZE];
/* Array for setup
string. */
int setup_size;
FILE *fp;
unsigned char image_data[IMG_SIZE];
* Array for image data. */
int img_size;
/* SAVE_SYSTEM_SETUP - The :SYSTEM:SETUP? query returns a program
* message that contains the current state of the instrument. Its
* format is a definite-length binary block, for example,
*
#800002204<setup string><NL>
* where the setup string is 2204 bytes in length.
*/
setup_size = SETUP_STR_SIZE;
/* Query and read setup string. */
viQueryf(vi, ":SYSTEM:SETUP?\n", "%#b\n", &setup_size, setup_string);
printf("Read setup string query (%d bytes).\n", setup_size);
/* Write setup string to file. */
fp = fopen ("c:\\scope\\config\\setup.dat", "wb");
setup_size = fwrite(setup_string, sizeof(unsigned char), setup_size,
fp);
fclose (fp);
printf("Wrote setup string (%d bytes) to file.\n", setup_size);
/* RESTORE_SYSTEM_SETUP - Uploads a previously saved setup string
* to the oscilloscope.
*/
/* Read setup string from file. */
fp = fopen ("c:\\scope\\config\\setup.dat", "rb");
setup_size = fread (setup_string, sizeof(unsigned char),
SETUP_STR_SIZE, fp);
fclose (fp);
printf("Read setup string (%d bytes) from file.\n", setup_size);
/* Restore setup string. */
viPrintf(vi, ":SYSTEM:SETUP #8%08d", setup_size);
viBufWrite(vi, setup_string, setup_size, &setup_size);
viPrintf(vi, "\n");
printf("Restored setup string (%d bytes).\n", setup_size);
/* IMAGE_TRANSFER - In this example we will query for the image
* data with ":DISPLAY:DATA?" to read the data and save the data
* to the file "image.dat" which you can then send to a printer.
*/
viSetAttribute(vi, VI_ATTR_TMO_VALUE, 30000);
printf("Transferring image to c:\\scope\\data\\screen.bmp\n");
img_size = IMG_SIZE;
viQueryf(vi, ":DISPLAY:DATA? BMP8bit, SCREEN, COLOR\n", "%#b\n",
&img_size, image_data);
printf("Read display data query (%d bytes).\n", img_size);
/* Write image data to file. */
fp = fopen ("c:\\scope\\data\\screen.bmp", "wb");
img_size = fwrite(image_data, sizeof(unsigned char), img_size, fp);
fclose (fp);
printf("Wrote image data (%d bytes) to file.\n", img_size);
viSetAttribute(vi, VI_ATTR_TMO_VALUE, 5000);
631
12 Programming Examples
}
/*
* get_waveform
* -----------------------------------------------------------------* This function transfers the data displayed on the oscilloscope to
* the computer for storage, plotting, or further analysis.
*/
void get_waveform (void)
{
int waveform_size;
/* WAVEFORM_DATA - To obtain waveform data, you must specify the
* WAVEFORM parameters for the waveform data prior to sending the
* ":WAVEFORM:DATA?" query.
632
Programming Examples
12
*
* Once these parameters have been sent, the ":WAVEFORM:PREAMBLE?"
* query provides information concerning the vertical and horizontal
* scaling of the waveform data.
*
* With the preamble information you can then use the
* ":WAVEFORM:DATA?" query and read the data block in the
* correct format.
*/
/* WAVE_FORMAT - Sets the data transmission mode for waveform data
* output. This command controls how the data is formatted when
* sent from the oscilloscope and can be set to WORD or BYTE format.
*/
/* Set waveform format to BYTE. */
viPrintf(vi, ":WAVEFORM:FORMAT BYTE\n");
/* WAVE_POINTS - Sets the number of points to be transferred.
* The number of time points available is returned by the
* "ACQUIRE:POINTS?" query. This can be set to any binary
* fraction of the total time points available.
*/
viPrintf(vi, ":WAVEFORM:POINTS 1000\n");
/* GET_PREAMBLE - The preamble contains all of the current WAVEFORM
* settings returned in the form <preamble block><NL> where the
* <preamble block> is:
*
FORMAT
: int16 - 0 = BYTE, 1 = WORD, 2 = ASCII.
*
TYPE
: int16 - 0 = NORMAL, 1 = PEAK DETECT, 2 = AVERAGE.
*
POINTS
: int32 - number of data points transferred.
*
COUNT
: int32 - 1 and is always 1.
*
XINCREMENT : float64 - time difference between data points.
*
XORIGIN
: float64 - always the first data point in memory.
*
XREFERENCE : int32 - specifies the data point associated
*
with the x-origin.
*
YINCREMENT : float32 - voltage difference between data points.
*
YORIGIN
: float32 - value of the voltage at center screen.
*
YREFERENCE : int32 - data point where y-origin occurs.
*/
printf("Reading preamble\n");
viQueryf(vi, ":WAVEFORM:PREAMBLE?\n", "%,10lf\n", preamble);
/*
printf("Preamble FORMAT: %e\n", preamble[0]);
printf("Preamble TYPE: %e\n", preamble[1]);
printf("Preamble POINTS: %e\n", preamble[2]);
printf("Preamble COUNT: %e\n", preamble[3]);
printf("Preamble XINCREMENT: %e\n", preamble[4]);
printf("Preamble XORIGIN: %e\n", preamble[5]);
printf("Preamble XREFERENCE: %e\n", preamble[6]);
printf("Preamble YINCREMENT: %e\n", preamble[7]);
printf("Preamble YORIGIN: %e\n", preamble[8]);
printf("Preamble YREFERENCE: %e\n", preamble[9]);
*/
/* QUERY_WAVE_DATA - Outputs waveform records to the controller
* over the interface that is stored in a buffer previously
633
12 Programming Examples
634
Programming Examples
12
* retrieve_waveform
* -----------------------------------------------------------------* This function retrieves previously saved waveform data from a
* file called "wave.dat".
*/
void retrieve_waveform(void)
{
FILE *fp;
fp = fopen("c:\\scope\\data\\wave.dat", "rb");
/* Read preamble. */
fread(preamble, sizeof(preamble[0]), 10, fp);
/* Read the waveform data. */
fread(waveform_data, sizeof(waveform_data[0]), (int)preamble[2],
fp);
fclose(fp);
}
the changes.
7 Run the program.
'
'
'
'
'
'
Option Explicit
Public err As Long
Public drm As Long
Public vi As Long
635
12 Programming Examples
MAIN PROGRAM
------------------------------------------------------------------This example shows the fundamental parts of a program (initialize,
capture, analyze).
The commands sent to the oscilloscope are written in both long and
short form. Both forms are acceptable.
The input signal is the probe compensation signal from the front
panel of the oscilloscope connected to channel 1.
If you are using a different signal or different channels, these
commands may not work as explained in the comments.
-------------------------------------------------------------------
Sub Main()
' Open the default resource manager session.
err = viOpenDefaultRM(drm)
'
'
'
'
'
'
'
'
'
'
636
12
Programming Examples
Initialize
------------------------------------------------------------------Initialize will start the program with the oscilloscope in a known
state. This is required because some uninitialized conditions could
cause the program to fail or not perform as expected.
In
-
637
12 Programming Examples
' CHANNEL_PROBE - Sets the probe attenuation factor for the selected
' channel. The probe attenuation factor may be set from 0.1 to 1000.
' Set Probe to 10:1.
err = viVPrintf(vi, ":CHAN1:PROBE 10" + vbLf, 0)
' CHANNEL_RANGE - Sets the full scale vertical range in volts.
' range value is 8 times the volts per division.
The
The
638
Programming Examples
'
12
Capture
------------------------------------------------------------------We will capture the waveform using the digitize command.
-------------------------------------------------------------------
639
12 Programming Examples
' enough time for the data acquisition process to collect data,
' and the results may not be accurate. An error value of 9.9E+37
' may be returned over the bus in this situation.
'
err = viVPrintf(vi, ":DIGITIZE CHAN1" + vbLf, 0)
End Sub
'
'
'
'
'
'
'
'
'
'
Analyze
------------------------------------------------------------------In analyze, we will do the following:
- Save the system setup to a file and restore it.
- Save the waveform data to a file on the computer.
- Make single channel measurements.
- Save the oscilloscope display to a file that can be sent to a
printer.
-------------------------------------------------------------------
640
12
Programming Examples
641
12 Programming Examples
642
Programming Examples
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
12
intType As Integer
lngPoints As Long
lngCount As Long
dblXIncrement As Double
dblXOrigin As Double
lngXReference As Long
sngYIncrement As Single
sngYOrigin As Single
lngYReference As Long
strOutput As String
643
12 Programming Examples
FormatNumber(((lngPoints / 2) * _
dblXIncrement + dblXOrigin) * 1000000) + " us" + vbCrLf
' QUERY_WAVE_DATA - Outputs waveform data that is stored in a buffer.
' Query the oscilloscope for the waveform data.
err = viVPrintf(vi, ":WAV:DATA?" + vbLf, 0)
' READ_WAVE_DATA - The wave data consists of two parts: the header,
' and the actual waveform data followed by a new line (NL) character.
' The query data has the following format:
'
'
<header><waveform_data><NL>
'
' Where:
'
'
<header> = #800001000 (This is an example header)
'
' The "#8" may be stripped off of the header and the remaining
' numbers are the size, in bytes, of the waveform data block. The
' size can vary depending on the number of points acquired for the
' waveform. You can then read that number of bytes from the
' oscilloscope and the terminating NL character.
'
'Dim lngI As Long
Dim lngDataValue As Long
paramsArray(1) = VarPtr(byteArray(0))
retCount = ByteArraySize
' Unsigned integer bytes.
err = viVScanf(vi, "%#b" + vbLf, paramsArray(0))
' retCount is now actual number of bytes returned by query.
For lngI = 0 To retCount - 1 Step (retCount / 20)
' 20 points.
If intBytesPerData = 2 Then
lngDataValue = CLng(byteArray(lngI)) * 256 + _
CLng(byteArray(lngI + 1))
' 16-bit value.
Else
lngDataValue = CLng(byteArray(lngI))
' 8-bit value.
End If
strOutput = strOutput + "Data point " + _
CStr(lngI / intBytesPerData) + ", " + _
FormatNumber((lngDataValue - lngYReference) * sngYIncrement + _
sngYOrigin) + " V, " + _
FormatNumber(((lngI / intBytesPerData - lngXReference) * _
dblXIncrement + dblXOrigin) * 1000000) + " us" + vbCrLf
Next lngI
MsgBox "Waveform data:" + vbCrLf + strOutput
' Make a delay measurement between channel 1 and 2.
Dim dblChan1Edge1 As Double
Dim dblChan2Edge1 As Double
Dim dblChan1Edge2 As Double
Dim dblDelay As Double
Dim dblPeriod As Double
Dim dblPhase As Double
' Query time at 1st rising edge on ch1.
644
Programming Examples
12
VISA Example in C#
To compile and run this example in Microsoft Visual Studio 2005:
1 Open Visual Studio.
2 Create a new Visual C#, Windows, Console Application project.
3 Cut- and- paste the code that follows into the C# source file.
4 Edit the program to use the VISA address of your oscilloscope.
645
12 Programming Examples
Add as Link.
You should now see the file underneath your project in the Solution
Explorer. It will have a little arrow icon in its lower left corner,
indicating that it is a link.
6 Build and run the program.
For more information, see the tutorial on using VISA in Microsoft .NET in
the VISA Help that comes with Agilent IO Libraries Suite 15.
/*
* Agilent VISA Example in C#
* ------------------------------------------------------------------* This program illustrates most of the commonly used programming
* features of your Agilent oscilloscopes.
* ------------------------------------------------------------------*/
using System;
using System.IO;
using System.Text;
namespace InfiniiVision
{
class VisaInstrumentApp
{
private static VisaInstrument oscp;
public static void Main(string[] args)
{
try
{
oscp = new
VisaInstrument("USB0::2391::5957::MY47250010::0::INSTR");
Initialize();
/* The extras function contains miscellaneous commands that
* do not need to be executed for the proper operation of
* this example. The commands in the extras function are
* shown for reference purposes only.
*/
// Extra();
// Uncomment to execute the extra function.
646
Programming Examples
12
Capture();
Analyze();
}
catch (System.ApplicationException err)
{
Console.WriteLine("*** VISA Error Message : " + err.Message);
}
catch (System.SystemException err)
{
Console.WriteLine("*** System Error Message : " + err.Message);
}
catch (System.Exception err)
{
System.Diagnostics.Debug.Fail("Unexpected Error");
Console.WriteLine("*** Unexpected Error : " + err.Message);
}
finally
{
oscp.Close();
}
}
/*
* Initialize()
* -------------------------------------------------------------* This function initializes both the interface and the
* oscilloscope to a known state.
*/
private static void Initialize()
{
StringBuilder strResults;
/* RESET - This command puts the oscilloscope into a known
* state. This statement is very important for programs to
* work as expected. Most of the following initialization
* commands are initialized by *RST. It is not necessary to
* reinitialize them unless the default setting is not suitable
* for your application.
*/
oscp.DoCommand("*RST");
// Reset the to the defaults.
oscp.DoCommand("*CLS");
// Clear the status data structures.
/* IDN - Ask for the device's *IDN string.
*/
strResults = oscp.DoQueryString("*IDN?");
// Display results.
Console.Write("Result is: {0}", strResults);
/* AUTOSCALE - This command evaluates all the input signals
* and sets the correct conditions to display all of the
* active signals.
*/
oscp.DoCommand(":AUToscale");
/* CHANNEL_PROBE - Sets the probe attenuation factor for the
* selected channel. The probe attenuation factor may be from
647
12 Programming Examples
* 0.1 to 1000.
*/
oscp.DoCommand(":CHANnel1:PROBe 10");
/* CHANNEL_RANGE - Sets the full scale vertical range in volts.
* The range value is eight times the volts per division.
*/
oscp.DoCommand(":CHANnel1:RANGe 8");
/* TIME_RANGE - Sets the full scale horizontal time in seconds.
* The range value is ten times the time per division.
*/
oscp.DoCommand(":TIMebase:RANGe 2e-3");
/* TIME_REFERENCE - Possible values are LEFT and CENTER:
* - LEFT sets the display reference one time division from
*
the left.
* - CENTER sets the display reference to the center of the
*
screen.
*/
oscp.DoCommand(":TIMebase:REFerence CENTer");
/* TRIGGER_SOURCE - Selects the channel that actually produces
* the TV trigger. Any channel can be selected.
*/
oscp.DoCommand(":TRIGger:TV:SOURCe CHANnel1");
/* TRIGGER_MODE - Set the trigger mode to, EDGE, GLITch,
* PATTern, CAN, DURation, IIC, LIN, SEQuence, SPI, TV,
* UART, or USB.
*/
oscp.DoCommand(":TRIGger:MODE EDGE");
/* TRIGGER_EDGE_SLOPE - Set the slope of the edge for the
* trigger to either POSITIVE or NEGATIVE.
*/
oscp.DoCommand(":TRIGger:EDGE:SLOPe POSitive");
}
/*
* Extra()
* -------------------------------------------------------------* The commands in this function are not executed and are shown
* for reference purposes only. To execute these commands, call
* this function from main.
*/
private static void Extra()
{
/* RUN_STOP (not executed in this example):
* - RUN starts the acquisition of data for the active
*
waveform display.
* - STOP stops the data acquisition and turns off AUTOSTORE.
*/
oscp.DoCommand(":RUN");
oscp.DoCommand(":STOP");
/* VIEW_BLANK (not executed in this example):
648
Programming Examples
12
649
12 Programming Examples
650
Programming Examples
12
*/
Console.WriteLine("Transferring screen image to " +
"c:\\scope\\data\\screen.png");
if (File.Exists("c:\\scope\\data\\screen.png"))
File.Delete("c:\\scope\\data\\screen.png");
// Increase I/O timeout to fifteen seconds.
oscp.SetTimeoutSeconds(15);
// Get the screen data in PNG format.
nLength = oscp.DoQueryIEEEBlock(
":DISPlay:DATA? PNG, SCReen, COLor", out ResultsArray);
Console.WriteLine("Read screen image ({0} bytes).", nLength);
// Store the screen data in a file.
File.WriteAllBytes("c:\\scope\\data\\screen.png",
ResultsArray);
Console.WriteLine("Wrote screen image ({0} bytes) to file.",
nLength);
// Return I/O timeout to five seconds.
oscp.SetTimeoutSeconds(5);
/* MEASURE - The commands in the MEASURE subsystem are used to
* make measurements on displayed waveforms.
*/
// Set source to measure.
oscp.DoCommand(":MEASure:SOURce CHANnel1");
// Query for frequency.
double fResults;
fResults = oscp.DoQueryValue(":MEASure:FREQuency?");
Console.WriteLine("The frequency is: {0:F4} kHz",
fResults / 1000);
// Query for peak to peak voltage.
fResults = oscp.DoQueryValue(":MEASure:VPP?");
Console.WriteLine("The peak to peak voltage is: {0:F2} V",
fResults);
/* WAVEFORM_DATA - Get waveform data from oscilloscope. To
* obtain waveform data, you must specify the WAVEFORM
* parameters for the waveform data prior to sending the
* ":WAVEFORM:DATA?" query.
*
* Once these parameters have been sent, the
* ":WAVEFORM:PREAMBLE?" query provides information concerning
* the vertical and horizontal scaling of the waveform data.
*
* With the preamble information you can then use the
* ":WAVEFORM:DATA?" query and read the data block in the
* correct format.
*/
/* WAVE_FORMAT - Sets the data transmission mode for waveform
* data output. This command controls how the data is
651
12 Programming Examples
652
Programming Examples
12
653
12 Programming Examples
+ "{2:f10} Seconds", i,
((float)ResultsArray[i] - fYreference) * fYincrement +
fYorigin,
((float)i - fXreference) * fXincrement + fXorigin);
/* SAVE_WAVE_DATA - saves the waveform data to a CSV format
* file named "waveform.csv".
*/
if (File.Exists("c:\\scope\\data\\waveform.csv"))
File.Delete("c:\\scope\\data\\waveform.csv");
StreamWriter writer =
File.CreateText("c:\\scope\\data\\waveform.csv");
for (int i = 0; i < 1000; i++)
writer.WriteLine("{0:E}, {1:f6}",
((float)i - fXreference) * fXincrement + fXorigin,
((float)ResultsArray[i] - fYreference) * fYincrement +
fYorigin);
writer.Close();
}
}
class VisaInstrument
{
private int m_nResourceManager;
private int m_nSession;
private string m_strVisaAddress;
// Constructor.
public VisaInstrument(string strVisaAddress)
{
// Save VISA addres in member variable.
m_strVisaAddress = strVisaAddress;
// Open the default VISA resource manager.
OpenResourceManager();
// Open a VISA resource session.
OpenSession();
// Clear the interface.
int nViStatus;
nViStatus = visa32.viClear(m_nSession);
}
public void DoCommand(string strCommand)
{
// Send the command.
VisaSendCommandOrQuery(strCommand);
// Check for instrument errors (another command and result).
CheckForInstrumentErrors(strCommand);
}
public int DoCommandIEEEBlock(string strCommand,
byte[] DataArray)
{
654
Programming Examples
12
655
12 Programming Examples
}
public double[] DoQueryValues(string strQuery)
{
// Send the query.
VisaSendCommandOrQuery(strQuery);
// Get the result string.
double[] fResultsArray;
fResultsArray = VisaGetResultValues();
// Check for instrument errors (another command and result).
CheckForInstrumentErrors(strQuery);
// Return string results.
return fResultsArray;
}
public int DoQueryIEEEBlock(string strQuery,
out byte[] ResultsArray)
{
// Send the query.
VisaSendCommandOrQuery(strQuery);
// Get the result string.
int length;
// Number of bytes returned from instrument.
length = VisaGetResultIEEEBlock(out ResultsArray);
// Check for instrument errors (another command and result).
CheckForInstrumentErrors(strQuery);
// Return string results.
return length;
}
private void CheckForInstrumentErrors(string strCommand)
{
// Check for instrument errors.
StringBuilder strInstrumentError = new StringBuilder(1000);
bool bFirstError = true;
do
{
VisaSendCommandOrQuery(":SYSTem:ERRor?");
strInstrumentError = VisaGetResultString();
if (strInstrumentError.ToString() != "+0,\"No error\"\n")
{
if (bFirstError)
{
Console.WriteLine("ERROR(s) for command '{0}': ",
strCommand);
bFirstError = false;
}
Console.Write(strInstrumentError);
}
} while (strInstrumentError.ToString() != "+0,\"No error\"\n");
}
656
Programming Examples
12
657
12 Programming Examples
length = 300000;
// Read return value string from the device.
int nViStatus;
nViStatus = visa32.viScanf(m_nSession, "%#b", ref length,
ResultsArray);
CheckVisaStatus(nViStatus);
// Write and read buffers need to be flushed after IEEE block?
nViStatus = visa32.viFlush(m_nSession, visa32.VI_WRITE_BUF);
CheckVisaStatus(nViStatus);
nViStatus = visa32.viFlush(m_nSession, visa32.VI_READ_BUF);
CheckVisaStatus(nViStatus);
return length;
}
private void OpenResourceManager()
{
int nViStatus;
nViStatus =
visa32.viOpenDefaultRM(out this.m_nResourceManager);
if (nViStatus < visa32.VI_SUCCESS)
throw new
ApplicationException("Failed to open Resource Manager");
}
private void OpenSession()
{
int nViStatus;
nViStatus = visa32.viOpen(this.m_nResourceManager,
this.m_strVisaAddress, visa32.VI_NO_LOCK,
visa32.VI_TMO_IMMEDIATE, out this.m_nSession);
CheckVisaStatus(nViStatus);
}
public void SetTimeoutSeconds(int nSeconds)
{
int nViStatus;
nViStatus = visa32.viSetAttribute(this.m_nSession,
visa32.VI_ATTR_TMO_VALUE, nSeconds * 1000);
CheckVisaStatus(nViStatus);
}
public void CheckVisaStatus(int nViStatus)
{
// If VISA error, throw exception.
if (nViStatus < visa32.VI_SUCCESS)
{
StringBuilder strError = new StringBuilder(256);
visa32.viStatusDesc(this.m_nResourceManager, nViStatus,
strError);
throw new ApplicationException(strError.ToString());
}
}
public void Close()
658
Programming Examples
12
{
if (m_nSession != 0)
visa32.viClose(m_nSession);
if (m_nResourceManager != 0)
visa32.viClose(m_nResourceManager);
}
}
}
file.
4 Edit the program to use the VISA address of your oscilloscope.
5 Add Agilent's VISA header file to your project:
a Right- click the project you wish to modify (not the solution) in the
Add as Link.
You should now see the file underneath your project in the Solution
Explorer. It will have a little arrow icon in its lower left corner,
indicating that it is a link.
e Right- click the project again and choose Properties; then, select
For more information, see the tutorial on using VISA in Microsoft .NET in
the VISA Help that comes with Agilent IO Libraries Suite 15.
'
'
'
'
'
'
Imports System
Imports System.IO
659
12 Programming Examples
Imports System.Text
Namespace InfiniiVision
Class VisaInstrumentApp
Private Shared oscp As VisaInstrument
Public Shared Sub Main(ByVal args As String())
Try
oscp = _
New VisaInstrument("USB0::2391::5957::MY47250010::0::INSTR")
Initialize()
'
'
'
'
' Extra()
' Uncomment to execute the extra function.
Capture()
Analyze()
Catch err As System.ApplicationException
MsgBox("*** Error : " & err.Message, vbExclamation, _
"VISA Error Message")
Exit Sub
Catch err As System.SystemException
MsgBox("*** Error : " & err.Message, vbExclamation, _
"System Error Message")
Exit Sub
Catch err As System.Exception
Debug.Fail("Unexpected Error")
MsgBox("*** Error : " & err.Message, vbExclamation, _
"Unexpected Error")
Exit Sub
Finally
oscp.Close()
End Try
End Sub
'
'
'
'
Initialize()
-------------------------------------------------------------This function initializes both the interface and the
oscilloscope to a known state.
660
Programming Examples
12
oscp.DoCommand("*CLS")
' IDN - Ask for the device's *IDN string.
strResults = oscp.DoQueryString("*IDN?")
' Display results.
Console.Write("Result is: {0}", strResults)
' AUTOSCALE - This command evaluates all the input signals
' and sets the correct conditions to display all of the
' active signals.
oscp.DoCommand(":AUToscale")
' CHANNEL_PROBE - Sets the probe attenuation factor for the
' selected channel. The probe attenuation factor may be from
' 0.1 to 1000.
oscp.DoCommand(":CHANnel1:PROBe 10")
' CHANNEL_RANGE - Sets the full scale vertical range in volts.
' The range value is eight times the volts per division.
oscp.DoCommand(":CHANnel1:RANGe 8")
' TIME_RANGE - Sets the full scale horizontal time in seconds.
' The range value is ten times the time per division.
oscp.DoCommand(":TIMebase:RANGe 2e-3")
' TIME_REFERENCE - Possible values are LEFT and CENTER:
' - LEFT sets the display reference one time division from
'
the left.
' - CENTER sets the display reference to the center of the
'
screen.
oscp.DoCommand(":TIMebase:REFerence CENTer")
' TRIGGER_SOURCE - Selects the channel that actually produces
' the TV trigger. Any channel can be selected.
oscp.DoCommand(":TRIGger:TV:SOURCe CHANnel1")
' TRIGGER_MODE - Set the trigger mode to, EDGE, GLITch,
' PATTern, CAN, DURation, IIC, LIN, SEQuence, SPI, TV,
' UART, or USB.
oscp.DoCommand(":TRIGger:MODE EDGE")
' TRIGGER_EDGE_SLOPE - Set the slope of the edge for the
' trigger to either POSITIVE or NEGATIVE.
oscp.DoCommand(":TRIGger:EDGE:SLOPe POSitive")
End Sub
'
'
'
'
'
Extra()
-------------------------------------------------------------The commands in this function are not executed and are shown
for reference purposes only. To execute these commands, call
this function from main.
661
12 Programming Examples
Capture()
-------------------------------------------------------------This function prepares the scope for data acquisition and then
uses the DIGITIZE MACRO to capture some data.
'
'
'
'
'
'
'
'
'
'
'
'
oscp.DoCommand(":DIGitize CHANnel1")
End Sub
662
Programming Examples
12
' Analyze()
' -------------------------------------------------------------' In this example we will do the following:
' - Save the system setup to a file for restoration at a later
'
time.
' - Save the oscilloscope display to a file which can be
'
printed.
' - Make single channel measurements.
Private Shared Sub Analyze()
' Results array.
Dim ResultsArray As Byte()
' Number of bytes returned from instrument.
Dim nLength As Integer
' SAVE_SYSTEM_SETUP - The :SYSTem:SETup? query returns a
' program message that contains the current state of the
' instrument. Its format is a definite-length binary block,
' for example,
'
#800002204<setup string><NL>
' where the setup string is 2204 bytes in length.
Console.WriteLine("Saving oscilloscope setup to " _
+ "c:\scope\config\setup.dat")
If File.Exists("c:\scope\config\setup.dat") Then
File.Delete("c:\scope\config\setup.dat")
End If
' Query and read setup string.
nLength = oscp.DoQueryIEEEBlock(":SYSTem:SETup?", ResultsArray)
Console.WriteLine("Read oscilloscope setup ({0} bytes).", _
nLength)
' Write setup string to file.
File.WriteAllBytes("c:\scope\config\setup.dat", ResultsArray)
Console.WriteLine("Wrote setup string ({0} bytes) to file.", _
nLength)
' RESTORE_SYSTEM_SETUP - Uploads a previously saved setup
' string to the oscilloscope.
Dim DataArray As Byte()
Dim nBytesWritten As Integer
' Read setup string from file.
DataArray = File.ReadAllBytes("c:\scope\config\setup.dat")
Console.WriteLine("Read setup string ({0} bytes) from file.", _
DataArray.Length)
' Restore setup string.
nBytesWritten = oscp.DoCommandIEEEBlock(":SYSTem:SETup", _
DataArray)
Console.WriteLine("Restored setup string ({0} bytes).", _
nBytesWritten)
' IMAGE_TRANSFER - In this example, we query for the screen
' data with the ":DISPLAY:DATA?" query. The .png format
663
12 Programming Examples
664
Programming Examples
12
665
12 Programming Examples
The "#8" may be stripped off of the header and the remaining
numbers are the size, in bytes, of the waveform data block.
The size can vary depending on the number of points acquired
for the waveform which can be set using the
":WAVEFORM:POINTS" command. You may then read that number
of bytes from the oscilloscope; then, read the following NL
character to terminate the query.
666
Programming Examples
12
667
12 Programming Examples
668
Programming Examples
12
669
12 Programming Examples
CheckVisaStatus(nViStatus)
End Sub
Private Function VisaGetResultString() As StringBuilder
Dim strResults As New StringBuilder(1000)
' Read return value string from the device.
Dim nViStatus As Integer
nViStatus = visa32.viScanf(m_nSession, "%1000t", strResults)
CheckVisaStatus(nViStatus)
Return strResults
End Function
Private Function VisaGetResultValue() As Double
Dim fResults As Double = 0
' Read return value string from the device.
Dim nViStatus As Integer
nViStatus = visa32.viScanf(m_nSession, "%lf", fResults)
CheckVisaStatus(nViStatus)
Return fResults
End Function
Private Function VisaGetResultValues() As Double()
Dim fResultsArray As Double()
fResultsArray = New Double(9) {}
' Read return value string from the device.
Dim nViStatus As Integer
nViStatus = visa32.viScanf(m_nSession, _
"%,10lf" & Chr(10) & "", fResultsArray)
CheckVisaStatus(nViStatus)
Return fResultsArray
End Function
Private Function VisaGetResultIEEEBlock(ByRef ResultsArray _
As Byte()) As Integer
' Results array, big enough to hold a PNG.
ResultsArray = New Byte(299999) {}
Dim length As Integer
' Number of bytes returned from instrument.
' Set the default number of bytes that will be contained in
' the ResultsArray to 300,000 (300kB).
length = 300000
' Read return value string from the device.
Dim nViStatus As Integer
nViStatus = visa32.viScanf(m_nSession, "%#b", length, _
ResultsArray)
CheckVisaStatus(nViStatus)
' Write and read buffers need to be flushed after IEEE block?
nViStatus = visa32.viFlush(m_nSession, visa32.VI_WRITE_BUF)
CheckVisaStatus(nViStatus)
670
Programming Examples
12
671
12 Programming Examples
the changes.
7 Run the program.
'
'
'
'
'
'
Option Explicit
Public
Public
Public
Public
'
'
'
'
'
'
'
'
'
'
'
672
myMgr As VisaComLib.ResourceManager
myScope As VisaComLib.FormattedIO488
varQueryResult As Variant
strQueryResult As String
MAIN PROGRAM
------------------------------------------------------------------This example shows the fundamental parts of a program (initialize,
capture, analyze).
The commands sent to the oscilloscope are written in both long and
short form. Both forms are acceptable.
The input signal is the probe compensation signal from the front
panel of the oscilloscope connected to channel 1.
12
Programming Examples
'
' If you are using a different signal or different channels, these
' commands may not work as explained in the comments.
' ------------------------------------------------------------------Sub Main()
On Error GoTo VisaComError
' Create the VISA COM I/O resource.
Set myMgr = New VisaComLib.ResourceManager
Set myScope = New VisaComLib.FormattedIO488
' GPIB.
'Set myScope.IO = myMgr.Open("GPIB0::7::INSTR")
' LAN.
'Set myScope.IO = myMgr.Open("TCPIP0::a-mso6102-90541::inst0::INSTR")
' USB.
Set myScope.IO = myMgr.Open("USB0::2391::5970::30D3090541::0::INSTR")
' Initialize - Initialization will start the program with the
' oscilloscope in a known state.
Initialize
' Capture - After initialization, you must make waveform data
' available to analyze. To do this, capture the data using the
' DIGITIZE command.
Capture
' Analyze - Once the waveform has been captured, it can be analyzed.
' There are many parts of a waveform to analyze. This example shows
' some of the possible ways to analyze various parts of a waveform.
Analyze
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End Sub
'
'
'
'
'
'
'
'
'
'
'
'
'
'
Initialize
------------------------------------------------------------------Initialize will start the program with the oscilloscope in a known
state. This is required because some uninitialized conditions could
cause the program to fail or not perform as expected.
In
-
673
12 Programming Examples
' There are also some additional initialization commands, which are
' not used, but shown for reference.
' ------------------------------------------------------------------Private Sub Initialize()
On Error GoTo VisaComError
' Clear the interface.
myScope.IO.Clear
' RESET - This command puts the oscilloscope into a known state.
' This statement is very important for programs to work as expected.
' Most of the following initialization commands are initialized by
' *RST. It is not necessary to reinitialize them unless the default
' setting is not suitable for your application.
myScope.WriteString "*RST"
' Reset the oscilloscope to the defaults.
' AUTOSCALE - This command evaluates all the input signals and sets
' the correct conditions to display all of the active signals.
' Same as pressing the Autoscale key.
myScope.WriteString ":AUTOSCALE"
' CHANNEL_PROBE - Sets the probe attenuation factor for the selected
' channel. The probe attenuation factor may be set from 0.1 to 1000.
myScope.WriteString ":CHAN1:PROBE 10"
' Set Probe to 10:1.
' CHANNEL_RANGE - Sets the full scale vertical range in volts.
' range value is 8 times the volts per division.
The
The
674
Programming Examples
12
' TRIGGER_EDGE_SLOPE - Sets the slope of the edge for the trigger.
' Set the slope to positive.
myScope.WriteString ":TRIGGER:EDGE:SLOPE POSITIVE"
' The following commands are not executed and are shown for reference
' purposes only. To execute these commands, uncomment them.
' RUN_STOP - (not executed in this example)
' - RUN starts the acquisition of data for the active waveform
'
display.
' - STOP stops the data acquisition and turns off AUTOSTORE.
' myScope.WriteString ":RUN"
' Start data acquisition.
' myScope.WriteString ":STOP"
' Stop the data acquisition.
' VIEW_BLANK - (not executed in this example)
' - VIEW turns on (starts displaying) a channel or pixel memory.
' - BLANK turns off (stops displaying) a channel or pixel memory.
' myScope.WriteString ":BLANK CHANNEL1"
' Turn channel 1 off.
' myScope.WriteString ":VIEW CHANNEL1"
' Turn channel 1 on.
' TIMEBASE_MODE - (not executed in this example)
' Set the time base mode to MAIN, DELAYED, XY, or ROLL.
' Set time base mode to main.
' myScope.WriteString ":TIMEBASE:MODE MAIN"
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End Sub
'
'
'
'
'
Capture
------------------------------------------------------------------We will capture the waveform using the digitize command.
-------------------------------------------------------------------
675
12 Programming Examples
'
' NOTE! The DIGITIZE command is highly recommended for triggering
' modes other than SINGLE. This ensures that sufficient data is
' available for measurement. If DIGITIZE is used with single mode,
' the completion criteria may never be met. The number of points
' gathered in Single mode is related to the sweep speed, memory
' depth, and maximum sample rate. For example, take an oscilloscope
' with a 1000-point memory, a sweep speed of 10 us/div (100 us
' total time across the screen), and a 20 MSa/s maximum sample rate.
' 1000 divided by 100 us equals 10 MSa/s. Because this number is
' less than or equal to the maximum sample rate, the full 1000 points
' will be digitized in a single acquisition. Now, use 1 us/div
' (10 us across the screen). 1000 divided by 10 us equals 100 MSa/s;
' because this is greater than the maximum sample rate by 5 times,
' only 400 points (or 1/5 the points) can be gathered on a single
' trigger. Keep in mind when the oscilloscope is running,
' communication with the computer interrupts data acquisition.
' Setting up the oscilloscope over the bus causes the data buffers
' to be cleared and internal hardware to be reconfigured. If a
' measurement is immediately requested, there may have not been
' enough time for the data acquisition process to collect data,
' and the results may not be accurate. An error value of 9.9E+37
' may be returned over the bus in this situation.
'
myScope.WriteString ":DIGITIZE CHAN1"
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End Sub
'
'
'
'
'
'
'
'
'
'
Analyze
------------------------------------------------------------------In analyze, we will do the following:
- Save the system setup to a file and restore it.
- Save the waveform data to a file on the computer.
- Make single channel measurements.
- Save the oscilloscope display to a file that can be sent to a
printer.
-------------------------------------------------------------------
676
12
Programming Examples
677
12 Programming Examples
678
Programming Examples
'
'
'
'
'
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
YINCREMENT
YORIGIN
YREFERENCE
12
x-origin.
: float32 - voltage difference between data points.
: float32 - value is the voltage at center screen.
: int32 - specifies the data point where y-origin
occurs.
Preamble()
intFormat As Integer
intType As Integer
lngPoints As Long
lngCount As Long
dblXIncrement As Double
dblXOrigin As Double
lngXReference As Long
sngYIncrement As Single
sngYOrigin As Single
lngYReference As Long
strOutput As String
myScope.WriteString ":WAVEFORM:PREAMBLE?"
' Query for the preamble.
Preamble() = myScope.ReadList
' Read preamble information.
intFormat = Preamble(0)
intType = Preamble(1)
lngPoints = Preamble(2)
lngCount = Preamble(3)
dblXIncrement = Preamble(4)
dblXOrigin = Preamble(5)
lngXReference = Preamble(6)
sngYIncrement = Preamble(7)
sngYOrigin = Preamble(8)
lngYReference = Preamble(9)
strOutput = ""
'strOutput = strOutput + "Format = " + CStr(intFormat) + vbCrLf
'strOutput = strOutput + "Type = " + CStr(intType) + vbCrLf
'strOutput = strOutput + "Points = " + CStr(lngPoints) + vbCrLf
'strOutput = strOutput + "Count = " + CStr(lngCount) + vbCrLf
'strOutput = strOutput + "X increment = " + _
'
FormatNumber(dblXIncrement * 1000000) + _
'
" us" + vbCrLf
'strOutput = strOutput + "X origin = " + _
'
FormatNumber(dblXOrigin * 1000000) + _
'
" us" + vbCrLf
'strOutput = strOutput + "X reference = " + _
'
CStr(lngXReference) + vbCrLf
'strOutput = strOutput + "Y increment = " + _
'
FormatNumber(sngYIncrement * 1000) + _
'
" mV" + vbCrLf
'strOutput = strOutput + "Y origin = " + _
'
FormatNumber(sngYOrigin) + " V" + vbCrLf
'strOutput = strOutput + "Y reference = " + _
'
CStr(lngYReference) + vbCrLf
strOutput = strOutput + "Volts/Div = " + _
FormatNumber(lngVSteps * sngYIncrement / 8) + _
" V" + vbCrLf
strOutput = strOutput + "Offset = " + _
FormatNumber(sngYOrigin) + " V" + vbCrLf
strOutput = strOutput + "Sec/Div = " + _
FormatNumber(lngPoints * dblXIncrement / 10 * _
679
12 Programming Examples
680
12
Programming Examples
681
12 Programming Examples
End If
Exit Sub
VisaComError:
MsgBox "VISA COM Error: " + vbCrLf + Err.Description
End Sub
For more information, see the VISA COM Help that comes with Agilent IO
Libraries Suite 15.
/*
* Agilent VISA COM Example in C#
* ------------------------------------------------------------------* This program illustrates most of the commonly used programming
* features of your Agilent oscilloscopes.
* ------------------------------------------------------------------*/
using
using
using
using
using
System;
System.IO;
System.Text;
Ivi.Visa.Interop;
System.Runtime.InteropServices;
namespace InfiniiVision
{
class VisaComInstrumentApp
{
private static VisaComInstrument myScope;
public static void Main(string[] args)
682
12
Programming Examples
{
try
{
myScope = new
VisaComInstrument("USB0::2391::5957::MY47250010::0::INSTR");
Initialize();
/* The extras function contains miscellaneous commands that
* do not need to be executed for the proper operation of
* this example. The commands in the extras function are
* shown for reference purposes only.
*/
// Extra();
// Uncomment to execute the extra function.
Capture();
Analyze();
}
catch (System.ApplicationException err)
{
Console.WriteLine("*** VISA Error Message : " + err.Message);
}
catch (System.SystemException err)
{
Console.WriteLine("*** System Error Message : " + err.Message);
}
catch (System.Exception err)
{
System.Diagnostics.Debug.Fail("Unexpected Error");
Console.WriteLine("*** Unexpected Error : " + err.Message);
}
finally
{
myScope.Close();
}
}
/*
* Initialize()
* -------------------------------------------------------------* This function initializes both the interface and the
* oscilloscope to a known state.
*/
private static void Initialize()
{
string strResults;
/* RESET - This command puts the oscilloscope into a known
* state. This statement is very important for programs to
* work as expected. Most of the following initialization
* commands are initialized by *RST. It is not necessary to
* reinitialize them unless the default setting is not suitable
* for your application.
*/
myScope.DoCommand("*RST");
// Reset the to the defaults.
myScope.DoCommand("*CLS");
// Clear the status data structures.
/* IDN - Ask for the device's *IDN string.
683
12 Programming Examples
*/
strResults = myScope.DoQueryString("*IDN?");
// Display results.
Console.Write("Result is: {0}", strResults);
/* AUTOSCALE - This command evaluates all the input signals
* and sets the correct conditions to display all of the
* active signals.
*/
myScope.DoCommand(":AUToscale");
/* CHANNEL_PROBE - Sets the probe attenuation factor for the
* selected channel. The probe attenuation factor may be from
* 0.1 to 1000.
*/
myScope.DoCommand(":CHANnel1:PROBe 10");
/* CHANNEL_RANGE - Sets the full scale vertical range in volts.
* The range value is eight times the volts per division.
*/
myScope.DoCommand(":CHANnel1:RANGe 8");
/* TIME_RANGE - Sets the full scale horizontal time in seconds.
* The range value is ten times the time per division.
*/
myScope.DoCommand(":TIMebase:RANGe 2e-3");
/* TIME_REFERENCE - Possible values are LEFT and CENTER:
* - LEFT sets the display reference one time division from
*
the left.
* - CENTER sets the display reference to the center of the
*
screen.
*/
myScope.DoCommand(":TIMebase:REFerence CENTer");
/* TRIGGER_SOURCE - Selects the channel that actually produces
* the TV trigger. Any channel can be selected.
*/
myScope.DoCommand(":TRIGger:TV:SOURCe CHANnel1");
/* TRIGGER_MODE - Set the trigger mode to, EDGE, GLITch,
* PATTern, CAN, DURation, IIC, LIN, SEQuence, SPI, TV,
* UART, or USB.
*/
myScope.DoCommand(":TRIGger:MODE EDGE");
/* TRIGGER_EDGE_SLOPE - Set the slope of the edge for the
* trigger to either POSITIVE or NEGATIVE.
*/
myScope.DoCommand(":TRIGger:EDGE:SLOPe POSitive");
}
/*
* Extra()
* -------------------------------------------------------------* The commands in this function are not executed and are shown
684
Programming Examples
12
685
12 Programming Examples
686
Programming Examples
12
DataArray = File.ReadAllBytes("c:\\scope\\config\\setup.dat");
Console.WriteLine("Read setup string ({0} bytes) from file.",
DataArray.Length);
// Restore setup string.
myScope.DoCommandIEEEBlock(":SYSTem:SETup", DataArray);
Console.WriteLine("Restored setup string.");
/* IMAGE_TRANSFER - In this example, we query for the screen
* data with the ":DISPLAY:DATA?" query. The .png format
* data is saved to a file in the local file system.
*/
Console.WriteLine("Transferring screen image to " +
"c:\\scope\\data\\screen.png");
if (File.Exists("c:\\scope\\data\\screen.png"))
File.Delete("c:\\scope\\data\\screen.png");
// Increase I/O timeout to fifteen seconds.
myScope.SetTimeoutSeconds(15);
// Get the screen data in PNG format.
ResultsArray = myScope.DoQueryIEEEBlock(
":DISPlay:DATA? PNG, SCReen, COLor");
nBytes = ResultsArray.Length;
Console.WriteLine("Read screen image ({0} bytes).", nBytes);
// Store the screen data in a file.
File.WriteAllBytes("c:\\scope\\data\\screen.png",
ResultsArray);
Console.WriteLine("Wrote screen image ({0} bytes) to file.",
nBytes);
// Return I/O timeout to five seconds.
myScope.SetTimeoutSeconds(5);
/* MEASURE - The commands in the MEASURE subsystem are used to
* make measurements on displayed waveforms.
*/
// Set source to measure.
myScope.DoCommand(":MEASure:SOURce CHANnel1");
// Query for frequency.
double fResults;
fResults = myScope.DoQueryValue(":MEASure:FREQuency?");
Console.WriteLine("The frequency is: {0:F4} kHz",
fResults / 1000);
// Query for peak to peak voltage.
fResults = myScope.DoQueryValue(":MEASure:VPP?");
Console.WriteLine("The peak to peak voltage is: {0:F2} V",
fResults);
/*
*
*
*
687
12 Programming Examples
*
* Once these parameters have been sent, the
* ":WAVEFORM:PREAMBLE?" query provides information concerning
* the vertical and horizontal scaling of the waveform data.
*
* With the preamble information you can then use the
* ":WAVEFORM:DATA?" query and read the data block in the
* correct format.
*/
/* WAVE_FORMAT - Sets the data transmission mode for waveform
* data output. This command controls how the data is
* formatted when sent from the oscilloscope and can be set
* to WORD or BYTE format.
*/
// Set waveform format to BYTE.
myScope.DoCommand(":WAVeform:FORMat BYTE");
/* WAVE_POINTS - Sets the number of points to be transferred.
* The number of time points available is returned by the
* "ACQUIRE:POINTS?" query. This can be set to any binary
* fraction of the total time points available.
*/
myScope.DoCommand(":WAVeform:POINts 1000");
/* GET_PREAMBLE - The preamble contains all of the current
* WAVEFORM settings returned in the form <preamble block><NL>
* where the <preamble block> is:
*
FORMAT
: int16 - 0 = BYTE, 1 = WORD, 2 = ASCII.
*
TYPE
: int16 - 0 = NORMAL, 1 = PEAK DETECT,
*
2 = AVERAGE.
*
POINTS
: int32 - number of data points transferred.
*
COUNT
: int32 - 1 and is always 1.
*
XINCREMENT : float64 - time difference between data
*
points.
*
XORIGIN
: float64 - always the first data point in
*
memory.
*
XREFERENCE : int32 - specifies the data point associated
*
with the x-origin.
*
YINCREMENT : float32 - voltage difference between data
*
points.
*
YORIGIN
: float32 - value of the voltage at center
*
screen.
*
YREFERENCE : int32 - data point where y-origin occurs.
*/
Console.WriteLine("Reading preamble.");
double[] fResultsArray;
fResultsArray = myScope.DoQueryValues(":WAVeform:PREamble?");
double fFormat = fResultsArray[0];
Console.WriteLine("Preamble FORMat: {0:e}", fFormat);
double fType = fResultsArray[1];
Console.WriteLine("Preamble TYPE: {0:e}", fType);
double fPoints = fResultsArray[2];
688
Programming Examples
12
689
12 Programming Examples
690
Programming Examples
12
}
public void DoCommand(string strCommand)
{
// Send the command.
m_IoObject.WriteString(strCommand, true);
// Check for instrument errors.
CheckForInstrumentErrors(strCommand);
}
public string DoQueryString(string strQuery)
{
// Send the query.
m_IoObject.WriteString(strQuery, true);
// Get the result string.
string strResults;
strResults = m_IoObject.ReadString();
// Check for instrument errors.
CheckForInstrumentErrors(strQuery);
// Return results string.
return strResults;
}
public double DoQueryValue(string strQuery)
{
// Send the query.
m_IoObject.WriteString(strQuery, true);
// Get the result number.
double fResult;
fResult = (double)m_IoObject.ReadNumber(
IEEEASCIIType.ASCIIType_R8, true);
// Check for instrument errors.
CheckForInstrumentErrors(strQuery);
// Return result number.
return fResult;
}
public double[] DoQueryValues(string strQuery)
{
// Send the query.
m_IoObject.WriteString(strQuery, true);
// Get the result numbers.
double[] fResultsArray;
fResultsArray = (double[])m_IoObject.ReadList(
IEEEASCIIType.ASCIIType_R8, ",;");
// Check for instrument errors.
CheckForInstrumentErrors(strQuery);
691
12 Programming Examples
692
Programming Examples
12
693
12 Programming Examples
For more information, see the VISA COM Help that comes with Agilent IO
Libraries Suite 15.
'
'
'
'
'
'
Imports
Imports
Imports
Imports
Imports
System
System.IO
System.Text
Ivi.Visa.Interop
System.Runtime.InteropServices
Namespace InfiniiVision
Class VisaComInstrumentApp
Private Shared myScope As VisaComInstrument
Public Shared Sub Main(ByVal args As String())
Try
myScope = New _
VisaComInstrument("USB0::2391::5957::MY47250010::0::INSTR")
Initialize()
'
'
'
'
' Extra();
// Uncomment to execute the extra function.
Capture()
Analyze()
Catch err As System.ApplicationException
Console.WriteLine("*** VISA Error Message : " + err.Message)
694
12
Programming Examples
Initialize()
-------------------------------------------------------------This function initializes both the interface and the
oscilloscope to a known state.
695
12 Programming Examples
'
the left.
' - CENTER sets the display reference to the center of the
'
screen.
myScope.DoCommand(":TIMebase:REFerence CENTer")
' TRIGGER_SOURCE - Selects the channel that actually produces
' the TV trigger. Any channel can be selected.
myScope.DoCommand(":TRIGger:TV:SOURCe CHANnel1")
' TRIGGER_MODE - Set the trigger mode to, EDGE, GLITch,
' PATTern, CAN, DURation, IIC, LIN, SEQuence, SPI, TV,
' UART, or USB.
myScope.DoCommand(":TRIGger:MODE EDGE")
' TRIGGER_EDGE_SLOPE - Set the slope of the edge for the
' trigger to either POSITIVE or NEGATIVE.
myScope.DoCommand(":TRIGger:EDGE:SLOPe POSitive")
End Sub
'
'
'
'
'
'
'
Extra()
-------------------------------------------------------------The commands in this function are not executed and are shown
for reference purposes only. To execute these commands, call
this function from main.
696
Programming Examples
12
' This function prepares the scope for data acquisition and then
' uses the DIGITIZE MACRO to capture some data.
Private Shared Sub Capture()
' AQUIRE_TYPE - Sets the acquisition mode. There are three
' acquisition types NORMAL, PEAK, or AVERAGE.
myScope.DoCommand(":ACQuire:TYPE NORMal")
' AQUIRE_COMPLETE - Specifies the minimum completion criteria
' for an acquisition. The parameter determines the percentage
' of time buckets needed to be "full" before an acquisition is
' considered to be complete.
myScope.DoCommand(":ACQuire:COMPlete 100")
'
'
'
'
697
12 Programming Examples
"c:\scope\config\setup.dat")
If File.Exists("c:\scope\config\setup.dat") Then
File.Delete("c:\scope\config\setup.dat")
End If
' Query and read setup string.
ResultsArray = myScope.DoQueryIEEEBlock(":SYSTem:SETup?")
nBytes = ResultsArray.Length
Console.WriteLine("Read oscilloscope setup ({0} bytes).", nBytes)
' Write setup string to file.
File.WriteAllBytes("c:\scope\config\setup.dat", ResultsArray)
Console.WriteLine("Wrote setup string ({0} bytes) to file.", _
nBytes)
' RESTORE_SYSTEM_SETUP - Uploads a previously saved setup
' string to the oscilloscope.
Dim DataArray As Byte()
' Read setup string from file.
DataArray = File.ReadAllBytes("c:\scope\config\setup.dat")
Console.WriteLine("Read setup string ({0} bytes) from file.", _
DataArray.Length)
' Restore setup string.
myScope.DoCommandIEEEBlock(":SYSTem:SETup", DataArray)
Console.WriteLine("Restored setup string.")
' IMAGE_TRANSFER - In this example, we query for the screen
' data with the ":DISPLAY:DATA?" query. The .png format
' data is saved to a file in the local file system.
Console.WriteLine("Transferring screen image to " + _
"c:\scope\data\screen.png")
If File.Exists("c:\scope\data\screen.png") Then
File.Delete("c:\scope\data\screen.png")
End If
' Increase I/O timeout to fifteen seconds.
myScope.SetTimeoutSeconds(15)
' Get the screen data in PNG format.
ResultsArray = _
myScope.DoQueryIEEEBlock(":DISPlay:DATA? PNG, SCReen, COLor")
nBytes = ResultsArray.Length
Console.WriteLine("Read screen image ({0} bytes).", nBytes)
' Store the screen data in a file.
File.WriteAllBytes("c:\scope\data\screen.png", ResultsArray)
Console.WriteLine("Wrote screen image ({0} bytes) to file.", _
nBytes)
' Return I/O timeout to five seconds.
myScope.SetTimeoutSeconds(5)
' MEASURE - The commands in the MEASURE subsystem are used to
' make measurements on displayed waveforms.
698
Programming Examples
12
'
'
'
'
699
12 Programming Examples
'
'
'
YORIGIN
Console.WriteLine("Reading preamble.")
Dim fResultsArray As Double()
fResultsArray = myScope.DoQueryValues(":WAVeform:PREamble?")
Dim fFormat As Double = fResultsArray(0)
Console.WriteLine("Preamble FORMat: {0:e}", fFormat)
Dim fType As Double = fResultsArray(1)
Console.WriteLine("Preamble TYPE: {0:e}", fType)
Dim fPoints As Double = fResultsArray(2)
Console.WriteLine("Preamble POINts: {0:e}", fPoints)
Dim fCount As Double = fResultsArray(3)
Console.WriteLine("Preamble COUNt: {0:e}", fCount)
Dim fXincrement As Double = fResultsArray(4)
Console.WriteLine("Preamble XINCrement: {0:e}", fXincrement)
Dim fXorigin As Double = fResultsArray(5)
Console.WriteLine("Preamble XORigin: {0:e}", fXorigin)
Dim fXreference As Double = fResultsArray(6)
Console.WriteLine("Preamble XREFerence: {0:e}", fXreference)
Dim fYincrement As Double = fResultsArray(7)
Console.WriteLine("Preamble YINCrement: {0:e}", fYincrement)
Dim fYorigin As Double = fResultsArray(8)
Console.WriteLine("Preamble YORigin: {0:e}", fYorigin)
Dim fYreference As Double = fResultsArray(9)
Console.WriteLine("Preamble YREFerence: {0:e}", fYreference)
' QUERY_WAVE_DATA - Outputs waveform records to the controller
' over the interface that is stored in a buffer previously
' specified with the ":WAVeform:SOURce" command.
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
700
The "#8" may be stripped off of the header and the remaining
numbers are the size, in bytes, of the waveform data block.
The size can vary depending on the number of points acquired
for the waveform which can be set using the
Programming Examples
12
701
12 Programming Examples
' Constructor.
Public Sub New(ByVal strVisaAddress As String)
' Save VISA addres in member variable.
m_strVisaAddress = strVisaAddress
' Open the default VISA COM IO object.
OpenIo()
' Clear the interface.
m_IoObject.IO.Clear()
End Sub
Public Sub DoCommand(ByVal strCommand As String)
' Send the command.
m_IoObject.WriteString(strCommand, True)
' Check for instrument errors.
CheckForInstrumentErrors(strCommand)
End Sub
Public Function DoQueryString(ByVal strQuery As String) As String
' Send the query.
m_IoObject.WriteString(strQuery, True)
' Get the result string.
Dim strResults As String
strResults = m_IoObject.ReadString()
' Check for instrument errors.
CheckForInstrumentErrors(strQuery)
' Return results string.
Return strResults
End Function
Public Function DoQueryValue(ByVal strQuery As String) As Double
' Send the query.
m_IoObject.WriteString(strQuery, True)
' Get the result number.
Dim fResult As Double
fResult = _
CDbl(m_IoObject.ReadNumber(IEEEASCIIType.ASCIIType_R8, True))
' Check for instrument errors.
CheckForInstrumentErrors(strQuery)
' Return result number.
Return fResult
End Function
Public Function DoQueryValues(ByVal strQuery As String) As Double()
' Send the query.
m_IoObject.WriteString(strQuery, True)
' Get the result numbers.
Dim fResultsArray As Double()
702
Programming Examples
12
fResultsArray = _
m_IoObject.ReadList(IEEEASCIIType.ASCIIType_R8, ",;")
' Check for instrument errors.
CheckForInstrumentErrors(strQuery)
' Return result numbers.
Return fResultsArray
End Function
Public _
Function DoQueryIEEEBlock(ByVal strQuery As String) As Byte()
' Send the query.
m_IoObject.WriteString(strQuery, True)
' Get the results array.
Dim ResultsArray As Byte()
ResultsArray = _
m_IoObject.ReadIEEEBlock(IEEEBinaryType.BinaryType_UI1, _
False, True)
' Check for instrument errors.
CheckForInstrumentErrors(strQuery)
' Return results array.
Return ResultsArray
End Function
Public _
Sub DoCommandIEEEBlock(ByVal strCommand As String, _
ByVal DataArray As Byte())
' Send the command.
m_IoObject.WriteIEEEBlock(strCommand, DataArray, True)
' Check for instrument errors.
CheckForInstrumentErrors(strCommand)
End Sub
Private Sub CheckForInstrumentErrors(ByVal strCommand As String)
Dim strInstrumentError As String
Dim bFirstError As Boolean = True
' Repeat until all errors are displayed.
Do
' Send the ":SYSTem:ERRor?" query, and get the result string.
m_IoObject.WriteString(":SYSTem:ERRor?", True)
strInstrumentError = m_IoObject.ReadString()
' If there is an error, print it.
If strInstrumentError.ToString() <> "+0,""No error""" _
& Chr(10) & "" Then
If bFirstError Then
' Print the command that caused the error.
Console.WriteLine("ERROR(s) for command '{0}': ", _
strCommand)
bFirstError = False
End If
703
12 Programming Examples
Console.Write(strInstrumentError)
End If
Loop While strInstrumentError.ToString() <> "+0,""No error""" _
& Chr(10) & ""
End Sub
Private Sub OpenIo()
m_ResourceManager = New ResourceManagerClass()
m_IoObject = New FormattedIO488Class()
' Open the default VISA COM IO object.
Try
m_IoObject.IO = _
DirectCast(m_ResourceManager.Open(m_strVisaAddress, _
AccessMode.NO_LOCK, 0, ""), IMessage)
Catch e As Exception
Console.WriteLine("An error occurred: {0}", e.Message)
End Try
End Sub
Public Sub SetTimeoutSeconds(ByVal nSeconds As Integer)
m_IoObject.IO.Timeout = nSeconds * 1000
End Sub
Public Sub Close()
Try
m_IoObject.IO.Close()
Catch
End Try
Try
Marshal.ReleaseComObject(m_IoObject)
Catch
End Try
Try
Marshal.ReleaseComObject(m_ResourceManager)
Catch
End Try
End Sub
End Class
End Namespace
704
Index
Symbols
+9.9E+37, infinity representation, 604
+9.9E+37, measurement error, 257
Numerics
0 (zero) values in waveform data, 451
1 (one) values in waveform data, 451
82350A GPIB interface, 4
A
AC coupling, trigger edge, 383
AC input coupling for specified channel, 179
acknowledge, 540
ACQuire commands, 153
acquire data, 126, 165
acquire mode on autoscale, 122
acquire reset conditions, 105
acquire sample rate, 164
ACQuire subsystem, 43
acquired data points, 160
acquisition anti-alias control, 155
acquisition count, 157
acquisition mode, 153, 159, 468
acquisition type, 153, 165
active printer, 234
add function, 463
add math function, 223
add math function as g(t) source, 219
address field size, IIC serial decode, 324
address, IIC trigger pattern, 397
Addresses softkey, 30
AER (Arm Event Register), 119, 137, 139, 569
Agilent Connection Expert, 31
Agilent Interactive IO application, 35
Agilent IO Control icon, 31
Agilent IO Libraries Suite, 4, 27, 40, 42
Agilent IO Libraries Suite, installing, 28
ALB waveform data format, 314
alphabetical list of commands, 477
amplitude, vertical, 285
analog channel coupling, 179
analog channel display, 180
analog channel impedance, 181
analog channel input, 508
analog channel inversion, 182
analog channel labels, 183, 200
analog channel offset, 184
analog channel protection lock, 339
analog channel range, 190
analog channel scale, 191
B
bandwidth filter limits, 206
bandwidth filter limits to 20 MHz, 178
base value measurement, 287
basic instrument functions, 93
baud rate, 372, 408, 430
BAUDrate commands, 478
begin acquisition, 126, 146, 148
BHARris window for minimal spectral
leakage, 230
binary block data, 86, 340, 451
BINary waveform data format, 314
bit order, 431
bit weights, 98
bitmap display, 197
bits in Service Request Enable Register, 110
bits in Standard Event Status Enable
Register, 97
bits in Status Byte Register, 112
blank, 124
block data, 86, 101, 197, 340
block response data, 46
blocking synchronization, 577
blocking wait, 576
BMP (bitmap) hardcopy format, 519
braces, 85
built-in measurements, 39
button disable, 338
BWLimit commands, 478
byte format for data transfer, 444, 453
BYTeorder, 449
C
C#, VISA COM example, 682
C#, VISA example, 645
C, SICL library example, 608
C, VISA library example, 626
CAL PROTECT switch, 167, 172
calculating preshoot of waveform, 274
calculating the waveform overshoot, 270
calibrate, 168, 169, 172, 174
CALibrate commands, 167
calibrate date, 168
calibrate introduction, 167
calibrate label, 169
calibrate start, 170
calibrate status, 171
calibrate switch, 172
calibrate temperature, 173
calibrate time, 174
CAN, 367
CAN acknowledge, 371, 540
CAN baud rate, 372
CAN commands, 479
CAN frame counters, reset, 320
CAN id pattern, 369
CAN signal definition, 541
CAN source, 373
CAN trigger, 368, 374
CAN trigger commands, 365
CAN trigger pattern id mode, 370
capture data, 126
capturing data, 38
CDISplay, 125
center frequency set, 216, 217
center of screen, 476
center reference, 348
center screen, vertical value at, 222
channel, 152, 183
CHANnel commands, 175, 176
channel coupling, 179
705
Index
706
D
data, 367, 398, 401, 417, 420, 451
data 2, 399
DATA commands, 480
data conversion, 444
data displayed, 197
data format for transfer, 444
data output order, 449
data pattern length, 368
data pattern width, 418
data point index, 473
data points, 160
data required to fill time buckets, 156
data structures, status reporting, 555
data transfer, 197
data, erasing, 125
data, saving and recalling, 194
DATE commands, 481
date, calibration, 168
date, system, 335
dB versus frequency, 216
DC coupling for edge trigger, 383
DC input coupling for specified channel, 179
dc RMS measured on waveform, 292
DDE (Device Dependent Error) status bit, 97,
99
decision chart, status reporting, 573
default conditions, 105
define channel labels, 183
define glitch trigger, 393
define measurement, 262
define measurement source, 279
define trigger, 362, 377, 378, 379, 381, 394
defined as, 85
definite-length block query response, 46
definite-length block response data, 86
DELay commands, 481
delay measured to calculate phase, 273
delay measurement, 262
delay measurements, 281
Index
E
edge coupling, 383
edge define, 362
edge fall time, 267
edge parameter for delay measurement, 264
edge preshoot measured, 274
edge rise time, 276
edge slope, 386
edge source, 387
EDGE trigger commands, 382
edge triggering, 354
edges in measurement, 262
ellipsis, 86
enable channel labels, 199
enabling calibration, 172
enabling channel display, 180
enabling status register bits, 96, 109
end of string (EOS) terminator, 588
end of text (EOT) terminator, 588
end or identify (EOI), 588
enter pattern, 362
EOI (end or identify), 588
EOS (end of string) terminator, 588
EOT (end of text) terminator, 588
Epson, 517
equivalent-time acquisition mode, 154, 159
erase data, 125, 196
erase functions, 125
erase measurements, 524
erase screen, 511
ERRor commands, 481
error frame count (CAN), 318
error frame count (UART), 329
error messages, 337, 545
error number, 337
error queue, 337, 566
error, measurement, 257
ESB (Event Status Bit), 110, 112
ESE (Standard Event Status Enable
Register), 96, 565
ESR (Standard Event Status Register), 98, 564
event status conditions occurred, 112
Event Status Enable Register (ESE), 96, 565
Event Status Register (ESR), 98, 151, 564
example code, *RST, 107
example code, :ACQuire:COMPlete, 156
example code, :ACQuire:SEGMented, 162
example code, :ACQuire:TYPE, 166
example code, :AUToscale, 121
example code, :CHANnel:LABel, 183
example code, :CHANnel:PROBe, 185
example code, :CHANnel:RANGe, 190
example code, :DIGitize, 126
example code, :DISPlay:DATA, 198
example code, :DISPlay:LABel, 199
example code, :MEASure:PERiod, 279
example code, :MEASure:TEDGe, 282
example code, :RUN/:STOP, 146
F
FACTors commands, 482
failure, self test, 114
fall time measurement, 257, 267
falling edge, 362
Fast Fourier Transform (FFT) functions, 216,
217, 225, 228, 229, 230, 514
FF values in waveform data, 451
FFT (Fast Fourier Transform) functions, 216,
217, 225, 228, 229, 230, 514
FFT (Fast Fourier Transform) operation, 223,
463
FFT math function, 158
fifty ohm impedance, disable setting, 339
FILename commands, 482
filename for hardcopy, 518
filename for recall, 298
filename for save, 304
filter for frequency reject, 385
filter for high frequency reject, 358
filter for noise reject, 361
filter used to limit bandwidth, 178, 206
filters to Fast Fourier Transforms, 230
fine horizontal adjustment (vernier), 350
fine vertical adjustment (vernier), 193
finish pending device operations, 102
first point displayed, 473
707
Index
G
g(t) source, first input channel, 220
g(t) source, math operation, 219
g(t) source, second input channel, 221
gateway IP, 29
general trigger commands, 357
GENeric, 423, 427
generic video format, 423, 427
glitch duration, 394
glitch qualifier, 393
glitch source, 395
GLITch trigger commands, 388
glitch trigger duration, 389
glitch trigger polarity, 392
glitch trigger source, 389
GOFT commands, 483
GPIB interface, 29, 30
graphics, 197
graticule area for hardcopy print, 233
graticule area for saved image, 306
graticule colors, invert for hardcopy, 237, 521
708
H
HANNing window for frequency
resolution, 230
hardcopy, 145, 231
HARDcopy commands, 231
hardcopy device, 517
hardcopy factors, 235, 307
hardcopy filename, 518
hardcopy format, 516, 519
hardcopy formfeed, 236
hardcopy grayscale, 520
hardcopy invert graticule colors, 237, 521
hardcopy palette, 238
hardcopy print, area, 233
hardcopy printer driver, 522
hardware event condition register, 130
Hardware Event Condition Register
(:HWERegister:CONDition), 130
Hardware Event Condition Register
(:OPERegister:CONDition), 571
Hardware Event Enable Register
(HWEenable), 128
hardware event event register, 132
Hardware Event Event Register
(:HWERegister[:EVENt]), 132, 570
header, 588
high-frequency reject filter, 358, 385
high-resolution acquisition type, 154
hold until operation complete, 102
holdoff time, 359
holes in waveform data, 451
horizontal adjustment, fine (vernier), 350
horizontal position, 351
horizontal scale, 349, 353
horizontal scaling, 458
horizontal time, 347, 352, 525
hostname, 29
HWEenable (Hardware Event Enable
Register), 128
HWERegister:CONDition (Hardware Event
Condition Register), 130, 571
HWERegister[:EVENt] (Hardware Event Event
Register), 132, 570
I
I/O softkey, 29, 30
I1080L50HZ, 423, 427
I1080L60HZ, 423, 427
ID commands, 484
id mode, 370
Index
label, 506
LABel commands, 484
label list, 183, 200
labels, 183, 199, 200
labels to store calibration information, 169
labels, specifying, 194
LAN interface, 29, 32
LAN Settings softkey, 30
language for program examples, 37
LaserJet, 517
leakage into peak spectrum, 230
learn string, 101, 340
least significant byte first, 449
left reference, 348
legal values for channel offset, 184
legal values for frequency span, 229
legal values for offset, 222
LENGth commands, 484
length for waveform data, 315
less than qualifier, 393
less than time, 378, 381, 390, 394
LESSthan commands, 484
LEVel commands, 485
level for trigger voltage, 384, 391
LF coupling, 383
license information, 103
limits for line number, 423
LIN acknowledge, 407
LIN baud rate, 408
LIN identifier, 406
LIN serial decode bus parity bits, 325
LIN source, 409
LIN standard, 410
LIN sync break, 411
LIN trigger, 412
709
Index
merge, 134
message available bit, 112
message available bit clear, 95
message displayed, 112
message error, 545
message queue, 563
messages ready, 112
midpoint of thresholds, 272
minimum duration, 377, 378, 381, 389
minimum vertical value measurement, 289
minimum vertical value, time of, 296, 528
mnemonics, duplicate, 601
mode, 159, 165, 243, 345, 424
MODE commands, 486
mode, serial decode, 326
model number, 100
models, oscilloscope, 3
modes for triggering, 360
Modify softkey, 30
monochrome palette for image, 310
most significant byte first, 449
move, 216
move cursors, 529, 530
msbfirst, 449
MSG (Message), 110, 112
MSS (Master Summary Status), 112
multiple commands, 601
multiple queries, 47
multiply math function, 216, 223, 463
multiply math function as g(t) source, 219
N
name channels, 183
name list, 200
negative glitch trigger polarity, 392
negative pulse width, 269
negative pulse width measurement, 39
negative slope, 386, 414
negative TV trigger polarity, 425
new line (NL) terminator, 85, 588
NL (new line) terminator, 85, 588
noise reject filter, 361
non-core commands, 586
non-interlaced GENeric mode, 427
non-volatile memory, label list, 200
normal acquisition type, 153, 444
normal trigger sweep mode, 354
notices, 2
NR1 number format, 85
NR3 number format, 85
NTSC, 423, 427
NULL string, 336
number format, 85
number of points, 160, 454, 456
number of time buckets, 454, 456
numeric variables, 46
numeric variables, reading query results into
multiple, 48
nwidth, 269
710
Index
Q
qualifier, 394
QUALifier commands, 489
qualifier, trigger duration, 377, 378, 380
queries, multiple, 47
query error detected in Standard Event
Status, 99
query responses, block data, 46
query responses, reading, 45
query results, reading into numeric
variables, 46
query results, reading into string variables, 46
query return values, 604
query setup, 231, 242, 257, 340
R
range, 216, 352
RANGe commands, 489
range for channels, 190
range for duration trigger, 381
range for external trigger, 212
range for full-scale vertical axis, 224
range for glitch trigger, 394
range for time base, 347
range of offset values, 184
range of reference level values, 225
range qualifier, 393
ranges, value, 86
rate, 164
ratio of AC RMS values measured between
channels, 291
RCL (Recall), 104
read configuration, 101
read trace memory, 197
ReadIEEEBlock method, 41, 45, 47
ReadList method, 41, 45
ReadNumber method, 41, 45
readout, 525
ReadString method, 41, 45
real-time acquisition mode, 154, 159
recall, 104, 297, 340
RECall commands, 297
recall filename, 298
recall image, 299
recall setup, 301
recalling and saving data, 194
RECTangular window for transient signals, 230
reference, 216, 348
REFerence commands, 489
reference for time base, 539
reference level, Fast Fourier Transform (FFT)
function, 225
registers, 98, 104, 108, 119, 128, 130, 132,
135, 137, 139, 141, 143
registers, clearing, 572
reject filter, 385
reject high frequency, 358
reject noise, 361
remote control examples, 607
remove cursor information, 243
remove labels, 199
remove message from display, 336
reorder channels, 120
repetitive acquisitions, 146
report errors, 337
report transition, 281, 283
reporting status, 553
reporting the setup, 354
S
sample rate, 164
sampled data, 510
sampled data points, 451
SAMPlepoint commands, 490
SAV (Save), 108
save, 108, 303
SAVE commands, 302
save filename, 304
save image, 305
save image with inksaver, 309
save setup, 312
SAVE TO INTERN, 134
save waveform data, 313
save waveforms to pixel memory, 134
saved image, area, 306
saving and recalling data, 194
SBUS commands, 316
scale, 226, 349, 353
SCALe commands, 491
scale factors output on hardcopy, 235, 307
scale for channels, 191
scale units for channels, 192
scale units for external trigger, 213
scaling display factors, 185
SCPI commands, 49
scratch measurements, 524
711
Index
712
T
tdelta, 525
tedge, 281
telnet ports 5024 and 5025, 451
Telnet sockets, 49
temporary message, 336
TER (Trigger Event Register), 151, 561
test, self, 114
text, writing to display, 336
threshold voltage (lower) for
measurement, 523
threshold voltage (upper) for
measurement, 533
thresholds, 262, 526
thresholds used to measure period, 272
thresholds, how autoscale affects, 120
TIFF image format, 308
time base, 345, 346, 347, 348, 349, 539
time base commands introduction, 343
time base reset conditions, 105
time base window, 351, 352, 353
time between points, 525
time buckets, 156, 157
TIME commands, 493
time delay, 539
time delta, 525
time difference between data points, 471
Index
U
UART baud rate, 430
UART bit order, 431
UART commands, 496
UART frame counters, reset, 330
UART parity, 435
UART polarity, 436
UART Rx source, 438
UART trigger burst, 432
UART trigger commands, 428
UART trigger data, 433
UART trigger idle, 434
UART trigger qualifier, 437
UART trigger type, 440
UART Tx data, 467
UART Tx source, 439
UART width, 441
UNITs commands, 497
units per division, 191, 192, 213, 349
713
Index
V
valid command strings, 587
valid pattern time, 377, 378
value, 283
value measured at base of waveform, 287
value measured at specified time, 293
value measured at top of waveform, 294
value ranges, 86
values required to fill time buckets, 157
VBA, 40, 672
vectors, 203
vectors turned on or off, 510
vectors, turning on or off, 194
vernier, channel, 193
vernier, horizontal, 350
vertical adjustment, fine (vernier), 193
vertical amplitude measurement, 285
vertical axis defined by RANGe, 224
vertical axis range for channels, 190
vertical offset for channels, 184
vertical peak-to-peak measured on
waveform, 290
vertical scale, 191, 226
vertical scaling, 458
vertical value at center screen, 222
vertical value maximum measured on
waveform, 288
vertical value measurements to calculate
overshoot, 270
vertical value minimum measured on
waveform, 289
video line to trigger on, 423
video standard selection, 427
view, 152, 216, 470
view turns function on or off, 515
VISA COM example in C#, 682
VISA COM example in Visual Basic, 672
VISA COM example in Visual Basic .NET, 693
VISA example in C, 626
VISA example in C#, 645
VISA example in Visual Basic, 635
VISA example in Visual Basic .NET, 659
VISA examples, 626, 672
Visual Basic .NET, VISA COM example, 693
Visual Basic .NET, VISA example, 659
Visual Basic 6.0, 41
714
W
WAI (Wait To Continue), 115
wait, 115
wait for operation complete, 102
Wait Trig bit, 137, 139
waveform base value measured, 287
WAVeform command, 39
WAVeform commands, 442, 498
waveform data, 444
waveform data format, 314
waveform data length, 315
waveform data, save, 313
waveform introduction, 444
waveform maximum vertical value
measured, 288
waveform minimum vertical value
measured, 289
waveform must cross voltage level to be an
occurrence, 531
WAVeform parameters, 44
waveform peak-to-peak vertical value
measured, 290
waveform period, 272
waveform persistence, 194
waveform RMS value measured, 292
waveform source channels, 463
waveform source subsource, 467
waveform standard deviation value
measured, 277
waveform vertical amplitude, 285
waveform voltage measured at marker, 535,
536
waveform, byte order, 449
waveform, count, 450
waveform, data, 451
waveform, format, 453
waveform, points, 454, 456
waveform, preamble, 458
waveform, source, 463
waveform, type, 468
waveform, unsigned, 469
waveform, view, 470
waveform, X increment, 471
waveform, X origin, 472
waveform, X reference, 473
X
X axis markers, 242
X delta, 248
X1 and X2 cursor value difference, 248
X1 cursor, 242, 244, 245
X2 cursor, 242, 246, 247
X-axis functions, 343
X-increment, 471
X-of-max measurement, 295
X-of-min measurement, 296
X-origin, 472
X-reference, 473
X-Y mode, 343, 345
Y
Y axis markers, 242
Y1 and Y2 cursor value difference, 251
Y1 cursor, 242, 245, 249, 251
Y2 cursor, 242, 247, 250, 251
Y-axis value, 475
Y-increment, 474
Y-origin, 475, 476
Y-reference, 476
Z
zero values in waveform data, 451