RIGOL is a registered trademark of RIGOL TECHNOLOGIES, INC.
Publication Number
PGD07104-1110
Software Version
DSA815:00.01.17
DSA832/DSA875:00.01.03
Software upgrade might change or add product features. Please acquire the latest version of the manual
from RIGOL website or contact RIGOL to upgrade the software.
Notices
RIGOL products are covered by P.R.C. and foreign patents, issued and pending.
RIGOL reserves the right to modify or change parts of or all the specifications and pricing policies at
the company’s sole decision.
Information in this publication replaces all previously released materials.
Information in this publication is subject to change without notice.
RIGOL shall not be liable for either incidental or consequential losses in connection with the furnishing,
use or performance of this manual as well as any information contained .
Any part of thi s document is forbidden to be copied, photocopied or rearranged without prior written
approval of RIGOL.
Product Certification
RIGOL guarantees that this product conforms to the national and industrial standards in China as well as
the ISO9001:2008 standard and the ISO14001:2004 standard. Other international standard conformance
certifications are in progress.
Contact Us
If you have any problem or requirement when using our products or this manual, please contact RIGOL.
E-mail: service@rigol.com
Website: www.rigol.com
DSA800 Programming GuideI
RIGOL
Safety Requirement
General Safety Summary
Please review the following safety precautions carefully before putting the instrument into operation so as
to avoid any personal injury or damage to the i nstrument and any product connected to it. To prevent
potential hazards, please follow the instructions specified in this manual to use the instrument properly.
Use Proper Power Cord.
Only the exclusive power cord designed for the instrument and authorized for use within the local country
could be used.
Ground the Instrument.
The instrument is grounded through the Protective Earth lead of the power cord. To avoid electric shock,
connect the earth terminal of the power cord to the Protective Earth terminal before connecting any input
or output terminals.
Connect the Probe Correctly.
If a probe is used, the probe ground lead must be connected to earth ground. Do not connect the ground
lead to high voltage. Improper way of connection could result in dangerous voltages being present on the
connectors, controls or other surfaces of the oscilloscope and probes, which will cause potential hazards for
operators.
Observe All Terminal Ratings.
To avoid fire or shock hazard, observe all ratings and markers on the instrument and check your manual for
more information about ratings before connecting the instrument.
Use Proper Overvoltage Protection.
Ensure that no overvoltage (such as that caused by a bolt of lightning) can reach the product. Otherwise,
the operator might be exposed to the danger of an electric shock.
Do Not Operate Without Covers.
Do not operate the instrument with covers or panels removed.
Do Not Insert Objects Into the Air Outlet.
Do not insert objects into the air outlet, as doing so may cause damage to the instrument.
Use Proper Fuse.
Please use the specif ied fuses.
Avoid Circuit or Wire Exposure.
Do not touch exposed junctions and components when the unit is powered on.
Do Not Operate With Suspected Failures.
If you suspect damage occurs to the instrument, have it inspected by RIGOL authorized personnel before
further operations. Any maintenance, adjustment or replacement especially to circuits or accessories must
be performed by RIGOL authorized personnel.
Provide Adequate Ventilation.
Inadequate ventilation may cause an increase of temperature in the instrument, which would cause
damage to the instrument. So please keep the instrument well ventilated and inspect the air outlet and the
fan regularly.
Do Not Operate in Wet Conditions.
To avoid short circuit inside the instrument or electric shock, never operate the instrument in a humid
II DSA800 Programming Guide
RIGOL
environment.
Do Not Operate in an Explosive Atmosphere.
To avoid personal injuries or damage to the instrument, never operate the instrument in an explosive
atmosphere.
Keep Instrument Surfaces Clean and Dry.
To avoid dust or moisture from affecting the performance of the instrument, keep the surfaces of the
instrument clean and d ry.
Prevent Electrostatic Impact.
Operate the instrument in an electrostatic disc ha r g e protective environment to avoid damage induced by
static discharges. Always ground both the internal and external conductors of cables to release stati c bef ore
making connections.
Use the Battery Properly.
Do not expose the battery (if available) to high temperature or fire.
Keep it out of the reach of children. Improper change of a battery (lithium battery) may cause an explosion.
Use the RIGOL specified battery only.
Handle with Caution.
Please handle with care during transportation to avoid damage to keys, knobs, interfaces and other parts
on the panels.
DSA800 Programming GuideIII
RIGOL
WARNING
CAUTION
DANGER
It calls attention to an operation, if not correctly performed, could result in injury or
WARNING
CAUTION
Hazardous
Safety
Protective
Chassis
Test
Safety Notices and Symbols
Safety Notices in this Manual:
Indicates a potentially hazardous situation or practice which, if not avoided, will result in
serious injury or death.
Indicates a potentially hazardous situation or practice which, if not avoided, could result
in damage to the product or loss of important data.
Safety Terms on the Product:
hazard immediately.
It calls attention to an operation, if not correctly performed, could result in potential
injury or hazard.
It calls attention to an operation, if not correctly performed, could result in damage
to the product or other devices connected to the product.
Safety Symbols on the Product:
Voltage
Warning
Earth
Terminal
Ground
Ground
IV DSA800 Programming Guide
RIGOL
Allgemeine Sicherheits Informationen
Überprüfen Sie diefolgenden Sicherheitshinweise sorgfältigumPersonenschädenoderSchäden am
Gerätundan damit verbundenen weiteren Gerätenzu vermeiden. Zur Vermeidung vonGefahren, nutzen Sie
bitte das Gerät nur so, wi ein diesem Handb uchangegeben.
Um Feuer oder Verletzungen zu vermeiden, verwenden Sie ein ordnungsgemäßes Netzkabel.
Verwenden Sie für dieses Gerät nur das für ihr Land zugelassene und genehmigte Netzkabel.
Erden des Gerätes.
Das Gerät ist durch den Schutzleiter im Netzkabel geerde t. Um Gefahren durch elektrischen Schlag zu
vermeiden, ist es u nerlässlich, die Erdung durchzuführen. Erst dann dürfen weite r e Ein- oder Ausgänge
verbunden werden.
Anschluss einesTastkopfes.
Die Erdungsklemmen der Sonden sindauf dem gleichen Spannungspegel des Instruments geerdet.
SchließenSie die Erdungsklemmen an keine hohe Spannung an.
Beachten Sie alle Anschlüsse.
Zur Vermeidung von Feuer oder Stromschlag, beachten Sie alle Bemerkungen und Markierungen auf dem
Instrument. Befolgen Sie die Bedienungsanleitung für weitere Informationen, bevor Sie weitere Anschlüsse
an das Instrument legen.
Verwenden Sie einen geeigneten Überspannungsschutz.
Stellen Sie sicher, daß keinerlei Überspannung (wie z.B. durch Gewitter verursacht) das Gerät erreichen
kann. Andernfallsbestehtfür den Anwender die GefahreinesStromschlages.
Nicht ohne Abdeckung einschalten.
Betreiben Sie das Gerät nicht mit entfernten Gehäuse-Abdeckungen.
Betreiben Sie das Gerät nicht geöffnet.
Der Betrieb mit offenen oder entfernten Gehäuseteilen ist nicht zulässig. Nichts in entsprechende
Öffnungen stecken (Lüfter z.B.)
Passende Sicherung verwenden.
Setzen Sie nur die spezifikationsgemäßen Sicherungen ein.
Vermeiden Sie ungesc h ü tzt e V er bindungen.
Berühren Sie keine unisolierten Verbindungen oder Baugruppen, während das Gerät in Betrieb ist.
Betreiben Sie das Gerät nicht im Fehlerfall.
Wenn Sie am Gerät einen Defekt vermuten, sorgen Sie dafür, bevor Sie das Gerät wieder betreiben, dass
eine Untersuchung durch RIGOL autorisiertem Personal durchgeführt wird. Jedwede Wartung,
Einstellarbeiten oder Austausch von Teilen am Gerät, sowie am Zubehör dürfen nur von RIGOL
autorisiertem Personal durchgeführt werden.
Belüftung sicherstellen.
Unzureichende Belüftung kann zu Temperaturanstiegen und somit zu thermischen Schäden am Gerät
führen. Stellen Sie deswegen die Belüftung sicher und kontrollieren regelmäßig Lüfter und
Belüftungsöffnungen.
Nicht in feuchter Umgebung betreiben.
Zur V ermeidung v on Ku rzschluß im Gerätei nneren un d Stromsch lag betreiben Sie das Gerät bi tte niemals in
feuchter Umgebung.
Nicht in explosiver Atmosphäre betreiben.
Zur Vermeidung von Personen- und Sachschäden ist es unumgänglich, das Gerät ausschließlich fernab
DSA800 Programming GuideV
RIGOL
jedweder explosiven Atmosphäre zu betreiben.
Geräteoberflächen sauber und trocken halten.
Um den Einfluß von Sta ub und Feuchtigkeit aus der Luft auszuschließen, halten Sie bitte die
Geräteoberflächen sauber und trocken.
Schutz gegen elektrostatische Entladung (ESD).
Sorgen Sie für eine elektrostatisch geschützte Umgebung , um somit Schäden und Funktionsstörungen
durch ESD zu vermeiden. Erden Sie vor dem Anschluß immer Innen- und Außenleiter der
Verbindungsleitung, um statische Aufladung zu entladen.
Die richtige Verwendung desAkku.
Wenneine Batterieverwendet wird, vermeiden Sie hohe Temperaturen bzw. Feuer ausgesetzt werden.
Bewahren Sie es außerhalbder Reichweitevon Kindern auf. UnsachgemäßeÄnderung derBatterie
(Anmerkung: Lithium-Batterie) kann zu einer Explosion führen. VerwendenSie nur von RIGOL
angegebenenAkkus.
Sicherer Transport.
Transportieren Sie das Gerät sorgfältig (Verpackung!), um Schäden an Bedienelementen, Anschlüssen und
anderen Teilen zu vermeiden.
VI DSA800 Programming Guide
RIGOL
CAUTION
DANGER
weist auf eine Verletzung oder Gefährdung hin, die sofort geschehen kann.
WARNING
weist auf eine Verletzung oder Gefährdung hin, die möglicherweise nicht sofort
CAUTION
weist auf eine Verletzung oder Gefährdung hin und bedeutet, dass eine mögliche
Sicherheits Begriffe und Symbole
Begriffe in diesem Guide:
WARNING
Die Kennzeichnung WARNING beschreibt Gefahrenquellen die leibliche Schäden oder den
Tod von Personen zur Folge haben können.
Die Kennzeichnung Cautio n (Vorsicht) beschreibt Gefahrenquel len die Schäden am Gerät
hervorrufen können.
Begriffe auf dem Produkt:
geschehen.
Beschädigung des Instruments oder anderer Gegenstände auftreten kann.
Symbole auf dem Produkt:
Gefährliche
Spannung
SicherheitsHinweis
Schutz-erde Gehäusemasse Erde
DSA800 Programming GuideVII
RIGOL
Model
Frequency Range
Tracking Generator
DSA875
9 kHz to 7.5 GHz
None
DSA832-TG
9 kHz to 3.2 GHz
3.2 GHz
Document Overview
This manual introduces how to program and control RIGOL DSA800 series spectrum analyzer using SCPI
commands through USB, LAN or GPIB (via USB-GPIB interface converter) interface.
Main Topics in this Manual:
Chapter 1 SCPI Overview
This chapter provides a brief introduction of the SCPI commands.
Chapter 2 Command System
This chapter introduces the syntax, function, parameter and using instruction of each DSA800 command in
alphabetical order (from A to Z).
Chapter 3 Programming Demos
This chapter introduces how to program and control DSA800 using development tools, such as Visual C++,
Visual Basic and LabVIEW.
Tip
The latest version of this manual can be downloaded from www.rigol.com.
Format Conventions in this Manual:
1. Key:
The key at the front panel is deno ted by the format o f "Key Name (Bold) +Text Box" in the manual. For
example, FREQ denotes the FREQ key.
2. Menu:
The menu is denoted by the format of "Menu Word (Bold) + Character Shading" in the manual. For
example, Center Freq denotes the center frequency menu item under the FREQ function key.
3. Connector:
The connector at the front or rear panel is denoted by the format of "Connector Name (Bold) + Square
Brackets (Bold)" in the manual. For example, [GEN OUTPUT 50Ω].
4. Operation step:
The operation for the next ste p is denoted by an arrow "" in t he manual. For example, FREQ
Center Freq denotes that you first press FREQ on the front panel and then press Center Freq.
Content Conventions in this Manual:
DSA800 series spectrum analyzer includes the following six models. The introductions of the DSA800 series
commands in this manual are based on DSA875, unless otherwis e noted.
DSA815 9 kHz to 1.5 GHz None
DSA832 9 kHz to 3.2 GHz None
DSA815-TG 9 kHz to 1.5 GHz 1.5 GHz
DSA875-TG 9 kHz to 7.5 GHz 7.5 GHz
VIII DSA800 Programming Guide
Contents RIGOL
Contents
Guaranty and Declaration ......................................................................................................... I
Safety Requirement .................................................................................................................. II
General Safety Summary ............................................................................................................. II
Safety Notices and Symbols ......................................................................................................... IV
Allgemeine Sicherheits Informationen ........................................................................................... V
Sicherheits Begri ffe und Symbole ............................................................................................... VII
Document Overview ............................................................................................................. VIII
Linux Programming Demo........................................................................................................ 3-21
Linux Programming Preparations ....................................................................................... 3-21
Linux Programming Procedures ......................................................................................... 3-23
XVI DSA800 Programming Guide
Chapter 1 SCPI Overview RIGOL
Chapter 1 SCPI Overview
SCPI (Standard Commands for Programmable Instruments) is standardized instrum ent programming
language that is bas ed on the stan dard IEEE48 8.1 and IEEE 4 88.2 and conform s to v arious stard ards (such
as the floating point operation rule in IEEE754 stardard, ISO646 7-bit coded character for information
interchange (equivalent to ASCll programming).
Main topics of this chapter:
Syntax
Symbol Description
Parameter Type
Command Abbreviation
DSA800 Programming Guide1-1
RIGOL Chapter 1 SCPI Overview
Syntax
SCPI commands present a hierarchical tree structure and contain multiple sub-systems, each of which is
made up of a root keyword and one or more sub-keywords. The command string usually starts with ":", the
keywords are separated by ":" and are followed by the parameter settings availab le, "?" is added at the end
of the command string to indicate query and the command and parameter are separated by a space.
For example,
:CALCulate:BANDwidth:NDB <rel_ampl>
:CALCulate:BANDwidth:NDB?
CALCulate is the r oot keyword of the command. BANDwidth and NDB are the second-level and
third-level keywords respectively. The command string starts with ":" which separates the multiple-level
keywords. <rel_ampl> represents the parameter available for setting, "?" represents query and the
command :CALCulate:BANDwidth:NDB and parameter <rel_ampl> are separated by a space.
"," is generally used for separating different parameters contained in the same command, for example,
:SYSTem:DATE <yea r>,<month>, <d a y >
Symbol Description
The following four symbols are not the content of SCPI commands and will not be sent with the commands,
but are usually used to describe the parameters in the commands.
Braces { }
The parameters enclosed in the braces are optional and can be ignored or set for one or more times. For
example,
In the [:SENSe]:CORRection:CSET<n>:DATA <freq>,<rel_ampl>{,<freq>,<rel_ampl>} command, the
frequency and ampli tude in {,<freq>,<rel_ampl>} can be omitted or be set to one or more values.
Vertical Bar |
The vertical bar is u sed to separ ate multip le par ameter s and o ne of the par ameters mu st be selec ted when
sending the command. For example,
In the :DISPlay:ANNotation:CLOCk[:ST A Te] OFF|ON|0|1 command, the comman d parameters av ailable are
"OFF", "ON", "0" or "1".
Square Brackets [ ]
The content (command keyword) enclosed in the square brackets can be omitted. For example,
for the [:SENSe]:POWer[:RF]:ATTenuation? command, sending any of the four comm ands below can
generate the same effect:
:POWer:ATTenuation?
:POWer:RF:ATTenuation?
:SENSe:POWer:ATTenuation?
:SENSe:POWer:RF:ATTenuation?
Triangle Brackets < >
The parameter enclosed in the triangle brackets must be replaced by an effective value. For example,
send the :DISPlay:BRIGhtness <integer> command in :DISPlay:BRIGhtness 5 format.
1-2 DSA800 Programming Guide
Chapter 1 SCPI Overview RIGOL
Parameter Type
The command parameters introduced in this manual include 6 types: Bool, Keyword, Integer, Consecutive
Real Number, Discrete and ASCII String.
Bool
The parameter could be "OFF", "ON", "0" or "1". For example,
:DISPlay:ANNotation:CLOCk[:STATe] OFF|ON|0|1
Keyword
The parameter could be any of the values listed. For example,
:DISPlay:AFUnction:POSition BOTTom|CENTer|TOP
The parameter could be "BOTTom", "CENTer" or "TOP".
Integer
Unless otherwise noted, the parameter c an be any integer within the effective value range. Note that do not
set the parameter to a decimal; otherwise errors will occur. For example,
:DISPlay:BRIGhtnes s <integer>
<integer> can be set to any integer between 0 and 10.
Consecutive Real Number
The parameter could be any value within the effective value range according to the accuracy requirement
(by default, there are 6 digits after the decimal points). For example,
:CALCulate:BANDwidth:NDB <rel_ampl>
<rel_ampl> can be set to any real number between -100 and 100.
Discrete
The parameter could on ly be one of th e specified values and these v alues are di scon tinu ous. F o r ex ample,
:CALCulate:MARKer<n>:MAXimum:MAX
<n> could only be set to 1, 2, 3 or 4.
ASCII String
The parameter should be the combinations of ASCII characters. For example,
:SYSTem:DATE <year>,<month>,<day>
The parameter is a string in the specified date format.
Command Abbreviation
Since all the commands are case-insensitive, you can use any of them. But if abbreviation is used , all the
capital letters in the command must be written completely. For example,
:CALCulate:BANDwidth:NDB? can be abbreviated to :CALC:BAND:NDB?
DSA800 Programming Guide1-3
Chapter 2 Command System RIGOL
Chapter 2 Command System
In this chapter, the DSA800 series spectrum analyzer command subsyste ms are introduced in alphabetical
order (from A to Z).
1. In this command set, commands relating to Quasi-peak detector, EMI filter, VSWR measurement,
advanced measurement and TX1000 are only applicable t o DSA800 installed wit h the corresponding
options. For the details, refer to the explanation in each command subsystem.
2. In this command set, commands relating to the tracking generator are only applicable to
DSA815-TG/DSA832-TG/DSA875-TG.
3. In this command set, unless otherwise noted, the query returns "N/A" (quotation marks excluded) if
the corresponding option is not installed and returns "ERR" (quotation marks excluded) if the
corresponding fu nction is not enabled or the type does not match.
4. In this manual, the parameter ranges of the commands are based on DSA875.
DSA800 Programming Guide2-1
RIGOL Chapter 2 Command System
:ABORt
Syntax
:ABORt
Description
Give up the current opera tion and restart the sweep.
Set the value of N in N dB bandwidth measurement.
Query the value of N in N dB bandwidth measurement.
Parameter
<rel_ampl> Consecutive Real Number -100 dB to 100 dB -3 dB
Return Format
The query returns the value of N in scientific notation.
Example
The command below sets N to -4.
:CALCulate:BANDwidth:NDB -4
The query below returns -4.000000E+00.
:CALCulate:BANDwidth:NDB?
:CALCulate:BANDwidth:RESult?
Syntax
:CALCulate:BANDwidth:RESult?
Description
Query the measurement result of N dB bandwidth and the unit is Hz.
Return Format
The query returns the bandwidth in integer (in Hz).
If points that are located on both sides of the current marker and with N dB fall or rise in amplitude are not
found, the query returns ----.
Set the X axis to denote frequency or time in the Pass/Fail test.
Query the type of the X axis in the Pass/Fail test.
Parameter
Explanation
This setting is applicable to both the upper and lower limit lines.
All the points of the current limit line will be deleted when the X axis type is changed.
Return Format
The query returns FREQ or TIME.
Example
The command below sets the X axis to time.
:CALCulate:LLI Ne :C ON Tr ol : DOM ai n TIME
The query below returns TIME.
:CALCulate:LLINe:CONTrol:DOMain?
Name Type Range Default
-- Keyword FREQuency|TIME
FREQuency
:CALCulate:LLINe:FAIL?
Syntax
:CALCulate:LLINe:FAIL?
Description
Query the result of the Pass/Fail test.
Return Format
The query returns PASS or FAIL. The query returns UNMEAS if the test is not finished.
DSA800 Programming Guide2-5
RIGOL Chapter 2 Command System
Name
Type
Range
Default
:CALCulate:LLINe:FAIL:RATIo?
Syntax
:CALCulate:LLINe:FAIL:RATIo?
Description
Query the fail ratio of the Pass/Fail test.
Return Format
The query returns the fail ratio in scientific notation.
Example
The query below r eturns 5.490000E+00.
:CALCulate:LLINe:FAIL:RATIo?
Set whether to stop the test if the test fails.
Query whether to stop the test if the test fails.
Parameter
-- Bool OFF|ON|0|1 ON|1
Explanation
If the parameter is set to ON or 1, the test sto ps when the test fail s and the test continu es if the parameter
is set to OFF or 0.
Return Format
The query returns 0 or 1.
Example
The command below sets the instrument to stop the test when the test fails.
:CALCulate:LLINe:FAIL:STOP:STATe ON or :CALCu la t e:LLI Ne : FAI L :S TOP: STATe 1
The query below returns 1.
:CALCulate:LLINe:FAIL:STOP:STATe?
Set the frequency interpolation mode in the Pass/Fail test to log or linear.
Query the frequency interpolation mode.
Parameter
Name Type Range Default
Explanation
<n> denotes the lower limit line (1) or upper limit line (2).
In log mode, both the frequency and amplitude use log unit to make interpolation operation.
In linear mode, the frequency uses a linear unit and the amplitude uses a log unit for interpolation
operation.
Return Format
The query returns LOG or LIN.
Example
The command below sets the frequency interpolation mode of the lower limit line to log.
:CALCulate:LLINe1:CONTrol:INTerpolate:TYPE LOGarithmic
The query below returns LOG.
:CALCulate:LLINe1:CONTrol:INTerpolate:TYPE?
Create a limit line of the Pass/Fail test.
Query the limit line information.
Parameter
Name Type Range Default
<n> Discrete 1|2 2
<x-axis>
Consecutive
Real Number
0 Hz to 7.5 GHz (the X axis denotes frequency)
0 us to 7.5 ks (the X axis denotes time)
--
<ampl>
Explanation
<n>: denote the lower limit line (1) or upper limit line (2).
<x-axis>: the frequency or time (depend on the X axis type) of the point being edited.
<ampl>: the amplitude of the point being edited.
DSA800 Programming Guide2-7
Real Number
-400 dBm to 320 dBm --
RIGOL Chapter 2 Command System
Name Type
Range
Default
<connected>
Discrete
0|1
0
<connected>: whether to connect the current point with the previous one. 1 denotes yes and 0 denotes no.
Note that for the first point, only 0 is available.
Up to 200 points can be edited for each limit line.
Return Format
The query returns the specified limit line information in
<x-axis>,<ampl>,<connected>{,<x-axis>,<ampl>,<connected>} format.
If no point is edited of the specified limit line, the query returns NULL.
Example
The command below creates an upper limit line wit h 3 points.
:CALCulate:LLI Ne2 :DATA 50,100,0,10 0,1 50 ,1, 20 0, 20 0, 1
The query below returns 50,100.000000,0,100,150.000000,1,200,200.000000,1.
:CALCulate:LLINe2:DATA?
In the Pass/Fail test, add points onto the limit line being edited.
Parameter
<n> Discrete 1|2 2
<x-axis>
<ampl>
Consecutive
Real Number
Consecutive
Real Number
0 Hz to 7.5 GHz (X axis denotes frequency)
0 us to 7.5 ks (X axis denotes time)
-400 dBm to 320 dBm --
--
Explanation
<n>: denote the low er limit line (1) or upper limit line (2).
<x-axis>: the frequency or time (depend on the X axis type) of the point being edited.
<ampl>: the amplitude of the point being edited.
<connected>: whether to connect the current point with the previous one. 1 denotes yes and 0 denotes no.
Note that for the first point, only 0 is available.
Up to 200 points can be edited for each limit line.
Example
The command below adds two points onto the upper limit line.
:CALCulate:LLINe2:DATA:MERG 250,200,1,30 0,250,1
2-8 DSA800 Programming Guide
Loading...
+ 221 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.