Page 3
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.
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.
Page 5
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.
RIGOL Safety Notices and Symbols Safety Notices in this Manual: WARNING Indicates a potentially hazardous situation or practice which, if not avoided, will result in serious injury or death. CAUTION Indicates a potentially hazardous situation or practice which, if not avoided, could result in damage to the product or loss of important data.
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.
Page 8
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.
RIGOL 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. CAUTION Die Kennzeichnung Caution (Vorsicht) beschreibt Gefahrenquellen die Schäden am Gerät hervorrufen können.
RIGOL Document Overview This manual introduces how to program and control RIGOL DSA800E 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.
RIGOL Chapter 1 SCPI Overview Chapter 1 SCPI Overview SCPI (Standard Commands for Programmable Instruments) is standardized instrument programming language that is based on the standard IEEE488.1 and IEEE 488.2 and conforms to various stardards (such as the floating point operation rule in IEEE754 stardard, ISO646 7-bit coded character for information interchange (equivalent to ASCll programming).
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 ":"...
RIGOL Chapter 1 SCPI Overview 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.
RIGOL Chapter 2 Command System Chapter 2 Command System In this chapter, the DSA800E series spectrum analyzer command subsystems are introduced in alphabetical order (from A to Z). Main topics of this chapter: :ABORt :CALCulate Subsystem :CALibration Subsystem ...
RIGOL Chapter 2 Command System :CALCulate:BANDwidth:NDB Syntax :CALCulate:BANDwidth:NDB <rel_ampl> :CALCulate:BANDwidth:NDB? Description Set the value of N in N dB bandwidth measurement. Query the value of N in N dB bandwidth measurement. Parameter Name Type Range Default <rel_ampl> Consecutive Real Number...
RIGOL Chapter 2 Command System :CALCulate:LLINe:CONTrol:DOMain Syntax :CALCulate:LLINe:CONTrol:DOMain FREQuency|TIME :CALCulate:LLINe:CONTrol:DOMain? Description 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 Name Type Range Default...
RIGOL Chapter 2 Command System :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 returns 5.490000E+00. :CALCulate:LLINe:FAIL:RATIo? :CALCulate:LLINe:FAIL:STOP:STATe Syntax :CALCulate:LLINe:FAIL:STOP:STATe OFF|ON|0|1 :CALCulate:LLINe:FAIL:STOP:STATe? Description Set whether to stop the test if the test fails.
RIGOL Chapter 2 Command System :CALCulate:LLINe<n>:CONTrol:INTerpolate:TYPE Syntax :CALCulate:LLINe<n>:CONTrol:INTerpolate:TYPE LOGarithmic|LINear :CALCulate:LLINe<n>:CONTrol:INTerpolate:TYPE? Description Set the frequency interpolation mode in the Pass/Fail test to log or linear. Query the frequency interpolation mode. Parameter Name Type Range Default <n> Discrete Keyword LOGarithmic|LINear LINear Explanation <n>...
RIGOL Chapter 2 Command System <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.
RIGOL Chapter 2 Command System :CALCulate:LLINe<n>:DELete Syntax :CALCulate:LLINe<n>:DELete Description Delete the specified limit line of the Pass/Fail test. Parameter Name Type Range Default <n> Discrete Explanation <n> denotes the lower limit line (1) or the upper limit line (2). Example The command below deletes the lower limit line.
RIGOL Chapter 2 Command System :CALCulate:LLINe<n>:RELFreq[:STATe] Syntax :CALCulate:LLINe<n>:RELFreq[:STATe] OFF|ON|0|1 :CALCulate:LLINe<n>:RELFreq? Description Enable or disable the REL Frequency. Query the status of the REL Frequency. Parameter Name Type Range Default <n> Discrete Bool OFF|ON|0|1 OFF|0 Explanation <n> denotes the lower limit line (1) or upper limit line (2).
RIGOL Chapter 2 Command System Example The command below enables the upper limit line. :CALCulate:LLINe2:STATe ON or :CALCulate:LLINe2:STATe 1 The query below returns 1. :CALCulate:LLINe2:STATe? :CALCulate:MARKer:AOFF Syntax :CALCulate:MARKer:AOFF Description Disable all the markers currently enabled as well as all the functions based on the markers.
RIGOL Chapter 2 Command System :CALCulate:MARKer:FCOunt:RESolution:AUTO Syntax :CALCulate:MARKer:FCOunt:RESolution:AUTO OFF|ON|0|1 :CALCulate:MARKer:FCOunt:RESolution:AUTO? Description Set the resolution of the frequency counter automatically. Query the status of the auto setting of the resolution of the frequency counter. Parameter Name Type Range Default Bool OFF|ON|0|1...
RIGOL Chapter 2 Command System :CALCulate:MARKer:FCOunt[:STATe] Syntax :CALCulate:MARKer:FCOunt[:STATe] OFF|ON|0|1 :CALCulate:MARKer:FCOunt[:STATe]? Description Enable or disable the frequency counter. Query the status of the frequency counter. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 Explanation Use the :CALCulate:MARKer:FCOunt:X? command to query the reading of the frequency counter.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:DELTa[:SET]:CENTer Syntax :CALCulate:MARKer<n>:DELTa[:SET]:CENTer Description Set the center frequency of the spectrum analyzer to the frequency difference of the specified Delta, Delta Pair or Span Pair marker. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Explanation Use the :CALCulate:MARKer<n>:MODE...
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:FUNCtion Syntax :CALCulate:MARKer<n>:FUNCtion NDB|NOISe|OFF :CALCulate:MARKer<n>:FUNCtion? Description Select special measurement type for the specified marker. Query the special measurement type of the specified marker. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Keyword NDB|NOISe|OFF Explanation NDB: N dB bandwidth.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:MAXimum:MAX Syntax :CALCulate:MARKer<n>:MAXimum:MAX Description Execute a peak search according to the search mode set by :CALCulate:MARKer<n>:PEAK:SEARch:MODE command and mark the peak using the specified marker. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Example The command below executes a peak search and marks the peak using marker 2.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:MINimum Syntax :CALCulate:MARKer<n>:MINimum Description Search and mark the peak on the trace with the minimum amplitude. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Explanation When no peak is found, "No peak found" is displayed on the screen.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:PEAK:EXCursion Syntax :CALCulate:MARKer<n>:PEAK:EXCursion <rel_ampl> :CALCulate:MARKer<n>:PEAK:EXCursion? Description Set the peak excursion and the unit is dB. Query the peak excursion. Parameter Name Type Range Default <n> Discrete 1|2|3|4 <rel_ampl> Consecutive Real Number 0 dB to 200 dB...
RIGOL Chapter 2 Command System Example The command below sets the peak search mode of trace 1 to parameter and marks the peak using marker :CALCulate:MARKer1:PEAK:SEARch:MODE PARameter The query below returns PAR. :CALCulate:MARKer1:PEAK:SEARch:MODE? :CALCulate:MARKer<n>:PEAK[:SET]:CF Syntax :CALCulate:MARKer<n>:PEAK[:SET]:CF Description Execute a peak search (mark the peak using the specified marker) and set the center frequency of the spectrum analyzer to the frequency of the current peak.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:PTPeak Syntax :CALCulate:MARKer<n>:PTPeak Description Execute peak-peak search and mark the peak using the specified marker. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Explanation The marker type of the specified marker will automatically change to Delta Pair after executing this command.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>[:SET]:RLEVel Syntax :CALCulate:MARKer<n>[:SET]:RLEVel Description Set the reference level of the spectrum analyzer to the amplitude of the specified marker. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Explanation If the specified marker is Normal marker, the reference level will be set to the amplitude of the marker.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>[:SET]:STEP Syntax :CALCulate:MARKer<n>[:SET]:STEP Description Set the center frequency step of the spectrum analyzer to the frequency of the specified marker. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Explanation If the specified marker is Normal marker, the center frequency step will be set to the frequency of the marker.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:STATe Syntax :CALCulate:MARKer<n>:STATe OFF|ON|0|1 :CALCulate:MARKer<n>:STATe? Description Enable or disable the specified marker. Query the status of the specified marker. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Bool OFF|ON|0|1 OFF|0 Explanation If the specified marker is not enabled currently, it will be set to Normal marker (POSition) when this command is sent to enable it.
RIGOL Chapter 2 Command System Example The command below sets the marker trace of marker 1 to trace 2. :CALCulate:MARKer1:TRACe 2 The query below returns 2. :CALCulate:MARKer1:TRACe? :CALCulate:MARKer<n>:TRACe:AUTO Syntax :CALCulate:MARKer<n>:TRACe:AUTO OFF|ON|0|1 :CALCulate:MARKer<n>:TRACe:AUTO? Description Set the marker trace of the specified marker to Auto.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:VSRefl? Syntax :CALCulate:MARKer<n>:VSRefl? Description Query the reflection coefficient at the specified marker. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Return Format The query returns the reflection coefficient in scientific notation. Example The command below returns 0.600118E+00.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:X Syntax :CALCulate:MARKer<n>:X <param> :CALCulate:MARKer<n>:X? Description Set the X-axis value of the specified marker and the default unit is Hz. Query the X-axis value of the specified marker. Parameter Name Type Range Default <n> Discrete...
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:X:CENTer Syntax :CALCulate:MARKer<n>:X:CENTer <param> :CALCulate:MARKer<n>:X:CENTer? Description Set the X-axis center value of the specified Span Pair marker. Query the X-axis center value of the specified Span Pair marker. Parameter Name Type Range Default <n> Discrete...
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:X:POSition Syntax :CALCulate:MARKer<n>:X:POSition <integer> :CALCulate:MARKer<n>:X:POSition? Description Set the position of the specified Normal marker. Query the position of the specified Normal marker. Parameter Name Type Range Default <n> Discrete 1|2|3|4 <integer> Integer 0 to 600 Return Format The query returns the position of the marker in integer.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:X:POSition:SPAN Syntax :CALCulate:MARKer<n>:X:POSition:SPAN <param> :CALCulate:MARKer<n>:X:POSition:SPAN? Description Set the number of points corresponding to the span of the specified Span Pair marker. Query the number of points corresponding to the span of the specified Span Pair marker.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:X:POSition:STOP Syntax :CALCulate:MARKer<n>:X:POSition:STOP <param> :CALCulate:MARKer<n>:X:POSition:STOP? Description Set the position of the delta marker of the specified Delta Pair marker. Query the position of the delta marker of the specified Delta Pair marker. Parameter Name Type...
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:X:SPAN Syntax :CALCulate:MARKer<n>:X:SPAN <param> :CALCulate:MARKer<n>:X:SPAN? Description Set the X value corresponding to the span of the specified Span Pair marker. Query the X value corresponding to the span of the specified Span Pair marker. Parameter...
RIGOL Chapter 2 Command System If the current readout mode is frequency, it cannot exceed the frequency range of the sweep and the units available are Hz (default), kHz, MHz and GHz. If the current readout mode is time. it cannot exceed the time range of the sweep and the units available are s (default), us, ms and ks.
RIGOL Chapter 2 Command System :CALCulate:MARKer<n>:Y? Syntax :CALCulate:MARKer<n>:Y? Description Query the Y-axis value of the specified marker and the default unit is dBm. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Explanation If the specified marker is normal marker, query the Y value of the marker.
RIGOL Chapter 2 Command System :CALCulate:MARKer:TRACking:STATe Syntax :CALCulate:MARKer:TRACking:STATe OFF|ON|0|1 :CALCulate:MARKer:TRACking:STATe? Description Enable or disable the signal track. Query the status of the signal track. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 Explanation When signal track is enabled, the instrument will execute a peak search after each sweep and set the center frequency to the frequency of the current peak to hold the signal at the center of the screen.
RIGOL Chapter 2 Command System :CONFigure:CHPower Syntax :CONFigure:CHPower Description Set the spectrum analyzer to the channel power measurement state. Explanation This command stops the current measurement and sets the instrument to the default state of the specified measurement. When any of the measurement settings is changed, use the...
RIGOL Chapter 2 Command System :CONFigure:HDISt Syntax :CONFigure:HDISt Description Set the spectrum analyzer to the harmonic distortion measurement state. Explanation This command stops the current measurement and sets the instrument to the default state of the specified measurement. When any of the measurement settings is changed, use the...
RIGOL Chapter 2 Command System :CONFigure:TOI Syntax :CONFigure:TOI Description Set the spectrum analyzer to the TOI measurement state. Explanation This command stops the current measurement and sets the instrument to the default state of the specified measurement. When any of the measurement settings is changed, use the...
RIGOL Chapter 2 Command System :COUPle Subsystem Command List: :COUPle :COUPle Syntax :COUPle ALL|NONE :COUPle? Description Set all the related parameters automatically according to the coupling relationship. Query the status of the coupling linked setting. Parameter Name Type Range...
RIGOL Chapter 2 Command System :DISPlay:AFUnction:POSition Syntax :DISPlay:AFUnction:POSition BOTTom|CENTer|TOP :DISPlay:AFUnction:POSition? Description Set the position of the active function area on the screen. Query the position of the active function area on the screen. Parameter Name Type Range Default Keyword BOTTom|CENTer|TOP...
RIGOL Chapter 2 Command System :DISPlay:BRIGhtness Syntax :DISPlay:BRIGhtness <integer> :DISPlay:BRIGhtness? Description Set the screen brightness. Query the screen brightness. Parameter Name Type Range Default <integer> Integer 1 to 10 Return Format The query returns the brightness in integer. Example The command below sets the brightness to 6.
RIGOL Chapter 2 Command System :DISPlay:MSGswitch:STATe Syntax :DISPlay:MSGswitch:STATe OFF|ON|0|1 :DISPlay:MSGswitch:STATe? Description Enable or disable the message display. Query the status of message display. Parameter Name Type Range Default Bool OFF|ON|0|1 ON|1 Return Format The query returns 0 or 1. Example The command below disables the message display.
RIGOL Chapter 2 Command System :DISPlay:WINdow:TRACe:GRATicule:GRID Syntax :DISPlay:WINdow:TRACe:GRATicule:GRID <integer> :DISPlay:WINdow:TRACe:GRATicule:GRID? Description Set the brightness of the screen grid. Query the brightness of the screen grid. Parameter Name Type Range Default <integer> Integer 0 to 10 Return Format The query returns the brightness of the screen grid in integer.
RIGOL Chapter 2 Command System :DISPlay:WINdow:TRACe:Y:DLINe Syntax :DISPlay:WINdow:TRACe:Y:DLINe <ampl> :DISPlay:WINdow:TRACe:Y:DLINe? Description Set the position of the display line on the screen and the default unit is dBm. Query the position of the display line. Parameter Name Type Range Default <ampl>...
RIGOL Chapter 2 Command System :DISPlay:WINdow:TRACe:Y[:SCALe]:NRLevel Syntax :DISPlay:WINdow:TRACe:Y[:SCALe]:NRLevel <rel_ampl> :DISPlay:WINdow:TRACe:Y[:SCALe]:NRLevel? Description Set the reference level of normalization. Query the reference level of normalization. Parameter Name Type Range Default <rel_ampl> Consecutive Real Number -200 dB to 200 dB 0 dB Explanation This command changes the reference level of VSWR at the same time.
RIGOL Chapter 2 Command System :DISPlay:WINdow:TRACe:Y[:SCALe]:PDIVision Syntax :DISPlay:WINdow:TRACe:Y[:SCALe]:PDIVision <rel_ampl> :DISPlay:WINdow:TRACe:Y[:SCALe]:PDIVision? Description Set the Y-axis scale. Query the Y-axis scale. Parameter Name Type Range Default <rel_ampl> Consecutive Real Number 0.1 dB to 20 dB 10 dB Return Format The query returns the Y-axis scale in scientific notation.
RIGOL Chapter 2 Command System :DISPlay:WINdow:TRACe:Y[:SCALe]:RLEVel:OFFSet Syntax :DISPlay:WINdow:TRACe:Y[:SCALe]:RLEVel:OFFSet <rel_ampl> :DISPlay:WINdow:TRACe:Y[:SCALe]:RLEVel:OFFSet? Description Set the offset of the reference level. Query the offset of the reference level. Parameter Name Type Range Default <rel_ampl> Consecutive Real Number -300 dB to 300 dB 0 dB Explanation The offset of the reference level modifies the reference level and amplitude readout of the marker;...
RIGOL Chapter 2 Command System :FETCh:ACPower? Syntax :FETCh:ACPower? Description Query the results of adjacent channel power measurement. Explanation This command is only available when the adjacent channel power measurement is enabled. The power unit of the return values is the same with the current Y-axis unit.
RIGOL Chapter 2 Command System :FETCh:ACPower:MAIN? Syntax :FETCh:ACPower:MAIN? Description Query the main channel power of adjacent channel power measurement. Explanation This command is only available when the adjacent channel power measurement is enabled. The power unit of the return value is the same with the current Y-axis unit.
RIGOL Chapter 2 Command System :FETCh:CHPower? Syntax :FETCh:CHPower? Description Query the results of channel power measurement. Explanation This command is only available when the channel power measurement is enabled. The power unit of the return values is the same with the current Y-axis unit.
RIGOL Chapter 2 Command System :FETCh:CHPower:DENSity? Syntax :FETCh:CHPower:DENSity? Description Query the channel power spectral density. Explanation This command is only available when the channel power measurement is enabled. The power unit of the return value is the same with the current Y-axis unit.
RIGOL Chapter 2 Command System :FETCh:CNRatio:CARRier? Syntax :FETCh:CNRatio:CARRier? Description Query the carrier power. Explanation This command is only available when the C/N ratio measurement is enabled. The power unit of the return value is the same with the current Y-axis unit.
RIGOL Chapter 2 Command System :FETCh:CNRatio:NOISe? Syntax :FETCh:CNRatio:NOISe? Description Query the noise power. Explanation This command is only available when the C/N ratio measurement is enabled. The power unit of the return value is the same with the current Y-axis unit.
RIGOL Chapter 2 Command System :FETCh:HARMonics:AMPLitude:ALL? Syntax :FETCh:HARMonics:AMPLitude:ALL? Description Query the amplitudes of the first 10 harmonics and the first harmonic is the fundamental waveform. Explanation This command is only available when the harmonic distortion measurement is enabled. The amplitude unit of the return values is the same with the current Y-axis unit.
RIGOL Chapter 2 Command System :FETCh:HARMonics[:DISTortion]? Syntax :FETCh:HARMonics[:DISTortion]? Description Query the percentage of the total harmonic distortion. Explanation This command is only available when the harmonic distortion measurement is enabled. This command will select data from the latest measurement results and transmit the data to the output buffer.
RIGOL Chapter 2 Command System :FETCh:HARMonics:FREQuency? <n> Syntax :FETCh:HARMonics:FREQuency? <n> Description Query the frequency of the specified harmonic. Parameter Name Type Range Default <n> Integer 1 to 10 Explanation This command is only available when the harmonic distortion measurement is enabled.
RIGOL Chapter 2 Command System :FETCh:OBWidth? Syntax :FETCh:OBWidth? Description Query the results of occupied bandwidth measurement. Explanation This command is only available when the occupied bandwidth measurement is enabled. This command will select data from the latest measurement results and transmit the data to the output buffer.
RIGOL Chapter 2 Command System :FETCh:OBWidth:OBWidth:FERRor? Syntax :FETCh:OBWidth:OBWidth:FERRor? Description Query the transmit frequency error. Explanation This command is only available when the occupied bandwidth measurement is enabled. This command will select data from the latest measurement results and transmit the data to the output buffer.
RIGOL Chapter 2 Command System :FETCh:TOIntercept:IP3? Syntax :FETCh:TOIntercept:IP3? Description Query the minor one of the intercepts of the Third Order Lower and the Third Order Upper. Explanation This command is only available when the TOI measurement is enabled. This command will select data from the latest measurement results and transmit the data to the output buffer.
RIGOL Chapter 2 Command System :FORMat Subsystem Command List: :FORMat:BORDer :FORMat[:TRACe][:DATA] :FORMat:BORDer Syntax :FORMat:BORDer NORMal|SWAPped :FORMat:BORDer? Description Set the byte order of binary data transmission. Query the byte order of binary data transmission. Parameter Name Type Range Default...
RIGOL Chapter 2 Command System :FORMat[:TRACe][:DATA] Syntax :FORMat[:TRACe][:DATA] ASCii|REAL[,32] :FORMat[:TRACe][:DATA]? Description Set the input/output format of the trace data. Query the input/output format of the trace data. Parameter Name Type Range Default Keyword ASCii|REAL[,32] ASCii Explanation ASCii: the data points are ASCII characters separated by commas.
RIGOL Chapter 2 Command System :HCOPy:IMAGe:FTYPe Syntax :HCOPy:IMAGe:FTYPe DEFault|EXIFjpeg :HCOPy:IMAGe:FTYPe? Description Set the image type of the print to default or Exif/JPEG. Parameter Name Type Range Default Keyword DEFault|EXIFjpeg DEFault Return Format The query returns DEF or EXIF. Example The command below sets the image type of the print to Exif/JPEG.
RIGOL Chapter 2 Command System :HCOPy:IMAGe:PTIMe Syntax :HCOPy:IMAGe:PTIMe OFF|ON|0|1 :HCOPy:IMAGe:PTIMe? Description Enable or disable date print. Query the status of date print. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 Explanation OFF|0: disable date print. ON|1: enable date print. Return Format The query returns 0 or 1.
RIGOL Chapter 2 Command System Example The command below sets the print quality to draft. :HCOPy:IMAGe:QUALity DRAFt The query below returns DRAF. :HCOPy:IMAGe:QUALity? :HCOPy[:IMMediate] Syntax :HCOPy[:IMMediate] Description Execute the print operation. :HCOPy:PAGE:ORIentation Syntax :HCOPy:PAGE:ORIentation LANDscape|PORTrait :HCOPy:PAGE:ORIentation? Description Set the print orientation to landscape or portrait.
RIGOL Chapter 2 Command System :HCOPy:PAGE:PRINts Syntax :HCOPy:PAGE:PRINts <integer> :HCOPy:PAGE:PRINts? Description Set the print copies. Query the print copies. Parameter Name Type Range Default <integer> Integer 1 to 999 Return Format The query returns the print copies in integer. Example The command below sets the print copies to 10.
RIGOL Chapter 2 Command System IEEE 488.2 Common Commands IEEE 488.2 common commands are used to operate or query the status registers. About the structure of the status registers, please refer to :STATus Subsystem. Command List: *CLS *ESE ...
The query returns the ID string in the format below. Rigol Technologies,<model>,<serial number>,XX.XX.XX.XX.XX <model>: instrument model <serial number>: serial number of the instrument XX.XX.XX.XX.XX: software version of the instrument Example The query below returns Rigol Technologies,DSA832E,DSA8A134400008,00.00.00.00.03. *IDN? 2-72 DSA800E Programming Guide...
RIGOL Chapter 2 Command System *OPC Syntax *OPC *OPC? Description The *OPC command sets bit 0 of the standard event status register to 1 after the current operation is finished. The *OPC? command queries whether the current operation is finished.
RIGOL Chapter 2 Command System *STB? Syntax *STB? Description Query the event register for the status byte register. Explanation The bit 0 and bit 1 of the status byte register are not used and are always treated as 0; therefore, the query returns the decimal numbers corresponding to the binary numbers ranging from 00000000 (0 in decimal) to 11111111 (255 in decimal) and of which the bit 0 and bit 1 are 0.
RIGOL Chapter 2 Command System :INITiate Subsystem Command List: :INITiate:CONTinuous :INITiate[:IMMediate] :INITiate:PAUSe* :INITiate:RESTart* :INITiate:RESume* Explanation: Commands marked with "*" are only available for DSA800E installed with the advanced measurement kit (option). :INITiate:CONTinuous Syntax :INITiate:CONTinuous OFF|ON|0|1...
RIGOL Chapter 2 Command System :INITiate[:IMMediate] Syntax :INITiate[:IMMediate] Description In non-measurement state, initialize a sweep. In measurement state, trigger a measurement. Explanation The instrument must be in single measurement mode. This command will be ignored if :INITiate:CONTinuous command is set to ON or 1.
If the output impedance of the system under measurement is 75 Ω, you should use a 75 Ω to 50 Ω adapter (option) supplied by RIGOL to connect the spectrum analyzer with the system under test and then set the input impedance of the spectrum analyzer to 75 Ω.
<file_name> should contain the path and the filename; for example, E:\Rigol\Trace1.trc. This operation fails if the file with the specified filename does not exist. Example The command below deletes the Trace1.trc file under the Rigol folder in the USB storage device. :MMEMory:DELete E:\Rigol\Trace1.trc 2-78...
RIGOL Chapter 2 Command System :MMEMory:DISK:INFormation? Syntax :MMEMory:DISK:INFormation? Description Query the disk information of the current USB storage device. Return Format The query returns the disk information (include the disk name, type, file system, space used and total capacity) in string.
RIGOL Chapter 2 Command System :MMEMory:LOAD:LIMit Syntax :MMEMory:LOAD:LIMit <file_name> Description Load the edited limit line file (.lim) into the instrument. Parameter Name Type Range Default <file_name> ASCII String Explanation <file_name> should contain the path and the filename. This operation fails when the specified file does not exist.
RIGOL Chapter 2 Command System :MMEMory:LOAD:SETUp Syntax :MMEMory:LOAD:SETUp <file_name> Description Load the specified setup file (.set). Parameter Name Type Range Default <file_name> ASCII String Explanation <file_name> should contain the path and the filename. This operation fails if the specified file does not exist.
RIGOL Chapter 2 Command System :MMEMory:LOAD:TRACe Syntax :MMEMory:LOAD:TRACe <file_name> Description Load the specified trace file (.trc). Parameter Name Type Range Default <file_name> ASCII String Explanation <file_name> should contain the path and the filename. This operation fails if the specified file does not exist.
RIGOL Chapter 2 Command System :MMEMory:STORe:CORRection Syntax :MMEMory:STORe:CORRection ANTenna|CABLe|OTHer|USER,<file_name> Description Save the amplitude correction data file with the specified filename (.cbl or .csv). Parameter Name Type Range Default Keyword ANTenna|CABLe|OTHer|USER <file_name> ASCII String Explanation <file_name> should contain the path and the filename.
RIGOL Chapter 2 Command System :MMEMory:STORe:MTABle Syntax :MMEMory:STORe:MTABle <file_name> Description Save the marker table in the USB storage device with the specified filename (.mkr or .csv). Parameter Name Type Range Default <file_name> ASCII String Explanation <file_name> should contain the path and the filename.
RIGOL Chapter 2 Command System :MMEMory:STORe:RESults Syntax :MMEMory:STORe:RESults <file_name> Description Save the current measurement results in the USB storage device with the specified filename (.csv). Parameter Name Type Range Default <file_name> ASCII String Explanation <file_name> should contain the path and the filename.
RIGOL Chapter 2 Command System :MMEMory:STORe:SETUp Syntax :MMEMory:STORe:SETUp <file_name> Description Save the current setting with the specified filename (.set). Parameter Name Type Range Default <file_name> ASCII String Explanation <file_name> should contain the path and the filename. You can save the setup file in the D disk or E disk.
RIGOL Chapter 2 Command System :MMEMory:STORe:TRACe Syntax :MMEMory:STORe:TRACe <label>,<file_name> Description Save the specified trace with the specified filename (.trc or .csv). Parameter Name Type Range Default <label> Keyword TRACE1|TRACE2|TRACE3|MATH|ALL <file_name> ASCII String Explanation <file_name> should contain the path and the filename.
RIGOL Chapter 2 Command System :OUTPut Subsystem Command List: :OUTPut[:STATe] :OUTPut[:STATe] Syntax :OUTPut[:STATe] OFF|ON|0|1 :OUTPut[:STATe]? Description Enable or disable the output of the tracking generator. Query the on/off status of the tracking generator. Parameter Name Type Range Default Bool...
RIGOL Chapter 2 Command System :READ Subsystem Both the :READ commands and the :FETCh commands are used to acquire the measurement results. The difference between them lies in that the :FETCh commands acquire the measurement results immediately while the :READ commands start a measurement and return the measurement results after the measurement finishes.
RIGOL Chapter 2 Command System :READ:ACPower? Syntax :READ:ACPower? Description Execute an adjacent channel power measurement and return the measurement results. Explanation The power unit of the return values is the same with the current Y-axis unit. This command will select data from the latest measurement results and transmit the data to the output buffer.
RIGOL Chapter 2 Command System :READ:ACPower:UPPer? Syntax :READ:ACPower:UPPer? Description Execute an adjacent channel power measurement and return the upper channel power. Explanation The power unit of the return value is the same with the current Y-axis unit. This command will select data from the latest measurement results and transmit the data to the output buffer.
RIGOL Chapter 2 Command System :READ:CHPower:DENSity? Syntax :READ:CHPower:DENSity? Description Execute a channel power measurement and return the channel power spectral density. Explanation The power unit of the return value is the same with the current Y-axis unit. This command will select data from the latest measurement results and transmit the data to the output buffer.
RIGOL Chapter 2 Command System :READ:CNRatio:CNRatio? Syntax :READ:CNRatio:CNRatio? Description Execute a C/N ratio measurement and return the C/N ratio. Explanation This command will select data from the latest measurement results and transmit the data to the output buffer. Return Format The query returns the C/N ratio in scientific notation.
RIGOL Chapter 2 Command System :READ:HARMonics:AMPLitude:ALL? Syntax :READ:HARMonics:AMPLitude:ALL? Description Execute a harmonic distortion measurement and return the amplitudes of the first 10 harmonics. Explanation If the number of harmonics under measurement is less than 10, the harmonics that are not measured do not have return values.
RIGOL Chapter 2 Command System :READ:HARMonics[:DISTortion]? Syntax :READ:HARMonics[:DISTortion]? Description Execute a harmonic distortion measurement and return the percentage of the total harmonic distortion. Explanation This command will select data from the latest measurement results and transmit the data to the output buffer.
RIGOL Chapter 2 Command System :READ:HARMonics:FREQuency? <n> Syntax :READ:HARMonics:FREQuency? <n> Description Execute a harmonic distortion measurement and return the frequency of the specified harmonic. Parameter Name Type Range Default <n> Integer 1 to 10 Explanation The query returns --- when the harmonic read does not have data.
RIGOL Chapter 2 Command System :READ:OBWidth:OBWidth? Syntax :READ:OBWidth:OBWidth? Description Execute an occupied bandwidth measurement and return the occupied bandwidth. Explanation This command will select data from the latest measurement results and transmit the data to the output buffer. Return Format The query returns the occupied bandwidth in integer and the unit is Hz.
RIGOL Chapter 2 Command System :READ:TOIntercept:IP3? Syntax :READ:TOIntercept:IP3? Description Execute a TOI measurement and return the minor one of the intercepts of the 3rd Order Lower and the 3rd Order Upper. Explanation This command will select data from the latest measurement results and transmit the data to the output buffer.
RIGOL Chapter 2 Command System [:SENSe]:ACPower:AVERage:COUNt Syntax [:SENSe]:ACPower:AVERage:COUNt <integer> [:SENSe]:ACPower:AVERage:COUNt? Description Set the number of averages of the adjacent channel power measurement. Query the number of averages of the adjacent channel power measurement. Parameter Name Type Range Default <integer> Integer...
RIGOL Chapter 2 Command System [:SENSe]:ACPower:AVERage:TCONtrol Syntax [:SENSe]:ACPower:AVERage:TCONtrol EXPonential|REPeat [:SENSe]:ACPower:AVERage:TCONtrol? Description Set the average mode of the adjacent channel power measurement. Query the average mode of the adjacent channel power measurement. Parameter Name Type Range Default Keyword EXPonential|REPeat EXPonential Explanation...
RIGOL Chapter 2 Command System Example The command below sets the adjacent channel bandwidth to 1 MHz. :SENSe:ACPower:BANDwidth:ACHannel 1000000 The query below returns 1000000. :SENSe:ACPower:BANDwidth:ACHannel? [:SENSe]:ACPower:BANDwidth:INTegration Syntax [:SENSe]:ACPower:BANDwidth:INTegration <freq> [:SENSe]:ACPower:BANDwidth:INTegration? Description Set the main channel bandwidth. Query the main channel bandwidth.
RIGOL Chapter 2 Command System [:SENSe]:ACPower:CSPacing Syntax [:SENSe]:ACPower:CSPacing <freq> [:SENSe]:ACPower:CSPacing? Description Set the center frequency difference (channel spacing) between the main channel and the adjacent channels. Query the channel spacing. Parameter Name Type Range Default <freq> Consecutive Real Number 33 Hz to 2.5 GHz...
RIGOL Chapter 2 Command System [:SENSe]:BANDwidth[:RESolution] Syntax [:SENSe]:BANDwidth[:RESolution] <freq> [:SENSe]:BANDwidth[:RESolution]? Description Set the resolution bandwidth (RBW). Query the resolution bandwidth. Parameter Name Type Range Default <freq> Discrete 10 Hz to 1 MHz, at 1-3-10 step 1 MHz Explanation When the detector type is Quasi-Peak (refer to the...
RIGOL Chapter 2 Command System [:SENSe]:BANDwidth:VIDeo Syntax [:SENSe]:BANDwidth:VIDeo <freq> [:SENSe]:BANDwidth:VIDeo? Description Set the video bandwidth (VBW). Query the video bandwidth. Parameter Name Type Range Default <freq> Discrete 1 Hz to 3 MHz, at 1-3-10 step 1 MHz Return Format The query returns the video bandwidth in integer and the unit is Hz.
RIGOL Chapter 2 Command System [:SENSe]:BANDwidth:VIDeo:RATio Syntax [:SENSe]:BANDwidth:VIDeo:RATio <number> [:SENSe]:BANDwidth:VIDeo:RATio? Description Set the V/R ratio, namely the ratio of VBW to RBW. Query the V/R ratio. Parameter Name Type Range Default <number> Discrete 0.000001 to 30000, at 1-3-10 step Return Format The query returns the V/R ratio in scientific notation.
RIGOL Chapter 2 Command System [:SENSe]:CHPower:AVERage[:STATe] Syntax [:SENSe]:CHPower:AVERage[:STATe] OFF|ON|0|1 [:SENSe]:CHPower:AVERage[:STATe]? Description Enable or disable the average measurement function of the channel power measurement. Query the status of the average measurement function of the channel power measurement. Parameter Name Type Range...
RIGOL Chapter 2 Command System Example The command below sets the average mode to repeat average. :SENSe:CHPower:AVERage:TCONtrol REPeat The query below returns REP. :SENSe:CHPower:AVERage:TCONtrol? [:SENSe]:CHPower:BANDwidth:INTegration Syntax [:SENSe]:CHPower:BANDwidth:INTegration <freq> [:SENSe]:CHPower:BANDwidth:INTegration? Description Set the integration bandwidth of the channel power measurement. Query the integration bandwidth.
RIGOL Chapter 2 Command System Return Format The query returns the channel span in integer and the unit is Hz. Example The command below sets the channel span to 1 MHz. :SENSe:CHPower:FREQuency:SPAN 1000000 The query below returns 1000000. :SENSe:CHPower:FREQuency:SPAN? [:SENSe]:CNRatio:AVERage:COUNt Syntax [:SENSe]:CNRatio:AVERage:COUNt <integer>...
RIGOL Chapter 2 Command System [:SENSe]:CNRatio:AVERage[:STATe] Syntax [:SENSe]:CNRatio:AVERage[:STATe] OFF|ON|0|1 [:SENSe]:CNRatio:AVERage[:STATe]? Description Enable or disable the average measurement function of the C/N ratio measurement. Query the status of the average measurement function of the C/N ratio measurement. Parameter Name Type Range...
RIGOL Chapter 2 Command System Example The command below sets the average mode to repeat average. :SENSe:CNRatio:AVERage:TCONtrol REPeat The query below returns REP. :SENSe:CNRatio:AVERage:TCONtrol? [:SENSe]:CNRatio:BANDwidth:INTegration Syntax [:SENSe]:CNRatio:BANDwidth:INTegration <freq> [:SENSe]:CNRatio:BANDwidth:INTegration? Description Set the carrier bandwidth. Query the carrier bandwidth. Parameter Name...
RIGOL Chapter 2 Command System [:SENSe]:CNRatio:BANDwidth:NOISe Syntax [:SENSe]:CNRatio:BANDwidth:NOISe <freq> [:SENSe]:CNRatio:BANDwidth:NOISe? Description Set the noise bandwidth. Query the noise bandwidth. Parameter Name Type Range Default <freq> Consecutive Real Number 33 Hz to 2.5 GHz 2 MHz Explanation This command is only available when the C/N ratio measurement is enabled.
RIGOL Chapter 2 Command System [:SENSe]:CORRection:CSET:ALL:DELete Syntax [:SENSe]:CORRection:CSET:ALL:DELete Description Delete all the amplitude correction data. [:SENSe]:CORRection:CSET:ALL[:STATe] Syntax [:SENSe]:CORRection:CSET:ALL[:STATe] OFF|ON|0|1 [:SENSe]:CORRection:CSET:ALL[:STATe]? Description Enable or disable the amplitude correction function. Query the status of the amplitude correction function. Parameter Name Type Range...
RIGOL Chapter 2 Command System [:SENSe]:CORRection:CSET<n>:DATA Syntax [:SENSe]:CORRection:CSET<n>:DATA <freq>,<rel_ampl>{,<freq>,<rel_ampl>} [:SENSe]:CORRection:CSET<n>:DATA? Description Create an amplitude correction curve using the specified data. Query the specified amplitude correction data. Parameter Name Type Range Default <n> Discrete 1|2|3|4 <freq> Consecutive Real Number 0 Hz to 3.2 GHz <rel_ampl>...
RIGOL Chapter 2 Command System [:SENSe]:CORRection:CSET<n>:DELete Syntax [:SENSe]:CORRection:CSET<n>:DELete Description Delete the specified amplitude correction setting. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Explanation <n>: 1 denotes Antenna, 2 denotes Cable, 3 denotes Other and 4 denotes User. Example The command below deletes the Antenna correction setting.
RIGOL Chapter 2 Command System [:SENSe]:CORRection:CSET<n>:X:SPACing Syntax [:SENSe]:CORRection:CSET<n>:X:SPACing LINear|LOGarithmic [:SENSe]:CORRection:CSET<n>:X:SPACing? Description Set the frequency interpolation mode of the amplitude correction. Query the frequency interpolation mode of the amplitude correction. Parameter Name Type Range Default <n> Discrete 1|2|3|4 Keyword LINear|LOGarithmic LINear Explanation <n>: 1 denotes Antenna, 2 denotes Cable, 3 denotes Other and 4 denotes User.
RIGOL Chapter 2 Command System [:SENSe]:DEMod Syntax [:SENSe]:DEMod AM|FM|OFF [:SENSe]:DEMod? Description Set the demodulation type or disable the demodulation. Query the demodulation type. Parameter Name Type Range Default Keyword AM|FM|OFF Explanation AM: amplitude modulation FM: frequency modulation OFF: off When AM or FM is selected, the spectrum analyzer enables the demodulation function automatically. At this...
RIGOL Chapter 2 Command System Example The command below enables the auto setting mode of the signal gain. :SENSe:DEMod:GAIN:AUTO ON or :SENSe:DEMod:GAIN:AUTO 1 The query below returns 1. :SENSe:DEMod:GAIN:AUTO? [:SENSe]:DEMod:GAIN:INCRement Syntax [:SENSe]:DEMod:GAIN:INCRement <integer> [:SENSe]:DEMod:GAIN:INCRement? Description Set the signal gain. Query the signal gain.
RIGOL Chapter 2 Command System [:SENSe]:DEMod:STATe Syntax [:SENSe]:DEMod:STATe OFF|ON|0|1 [:SENSe]:DEMod:STATe? Description Enable or disable the demodulation function. Query the status of the demodulation function. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 Explanation When the demodulation function is enabled, AM demodulation is selected by default.
RIGOL Chapter 2 Command System Example The command below sets the number of averages to 100. :SENSe:EBWidth:AVERage:COUNt 100 The query below returns 100. :SENSe:EBWidth:AVERage:COUNt? [:SENSe]:EBWidth:AVERage[:STATe] Syntax [:SENSe]:EBWidth:AVERage[:STATe] OFF|ON|0|1 [:SENSe]:EBWidth:AVERage[:STATe]? Description Enable or disable the average measurement function of the emission bandwidth measurement.
RIGOL Chapter 2 Command System [:SENSe]:EBWidth:AVERage:COUNt command) measurement results. When repeat average is selected, the result is the arithmetic average of the latest N (specified by the [:SENSe]:EBWidth:AVERage:COUNt command) measurement results. This command is only available when the emission bandwidth measurement is enabled.
RIGOL Chapter 2 Command System [:SENSe]:EBWidth:MAXHold:STATe Syntax [:SENSe]:EBWidth:MAXHold:STATe OFF|ON|0|1 [:SENSe]:EBWidth:MAXHold:STATe? Description Enable or disable the Max Hold. Query the status of the Max Hold. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 Explanation This command is only available when the emission bandwidth measurement is enabled.
RIGOL Chapter 2 Command System Example The command below sets the value of X dB to -20 dB. :SENSe:EBWidth:XDB -20 The query below returns -2.000000E+01. :SENSe:EBWidth:XDB? [:SENSe]:EXTRef[:STATe]? Syntax [:SENSe]:EXTRef[:STATe]? Description Query the reference state of the instrument. Explanation The query returns 1: the instrument is using external reference oscillator.
RIGOL Chapter 2 Command System [:SENSe]:FREQuency:CENTer:DOWN Syntax [:SENSe]:FREQuency:CENTer:DOWN Description Decrease the center frequency at the center frequency step. [:SENSe]:FREQuency:CENTer:SET:STEP Syntax [:SENSe]:FREQuency:CENTer:SET:STEP Description Set the CF step to the current center frequency. [:SENSe]:FREQuency:CENTer:STEP:AUTO Syntax [:SENSe]:FREQuency:CENTer:STEP:AUTO OFF|ON|0|1 [:SENSe]:FREQuency:CENTer:STEP:AUTO? Description Enable or disable the auto setting mode of the CF step.
RIGOL Chapter 2 Command System [:SENSe]:FREQuency:CENTer:STEP[:INCRement] Syntax [:SENSe]:FREQuency:CENTer:STEP[:INCRement] <freq> [:SENSe]:FREQuency:CENTer:STEP[:INCRement]? Description Set the CF step. Query the CF step. Parameter Name Type Range Default <freq> Consecutive Real Number 1 Hz to 3.2 GHz 320 MHz Return Format The query returns the CF step in integer and the unit is Hz.
RIGOL Chapter 2 Command System Example The command below sets the frequency offset to 1 MHz. :SENSe:FREQuency:OFFSet 1000000 The query below returns 1000000. :SENSe:FREQuency:OFFSet? [:SENSe]:FREQuency:SPAN Syntax [:SENSe]:FREQuency:SPAN <freq> [:SENSe]:FREQuency:SPAN? Description Set the span. Query the span. Parameter Name Type Range Default <freq>...
RIGOL Chapter 2 Command System [:SENSe]:FREQuency:SPAN:PREVious Syntax [:SENSe]:FREQuency:SPAN:PREVious Description Set the span to the previous span setting. [:SENSe]:FREQuency:SPAN:ZIN Syntax [:SENSe]:FREQuency:SPAN:ZIN Description Set the span to half of the current value. [:SENSe]:FREQuency:SPAN:ZOUT Syntax [:SENSe]:FREQuency:SPAN:ZOUT Description Set the span to twice of the current value.
RIGOL Chapter 2 Command System [:SENSe]:FREQuency:STOP Syntax [:SENSe]:FREQuency:STOP <freq> [:SENSe]:FREQuency:STOP? Description Set the stop frequency. Query the stop frequency. Parameter Name Type Range Default <freq> Consecutive Real Number 0 Hz to 3.2 GHz 3.2 GHz Return Format The query returns the stop frequency in integer and the unit is Hz.
RIGOL Chapter 2 Command System [:SENSe]:HDISt:AVERage[:STATe] Syntax [:SENSe]:HDISt:AVERage[:STATe] OFF|ON|0|1 [:SENSe]:HDISt:AVERage[:STATe]? Description Enable or disable the average measurement function of the harmonic distortion measurement. Query the status of the average measurement function of the harmonic distortion measurement. Parameter Name Type Range...
RIGOL Chapter 2 Command System Example The command below sets the average mode to repeat average. :SENSe:HDISt:AVERage:TCONtrol REPeat The query below returns REP. :SENSe:HDISt:AVERage:TCONtrol? [:SENSe]:HDISt:NUMBers Syntax [:SENSe]:HDISt:NUMBers <integer> [:SENSe]:HDISt:NUMBers? Description Set the number of the harmonics to be measured. Query the number of the harmonics to be measured.
RIGOL Chapter 2 Command System [:SENSe]:HDISt:TIME Syntax [:SENSe]:HDISt:TIME <time> [:SENSe]:HDISt:TIME? Description Set the sweep time of the harmonic distortion measurement. Query the sweep time of the harmonic distortion measurement. Parameter Name Type Range Default <time> Consecutive Real Number 20 us to 3.2 ks...
RIGOL Chapter 2 Command System [:SENSe]:OBWidth:AVERage:COUNt Syntax [:SENSe]:OBWidth:AVERage:COUNt <integer> [:SENSe]:OBWidth:AVERage:COUNt? Description Set the number of averages of the occupied bandwidth measurement. Query the number of averages of the occupied bandwidth measurement. Parameter Name Type Range Default <integer> Integer 1 to 1000 Explanation This commend is only available when the occupied bandwidth measurement is enabled.
RIGOL Chapter 2 Command System [:SENSe]:OBWidth:AVERage:TCONtrol Syntax [:SENSe]:OBWidth:AVERage:TCONtrol EXPonential|REPeat [:SENSe]:OBWidth:AVERage:TCONtrol? Description Set the average mode of the occupied bandwidth measurement. Query the average mode of the occupied bandwidth measurement. Parameter Name Type Range Default Keyword EXPonential|REPeat EXPonential Explanation EXPonential: exponential average...
RIGOL Chapter 2 Command System Example The command below sets the span to 1 MHz. :SENSe:OBWidth:FREQuency:SPAN 1000000 The query below returns 1000000. :SENSe:OBWidth:FREQuency:SPAN? [:SENSe]:OBWidth:MAXHold:STATe Syntax [:SENSe]:OBWidth:MAXHold:STATe OFF|ON|0|1 [:SENSe]:OBWidth:MAXHold:STATe? Description Enable or disable the Max Hold of the occupied bandwidth measurement.
RIGOL Chapter 2 Command System [:SENSe]:OBWidth:PERCent Syntax [:SENSe]:OBWidth:PERCent <real> [:SENSe]:OBWidth:PERCent? Description Set the percentage (power ratio) the signal power takes up in the whole span power. Query the power ratio of the occupied bandwidth measurement. Parameter Name Type Range Default <real>...
RIGOL Chapter 2 Command System [:SENSe]:POWer:ATUNe Syntax [:SENSe]:POWer:ATUNe Description Search for signals within the full frequency range and adjust the frequency and amplitude for optimum display effect of the signal. [:SENSe]:POWer[:RF]:ATTenuation Syntax [:SENSe]:POWer[:RF]:ATTenuation <rel_ampl> [:SENSe]:POWer[:RF]:ATTenuation? Description Set the attenuation of the RF attenuator.
RIGOL Chapter 2 Command System [:SENSe]:POWer[:RF]:ATTenuation:AUTO Syntax [:SENSe]:POWer[:RF]:ATTenuation:AUTO OFF|ON|0|1 [:SENSe]:POWer[:RF]:ATTenuation:AUTO? Description Enable or disable the auto setting mode of the input attenuation. Query the status of the auto setting mode of the input attenuation. Parameter Name Type Range Default Bool...
RIGOL Chapter 2 Command System [:SENSe]:POWer[:RF]:MIXer:RANGe[:UPPer] Syntax [:SENSe]:POWer[:RF]:MIXer:RANGe[:UPPer] <ampl> [:SENSe]:POWer[:RF]:MIXer:RANGe[:UPPer]? Description Set the maximum power of the input mixer. Query the maximum power of the input mixer. Parameter Name Type Range Default <ampl> Integer -30 dBm to 0 dBm -10 dBm Return Format The query returns the maximum power of the input mixer in scientific notation and the unit is dBm.
RIGOL Chapter 2 Command System [:SENSe]:SWEep:COUNt:CURRent? Syntax [:SENSe]:SWEep:COUNt:CURRent? Description Query the number of sweeps that have been finished in single sweep. Explanation [:SENSe]:SWEep:COUNt? command queries the number of sweeps to be executed in a single sweep. While, this command queries the number of sweeps that have been finished in single sweep.
RIGOL Chapter 2 Command System [:SENSe]:SWEep:TIME Syntax [:SENSe]:SWEep:TIME <time> [:SENSe]:SWEep:TIME? Description Set the sweep time. Query the sweep time. Parameter Name Type Range Default <time> Consecutive Real Number 20 us to 3200 s 16 ms Return Format The query returns the sweep time in scientific notation and the unit is s.
RIGOL Chapter 2 Command System [:SENSe]:SWEep:TIME:AUTO:RULes Syntax [:SENSe]:SWEep:TIME:AUTO:RULes NORMal|ACCuracy [:SENSe]:SWEep:TIME:AUTO:RULes? Description Set the setting method of the auto sweep time. Query the setting method of the auto sweep time. Parameter Name Type Range Default Keyword NORMal|ACCuracy NORMal Return Format The query returns NORM or ACC.
RIGOL Chapter 2 Command System [:SENSe]:TOI:AVERage[:STATe] Syntax [:SENSe]:TOI:AVERage[:STATe] OFF|ON|0|1 [:SENSe]:TOI:AVERage[:STATe]? Description Enable or disable the average measurement function of the TOI measurement. Query the status of the average measurement function of the TOI measurement. Parameter Name Type Range Default Bool...
RIGOL Chapter 2 Command System Example The command below sets the average mode to repeat average. :SENSe:TOI:AVERage:TCONtrol REPeat The query below returns REP. :SENSe:TOI:AVERage:TCONtrol? [:SENSe]:TOI:FREQuency:SPAN Syntax [:SENSe]:TOI:FREQuency:SPAN <freq> [:SENSe]:TOI:FREQuency:SPAN? Description Set the span of the TOI measurement. Query the span of the TOI measurement.
RIGOL Chapter 2 Command System [:SENSe]:TPOWer:AVERage:COUNt Syntax [:SENSe]:TPOWer:AVERage:COUNt <integer> [:SENSe]:TPOWer:AVERage:COUNt? Description Set the number of averages of the T-power measurement. Query the number of averages of the T-power measurement. Parameter Name Type Range Default <integer> Integer 1 to 1000 Explanation This command is only available when the T-power measurement is enabled.
RIGOL Chapter 2 Command System [:SENSe]:TPOWer:AVERage:TCONtrol Syntax [:SENSe]:TPOWer:AVERage:TCONtrol EXPonential|REPeat [:SENSe]:TPOWer:AVERage:TCONtrol? Description Set the average mode of the T-power measurement. Query the average mode of the T-power measurement. Parameter Name Type Range Default Keyword EXPonential|REPeat EXPonential Explanation EXPonential: exponential average REPeat: repeat average...
RIGOL Chapter 2 Command System Example The command below sets the start line to 5 ms. :SENSe:TPOWer:LLIMit 0.005 The query below returns 5.000000E-03. :SENSe:TPOWer:LLIMit? [:SENSe]:TPOWer:MODE Syntax [:SENSe]:TPOWer:MODE AVERage|PEAK|RMS [:SENSe]:TPOWer:MODE? Description Set the power type of the T-power measurement. Query the power type of the T-power measurement.
RIGOL Chapter 2 Command System [:SENSe]:TPOWer:RLIMit Syntax [:SENSe]:TPOWer:RLIMit <time> [:SENSe]:TPOWer:RLIMit? Description Set the stop line of the T-power measurement. Query the stop line of the T-power measurement. Parameter Name Type Range Default <time> Consecutive Real Number Start line to the sweep time...
RIGOL Chapter 2 Command System [:SENSe]:VSWR:RESet Syntax [:SENSe]:VSWR:RESet Description Restore the parameters of the VSWR measurement to their initial states. [:SENSe]:VSWR:STATe Syntax [:SENSe]:VSWR:STATe OFF|ON|0|1 [:SENSe]:VSWR:STATe? Description Enable or disable the VSWR measurement. Query the status of the VSWR measurement. Parameter...
RIGOL Chapter 2 Command System :SOURce Subsystem Command List: :SOURce:CORRection:OFFSet :SOURce:POWer:LEVel:IMMediate:AMPLitude :SOURce:TRACe:REF:STATe :SOURce:TRACe:STORref Explanation: The :SOURce commands are only available for DSA832E-TG. :SOURce:CORRection:OFFSet Syntax :SOURce:CORRection:OFFSet <rel_ampl> :SOURce:CORRection:OFFSet? Description Set the offset of the output amplitude of the tracking generator.
RIGOL Chapter 2 Command System :SOURce:POWer:LEVel:IMMediate:AMPLitude Syntax :SOURce:POWer:LEVel:IMMediate:AMPLitude <ampl> :SOURce:POWer:LEVel:IMMediate:AMPLitude? Description Set the output amplitude of the tracking generator in fixed power output mode. Query the output amplitude of the tracking generator in fixed power output mode. Parameter Name Type...
RIGOL Chapter 2 Command System :SOURce:TRACe:STORref Syntax :SOURce:TRACe:STORref Description Save the reference trace of normalization. 2-154 DSA800E Programming Guide...
RIGOL Chapter 2 Command System :STATus Subsystem The :STATus command system and IEEE 488.2 Common Commands are used to operate and query the status registers. The structure of the status registers, including Questionable Status Register, Operation Status Register, Standard Event Status Register, Status Byte Register and Error Queue, is shown below.
RIGOL Chapter 2 Command System Command List: :STATus:OPERation:CONDition? :STATus:OPERation:ENABle :STATus:OPERation[:EVENt]? :STATus:PRESet :STATus:QUEStionable:CONDition? :STATus:QUEStionable:ENABle :STATus:QUEStionable[:EVENt]? :STATus:OPERation:CONDition? Syntax :STATus:OPERation:CONDition? Description Query the value of the condition register for the operation status register. Return Format The query returns the value of the condition register in integer. For example, 24.
RIGOL Chapter 2 Command System Reserved Not Used Not Used Not Used Not Used Not Used 8192 Reserved 16384 Reserved Not Used Return Format The query returns the value of the enable register of the operation status register in integer.
RIGOL Chapter 2 Command System :STATus:QUEStionable:ENABle Syntax :STATus:QUEStionable:ENABle <integer> :STATus:QUEStionable:ENABle? Description Set the value of the enable register for the questionable status register. Query the value of the enable register for the questionable status register. Parameter Name Type Range Default Refer to Explanation <integer>...
RIGOL Chapter 2 Command System :SYSTem:USERkey:KEYCmd :SYSTem:USERkey:STATe :SYSTem:VERSion? Explanation: Commands marked with "**" are only available for DSA800E installed with the RF Demo kit (option). :SYSTem:BEEPer:STATe Syntax :SYSTem:BEEPer:STATe OFF|ON|0|1 :SYSTem:BEEPer:STATe? Description Enable or disable the beeper in Pass/Fail test.
RIGOL Chapter 2 Command System :SYSTem:COMMunicate:APORt Syntax :SYSTem:COMMunicate:APORt GPIB|LAN|USB|OFF :SYSTem:COMMunicate:APORt? Description Select the current communication port or disable all the communication ports. Query the communication port currently selected. Parameter Name Type Range Default Keyword GPIB|LAN|USB|OFF Return Format The query returns GPIB, LAN, USB or OFF.
RIGOL Chapter 2 Command System :SYSTem:COMMunicate:LAN[:SELF]:AUToip:STATe Syntax :SYSTem:COMMunicate:LAN[:SELF]:AUToip:STATe OFF|ON|0|1 :SYSTem:COMMunicate:LAN[:SELF]:AUToip:STATe? Description Enable or disable the auto IP setting mode. Query the status of the auto IP setting mode. Parameter Name Type Range Default Bool OFF|ON|0|1 ON|1 Explanation The spectrum analyzer always tries to get the IP address configuration in the order of DHCP, auto IP and manual IP.
RIGOL Chapter 2 Command System :SYSTem:COMMunicate:LAN[:SELF]:IP:ADDress Syntax :SYSTem:COMMunicate:LAN[:SELF]:IP:ADDress <ip_address> :SYSTem:COMMunicate:LAN[:SELF]:IP:ADDress? Description Set the IP address. Query the IP address. Parameter Name Type Range Default Refer to Explanation <ip_address> ASCII STRING Explanation The format of <ip_address> is nnn.nnn.nnn.nnn; wherein, the range of the first nnn is from 1 to 223 (except 127) and the ranges of the other three nnn are from 0 to 255.
RIGOL Chapter 2 Command System :SYSTem:COMMunicate:LAN[:SELF]:IP:GATeway Syntax :SYSTem:COMMunicate:LAN[:SELF]:IP:GATeway <ip_address> :SYSTem:COMMunicate:LAN[:SELF]:IP:GATeway? Description Set the default gateway. Query the default gateway. Parameter Name Type Range Default Refer to Explanation <ip_address> ASCII STRING Explanation The format of <ip_address> is nnn.nnn.nnn.nnn; wherein, the range of the first nnn is from 1 to 223 (except 127) and the ranges of the other three nnn are from 0 to 255.
RIGOL Chapter 2 Command System :SYSTem:COMMunicate:LAN[:SELF]:MANuip:STATe Syntax :SYSTem:COMMunicate:LAN[:SELF]:MANuip:STATe OFF|ON|0|1 :SYSTem:COMMunicate:LAN[:SELF]:MANuip:STATe? Description Enable or disable the manual IP setting mode. Query the status of the manual IP setting mode. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 Explanation The spectrum analyzer always tries to get the IP address configuration in the order of DHCP, auto IP and manual IP.
RIGOL Chapter 2 Command System :SYSTem:COMMunicate:USB[:SELF]:CLASs Syntax :SYSTem:COMMunicate:USB[:SELF]:CLASs TMC|PRINter|AUTO :SYSTem:COMMunicate:USB[:SELF]:CLASs? Description Set the USB device class. Query the USB device class. Parameter Name Type Range Default Keyword TMC|PRINter|AUTO Explanation When AUTO is selected, the device class is decided by the USB main device.
RIGOL Chapter 2 Command System :SYSTem:CONFigure:MESSage? Syntax :SYSTem:CONFigure:MESSage? Description Query the system message displayed lately. Explanation Up to 71 history messages can be displayed. Return Format The query returns the system messages lately displayed (the language depends on the current system language).
RIGOL Chapter 2 Command System :SYSTem:ERRor[:NEXT]? Syntax :SYSTem:ERRor[:NEXT]? Description Query and delete the last message that entered the error queue. Explanation If no error currently exists, the query returns 0,"No Error". Use the *CLS command to delete all the messages in the error queue.
RIGOL Chapter 2 Command System :SYSTem:KLOCk Syntax :SYSTem:KLOCk OFF|ON|0|1,<key> :SYSTem:KLOCk? <key> Description Lock or unlock the specified function key. Query whether the specified key is locked. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 <key> Keyword Refer to Explanation Explanation The parameter <key>...
RIGOL Chapter 2 Command System :SYSTem:LANGuage Syntax :SYSTem:LANGuage ENGLish|CHINese|JAPan|PORTugese|GERMan|POLish|KORea|TCHinese :SYSTem:LANGuage? Description Set the language of the instrument. Query the language of the instrument. Parameter Name Type Range Default ENGLish|CHINese|JAPan|PORTugese|GERMan| Keyword ENGLish POLish|KORea|TCHinese Return Format The query returns ENGL, CHIN, JAP, PORT, GERM, POL, KOR or TCHinese.
RIGOL Chapter 2 Command System :SYSTem:LINemod:TYPe Syntax :SYSTem:LINemod:TYPe FACTory|USER1|USER2|USER3|USER4|USER5|USER6|OFF Description Set the preset setting used in line mode or exit line mode. Parameter Name Type Range Default FACTory|USER1|USER2|USER3|USER4| Keyword USER5|USER6|OFF Example The command below sets the preset setting used in line mode to USER4.
RIGOL Chapter 2 Command System :SYSTem:OPTions? Syntax :SYSTem:OPTions? Description Query the option status (include the option number, order number, type and activation status) of the spectrum analyzer. Return Format The query returns the option status (include the option number, order number, type and activation status) of the spectrum analyzer.
RIGOL Chapter 2 Command System :SYSTem:PRESet Syntax :SYSTem:PRESet Description Recall the preset setting of the system to restore the instrument to the state specified by :SYSTem:PRESet:TYPE command. :SYSTem:PRESet:SAVE Syntax :SYSTem:PRESet:SAVE <type>,<name> Description Save the user setting. Parameter Name Type Range Default <type>...
RIGOL Chapter 2 Command System :SYSTem:SPEaker[:STATe] Syntax :SYSTem:SPEaker[:STATe] OFF|ON|0|1 :SYSTem:SPEaker[:STATe]? Description Enable or disable the earphone in demodulation. Query the status of the earphone in demodulation. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 Explanation This command is only available when the AM or FM demodulation is enabled.
RIGOL Chapter 2 Command System :SYSTem:TIME Syntax :SYSTem:TIME <hour>,<minute>,<second> :SYSTem:TIME? Description Set the time of the instrument. Query the time of the instrument. Parameter Name Type Range Default <hour> ASCII String 00 to 23 <minute> ASCII String 00 to 59 <second>...
RIGOL Chapter 2 Command System :SYSTem:TX:SWset Syntax :SYSTem:TX:SWset <SW1|SW2|SW3|SW4|SW5>,OFF|ON|0|1 Description Set the on/off status of TX1000. Parameter Name Type Range Default Keyword SW1|SW2|SW3|SW4|SW5 Bool OFF|ON|0|1 OFF|0 Explanation SW1 to SW5 represents the 5 switches of TX1000 respectively. This command is only available when TX1000 is connected.
RIGOL Chapter 2 Command System :SYSTem:USERkey:CONFirm Syntax :SYSTem:USERkey:CONFirm Description Confirm and validate the definition of UserKey. Explanation The definition of UserKey is only valid when the UserKey setting is enabled (refer to :SYSTem:USERkey:STATe command) and this command is sent after sending the defining command...
RIGOL Chapter 2 Command System :SYSTem:USERkey:STATe Syntax :SYSTem:USERkey:STATe OFF|ON|0|1 :SYSTem:USERkey:STATe? Description Enable or disable the UserKey setting. Query the status of the UserKey setting. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 Example The command below enables the UserKey setting.
RIGOL Chapter 2 Command System Return Format The query returns the number of averages of the trace in integer. Example The command below sets the number of averages to 200. :TRACe:AVERage:COUNt 200 The query below returns 200. :TRACe:AVERage:COUNt? :TRACe:AVERage:COUNt:CURRent? Syntax...
RIGOL Chapter 2 Command System :TRACe[:DATA] Syntax :TRACe[:DATA] TRACE1|TRACE2|TRACE3|TRACE4,<definite_length_block>|<comma_separated_ASCII_data> :TRACe[:DATA]? TRACE1|TRACE2|TRACE3|TRACE4 Description Load the user data into the specified trace. Query the data of the specified trace. Parameter Name Type Range Default Keyword TRACE1|TRACE2|TRACE3|TRACE4 <definite_length_block> ASCII String <comma_separated_ASCII_data> ASCII String...
RIGOL Chapter 2 Command System Note: As the PC software converts the binary data returned to ASCII character, the return value is unrecognizable code when the PC software is used to execute the query command. :TRACe:DATA? TRACE2 Remark: [1] The format of the data block is "Data Block Header + Data Block"; wherein, the format of the data block header is as follows.
RIGOL Chapter 2 Command System :TRACe:MATH:B Syntax :TRACe:MATH:B T1|T2|T3 :TRACe:MATH:B? Description Set B in the trace math expression to denote trace 1, trace 2 or trace 3. Query the trace represented by B in the trace math expression. Parameter Name...
RIGOL Chapter 2 Command System :TRACe:MATH:PEAK[:DATA]? Syntax :TRACe:MATH:PEAK[:DATA]? Description Query the frequencies (Hz) and amplitudes (the unit is the same with the current Y-axis unit) of the peaks in the peak table. Explanation This command only queries trace 1. Return Format The query returns the frequencies and amplitudes of the peaks in the peak table in the following format and up to 10 frequencies and amplitudes can be returned.
RIGOL Chapter 2 Command System :TRACe:MATH:PEAK:TABLe:STATe Syntax :TRACe:MATH:PEAK:TABLe:STATe OFF|ON|0|1 :TRACe:MATH:PEAK:TABLe:STATe? Description Enable or disable the peak table. Query the status of the peak table. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 Return Format The query returns 0 or 1.
RIGOL Chapter 2 Command System :TRACe:MATH:STATe Syntax :TRACe:MATH:STATe OFF|ON|0|1 :TRACe:MATH:STATe? Description Enable or disable the math operation of the trace. Query the status of the math operation of the trace. Parameter Name Type Range Default Bool OFF|ON|0|1 OFF|0 Return Format The query returns 0 or 1.
RIGOL Chapter 2 Command System :TRACe<n>:AVERage:TYPE Syntax :TRACe<n>:AVERage:TYPE VIDeo|RMS :TRACe<n>:AVERage:TYPE? Description Set the average type of the trace. Query the average type of the trace. Parameter Name Type Range Default <n> Discrete 1|2|3 Keyword VIDeo|RMS VIDeo Explanation VIDeo: video average...
RIGOL Chapter 2 Command System :TRACe<n>:MODE Syntax :TRACe<n>:MODE WRITe|MAXHold|MINHold|VIEW|BLANk|VIDeoavg|POWeravg :TRACe<n>:MODE? Description Set the type of the specified trace. Query the type of the specified trace. Parameter Name Type Range Default <n> Discrete 1|2|3 Keyword WRITe|MAXHold|MINHold|VIEW|BLANk|VIDeoavg|POWeravg WRITe Explanation WRITe: clear write...
RIGOL Chapter 2 Command System :TRIGger Subsystem Command List: :TRIGger:SEQuence:EXTernal:READy? :TRIGger:SEQuence:EXTernal:SLOPe :TRIGger:SEQuence:SOURce :TRIGger:SEQuence:VIDeo:LEVel :TRIGger:SEQuence:EXTernal:READy? Syntax :TRIGger:SEQuence:EXTernal:READy? Description Query whether the current trigger is ready. Explanation This command is valid only when the external trigger is selected.
RIGOL Chapter 2 Command System :TRIGger:SEQuence:SOURce Syntax :TRIGger:SEQuence:SOURce IMMediate|VIDeo|EXTernal :TRIGger:SEQuence:SOURce? Description Set the trigger type. Query the trigger type. Parameter Name Type Range Default Keyword IMMediate|VIDeo|EXTernal IMMediate Explanation IMMediate: free run trigger VIDeo: video trigger. This trigger type is not available in non-zero span mode as well as RMS Avg detection or Voltage Avg detection in zero span mode.
RIGOL Chapter 2 Command System :TRIGger:SEQuence:VIDeo:LEVel Syntax :TRIGger:SEQuence:VIDeo:LEVel <ampl> :TRIGger:SEQuence:VIDeo:LEVel? Description Set the trigger level of video trigger. Query the trigger level of video trigger. Parameter Name Type Range Default <ampl> Consecutive Real Number -300 dBm to 50 dBm 0 dBm Explanation This command is only valid when video trigger is selected.
RIGOL Chapter 2 Command System :UNIT Subsystem Command List: :UNIT:POWer :UNIT:POWer Syntax :UNIT:POWer DBM|DBMV|DBUV|V|W :UNIT:POWer? Description Set the unit of the Y axis. Query the unit of the Y axis. Parameter Name Type Range Default Refer to Explanation Keyword...
RIGOL Chapter 3 Programming Demos Chapter 3 Programming Demos This chapter lists some programming demos to illustrate how to use commands to realize the common functions of the spectrum analyzer in the development environments of Visual C++ 6.0, Visual Basic 6.0 and LabVIEW 8.6 as well as the programming demo to illustrate how to control the spectrum analyzer to...
RIGOL Chapter 3 Programming Demos Programming Instructions This section introduces the problems that might occur during the programming process as well as their solutions. If these problems occur, please solve them according to the corresponding instructions. When you use a working environment built via network, it is recommended that you build a pure local network environment.
RIGOL Chapter 3 Programming Demos When the installation finishes, click "Finish". By now, the programming preparations are finished. In the following part, the programming demos in Visual C++ 6.0, Visual Basic 6.0 and LabVIEW 8.6 development environments are introduced in detail.
Page 219
RIGOL Chapter 3 Programming Demos 3. Open the Directories tab in Tools Options. Select Include files in Show directories for and double-click at the blank in Directories to add the path of Include: C:\Program Files\IVI Foundation\VISA\WinNT\include. Select Library files in Show directories for and double-click at the blank in Directories to add the path of Lib: C:\Program Files\IVI Foundation\VISA\WinNT\lib\msc.
Page 220
RIGOL Chapter 3 Programming Demos 5. Add the control variables. Open the Member Variables tab in View ClassWizard and add the following three variables: Instrument Address: CString m_strInstrAddr Command: CString m_strCommand Return Value: CString m_strResult 6. Encapsulate the read and write operations of VISA.
Page 221
RIGOL Chapter 3 Programming Demos //Close the system status = viClose(instr); status = viClose(defaultRM); return bWriteOK; Encapsulate the read operation of VISA for easier operation. bool CDemoForDSADlg::InstrRead(CString strAddr, CString *pstrResult) //Read operation ViSession defaultRM,instr; ViStatus status; ViUInt32 retCount; char * SendAddr = NULL;...
Page 222
RIGOL Chapter 3 Programming Demos strAddr.ReleaseBuffer(); //Open a VISA resource status = viOpenDefaultRM(&m_SessRM); if (status == 0) //Open the device status = viOpen(m_SessRM, SendAddr, VI_NULL, VI_NULL, &m_SessInstr); //If you fails to open the connection, close the resource if (status != 0) viClose(m_SessRM);...
Page 223
RIGOL Chapter 3 Programming Demos //If the time exceed the limit value, resend the command after a delay of 1s if (VI_ERROR_TMO == status) Sleep(1000); status = viWrite(m_SessInstr, (unsigned char *)SendBuf, strlen(SendBuf), &retCount); else //If another error occurs, reopen the connection after the connection is closed and resend the command status = CloseVisaDevice();...
Page 224
RIGOL Chapter 3 Programming Demos //If another error occurs, reopen the connection after the connection is closed and reread from instrument status = CloseVisaDevice(); Sleep(1000); status = OpenVisaDevice(m_strInstrAddr); if (status == 0) status = viRead(m_SessInstr, RecBuf, MAX_REC_SIZE, &retCount); } while (status < 0);...
Page 225
RIGOL Chapter 3 Programming Demos strInstr.MakeUpper(); if (strInstr.Find("DSA") >= 0) bFindDSA = true; m_strInstrAddr = strSrc; break; //Find next instrument status = viFindNext(*findList,instrDesc); if (bFindDSA == false) MessageBox("Didn’t find any DSA!"); UpdateData(false); Write Operation void CDemoForDSADlg::OnBtWrite() //Write operation // TODO: Add your control notification handler code here UpdateData(true);...
RIGOL Chapter 3 Programming Demos Visual Basic 6.0 Programming Demo Enter the Visual Basic 6.0 programming environment and follow the steps below. Build a standard application program project (Standard EXE) and name it as DemoForDSA. Open Project Add File… . Search for the visa32.bas file under the include folder under the installation path of NI-VISA and add the file which contains all VISA functions and constant statements to the project.
Page 228
RIGOL Chapter 3 Programming Demos Dim dfltRM As Long Dim sesn As Long Dim rSize As Long 'Initialize the system status = viOpenDefaultRM(dfltRM) 'Failed to initialize the system If (status < VI_SUCCESS) Then MsgBox " No VISA resource was opened!"...
Page 229
RIGOL Chapter 3 Programming Demos 'Open instrument failed If (status < VI_SUCCESS) Then MsgBox " Failed to open the instrument! " Exit Function End If ' Read from the instrument stasus = viRead(sesn, strTemp0, 256, rSize) ' Read failed If (status < VI_SUCCESS) Then MsgBox "...
Page 230
RIGOL Chapter 3 Programming Demos ' Continue to switch the resource until find a DSA instrument strRet = UCase(strRet) j = InStr(strRet, "DSA") If (j >= 0) Then bFindDSA = True Exit For End If Call viFindNext(fList + i - 1, rsrcName(i))
RIGOL Chapter 3 Programming Demos LabVIEW 8.6 Programming Demo Enter the Labview 8.6 programming environment and follow the steps below. Create a new VI file and name it as DemoForDSA LV86. Add controls in the front panel interface, including the Address bar, Command bar and Return bar as well as the Connect, Write, Read and Exit buttons.
Page 234
RIGOL Chapter 3 Programming Demos Exit Run the program and the interface as shown below is displayed. Click the Address dropdown box and select the VISA resource name. Click Connect to connect the instrument, input the command in the Command box and click Write to write the command into the instrument. If a query command is used (for example, *IDN?), click Write to write the command into the instrument and click Read;...
RIGOL Chapter 3 Programming Demos Linux Programming Demo This section illustrates how to program and control the spectrum analyzer to realize the common functions under Linux operation system. Linux Programming Preparations programming environment used here: Operation System: Fedroa 8 (Linux-2.6.23) GCC Version: gcc-4.1.2...
Page 236
RIGOL Chapter 3 Programming Demos Remark : X can be any value between 2 and 254 that has not been used. Use any of the two methods below to add the library location to the search path of the library so that the program can load the library file installed automatically.
Page 237
RIGOL Chapter 3 Programming Demos Method 1: indicate the search path of the library in the environment variable LD_LIBRARY_PATH. Operation Method: add the library file path /usr/local/lib in the LD_LIBRARY_PATH variable in the /etc/profile file as shown in the figure below.
Page 238
RIGOL Chapter 3 Programming Demos Linux Programming Procedures Edit the DemoForDSA.h header file and declare a class to encapsulate the operation and property of the instrument. #ifndef DEMO_FOR_DSA_H #define DEMO_FOR_DSA_H #include <stdio.h> #include <string.h> #include <stdlib.h> #include <iostream> //#include <syswait.h>...
Page 239
RIGOL Chapter 3 Programming Demos string strInstr = ""; ViChar instrDesc[1000]; unsigned long i = 0; bool bFindDSA = false; memset(instrDesc,0,1000); //Turn on the VISA device status = viOpenDefaultRM(&defaultRM); (status < VI_SUCCESS) cout<<"No VISA equipment!"<<endl; return false; //Search for resource status = viFindRsrc(defaultRM,expr,findList, retcnt, instrDesc);...
Page 240
RIGOL Chapter 3 Programming Demos string str; //Address conversion, convert the strig type to char* SendAddr = const_cast<char*>(strAddr.c_str()); //Address conversion, convert the strig type to char* SendBuf = const_cast<char*>(strContent.c_str()); //Turn on the actual device status = viOpenDefaultRM(&defaultRM); (status < VI_SUCCESS) cout<<"No VISA...
Page 241
RIGOL Chapter 3 Programming Demos status = viRead(instr, RecBuf, MAX_REC_SIZE, &retCount); //Turn off the device status = viClose(instr); status = viClose(defaultRM); sprintf(result,"%s",RecBuf); pstrResult = result; free(result); return bReadOK; void makeupper( string &instr) string outstr = ""; if(instr == "") exit(0);...
Page 243
RIGOL Chapter 3 Programming Demos rm demo $(obj) Execution Result #make ./demo When the program runs, the instrument is connected automatically. If no instrument is found, "No VISA equipment!" is displayed and the system exits the program. If the instrument is found and successfully connected, the interface as shown in the figure below is displayed.
Need help?
Do you have a question about the DSA800E Series and is the answer not in the manual?
Questions and answers