RIGOL Programming Guide DSA700 Series Spectrum Analyzer Aug. 2016 RIGOL TECHNOLOGIES, INC.
RIGOL Guaranty and Declaration Copyright © 2016 RIGOL TECHNOLOGIES, INC. All Rights Reserved. Trademark Information RIGOL is a registered trademark of RIGOL TECHNOLOGIES, INC. Publication Number PGD18101-1110 Software Version DSA705/DSA710:00.01.17 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 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 instrument 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.
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 dry. Prevent Electrostatic Impact. Operate the instrument in an electrostatic discharge protective environment to avoid damage induced by static discharges.
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. Safety Terms on the Product: DANGER WARNING CAUTION It calls attention to an operation, if not correctly performed, could result in injury or hazard immediately.
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, wiein diesem Handbuchangegeben. 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.
RIGOL jedweder explosiven Atmosphäre zu betreiben. Geräteoberflächen sauber und trocken halten. Um den Einfluß von Staub 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.
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. Begriffe auf dem Produkt: DANGER WARNING CAUTION weist auf eine Verletzung oder Gefährdung hin, die sofort geschehen kann.
RIGOL Document Overview This manual introduces how to program and control RIGOL DSA700 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 DSA700 command in alphabetical order (from A to Z).
Contents RIGOL Contents Guaranty and Declaration ......................................................................................................... I Safety Requirement .................................................................................................................. II General Safety Summary ............................................................................................................. II Safety Notices and Symbols .....................................................
RIGOL Contents :CALCulate:MARKer[:SET]:STOP ................................................................................. 2-22 :CALCulate:MARKer:STATe .......................................................................................... 2-23 :CALCulate:MARKer:TRACe ......................................................................................... 2-23 :CALCulate:MARKer:TRACe:AUTO ...............................................................................
Contents RIGOL :FETCh:CNRatio?.............................................................................................................. 2-52 :FETCh:CNRatio:CARRier?................................................................................................. 2-53 :FETCh:CNRatio:CNRatio? ................................................................................................. 2-53 :FETCh:CNRatio:NOISe? .........................................................................................
RIGOL Contents :MMEMory:LOAD:SETUp ................................................................................................... 2-79 :MMEMory:LOAD:STATe .................................................................................................... 2-79 :MMEMory:LOAD:TRACe ................................................................................................... 2-80 :MMEMory:MOVE .........................................................................................................
RIGOL Contents [:SENSe]:CNRatio:AVERage:TCONtrol .............................................................................. 2-109 [:SENSe]:CNRatio:BANDwidth:INTegration ...................................................................... 2-110 [:SENSe]:CNRatio:BANDwidth:NOISe .............................................................................. 2-111 [:SENSe]:CNRatio:OFFSet ...............................................................................................
RIGOL Contents [:SENSe]:SIGCapture[:STATe] ......................................................................................... 2-138 [:SENSe]:SIGCapture:SIGC[:STATe] ................................................................................. 2-139 [:SENSe]:SIGCapture:MAXHold[:STATe] ........................................................................... 2-139 [:SENSe]:SIGCapture:RESet ............................................................................................
Contents RIGOL :SYSTem:FSWItch[:STATe].............................................................................................. 2-168 :SYSTem:KLOCk ............................................................................................................. 2-168 :SYSTem:LANGuage ....................................................................................................... 2-169 :SYSTem:LINemod:STATe?............................................................................................
Chapter 1 SCPI Overview RIGOL 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 ":" and are followed by the parameter settings available, "?" is added at the end of the command string to indicate query and the command and parameter are separated by a space.
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".
Chapter 2 Command System RIGOL Chapter 2 Command System In this chapter, the DSA700 series spectrum analyzer command subsystems are introduced in alphabetical order (from A to Z). Main topics of this chapter: :ABORt :CALCulate Subsystem :CALibration Subsystem :CONFigure Subsystem :COUPle Subsystem :DISPlay Subsystem :FETCh Subsystem :FORMat Subsystem :HCOPy Subsystem IEEE 488.
RIGOL Chapter 2 Command System :ABORt Syntax :ABORt Description Give up the current operation and restart the sweep.
Chapter 2 Command System :CALCulate:MARKer:PEAK:EXCursion :CALCulate:MARKer:PEAK:SEARch:MODE :CALCulate:MARKer:PEAK[:SET]:CF :CALCulate:MARKer:PEAK:THReshold :CALCulate:MARKer:PTPeak :CALCulate:MARKer[:SET]:CENTer :CALCulate:MARKer[:SET]:RLEVel :CALCulate:MARKer[:SET]:STARt :CALCulate:MARKer[:SET]:STEP :CALCulate:MARKer[:SET]:STOP :CALCulate:MARKer:STATe :CALCulate:MARKer:TRACe :CALCulate:MARKer:TRACe:AUTO :CALCul
RIGOL Chapter 2 Command System :CALCulate:BANDwidth:NDB Syntax :CALCulate:BANDwidth:NDB :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 Consecutive Real Number Range -100 dB to 100 dB Default -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.
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 Keyword Range FREQuency|TIME Default FREQuency Explanation This setting is applicable to both the upper and lower limit lines.
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:CONTrol:INTerpolate:TYPE Syntax :CALCulate:LLINe:CONTrol:INTerpolate:TYPE LOGarithmic|LINear :CALCulate:LLINe: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 Discrete Keyword Range 1|2 LOGarithmic|LINear Default -LINear Explanation denotes the lower limit line (1) or upper limit line (2).
RIGOL Chapter 2 Command System : 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 ,,{,,,} format. If no point is edited of the specified limit line, the query returns NULL.
RIGOL Chapter 2 Command System :CALCulate:LLINe:DELete Syntax :CALCulate:LLINe:DELete Description Delete the specified limit line of the Pass/Fail test. Parameter Name Type Discrete Range 1|2 Default -- Explanation 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:RELFreq[:STATe] Syntax :CALCulate:LLINe:RELFreq[:STATe] OFF|ON|0|1 :CALCulate:LLINe:RELFreq? Description Enable or disable the REL Frequency. Query the status of the REL Frequency. Parameter Name -- Type Discrete Bool Range 1|2 OFF|ON|0|1 Default -OFF|0 Explanation 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 Bool Range OFF|ON|0|1 Default ON|1 Return Format The query returns 0 or 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 Bool Range OFF|ON|0|1 Default OFF|0 Explanation Use the :CALCulate:MARKer:FCOunt:X? command to query the reading of the frequency counter. Return Format The query returns 0 or 1. Example The command below enables the frequency counter.
RIGOL Chapter 2 Command System :CALCulate:MARKer:DELTa[:SET]:CENTer Syntax :CALCulate:MARKer: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 Discrete Range 1|2|3|4 Default -- Explanation Use the :CALCulate:MARKer:MODE command to select Delta, Delta Pair or Span Pair marker. This function is invalid in zero span mode.
RIGOL Chapter 2 Command System :CALCulate:MARKer:FUNCtion Syntax :CALCulate:MARKer:FUNCtion NDB|NOISe|OFF :CALCulate:MARKer:FUNCtion? Description Select special measurement type for the specified marker. Query the special measurement type of the specified marker. Parameter Name Type Discrete -Keyword Range 1|2|3|4 NDB|NOISe|OFF Default -OFF Explanation NDB: N dB bandwidth. NOISe: noise marker. OFF: disable all the measurements. Return Format The query returns NDB, NOIS or OFF.
RIGOL Chapter 2 Command System :CALCulate:MARKer:MAXimum:MAX Syntax :CALCulate:MARKer:MAXimum:MAX Description Execute a peak search according to the search mode set by the :CALCulate:MARKer:PEAK:SEARch:MODE command and mark the peak using the specified marker. Parameter Name Type Discrete Range 1|2|3|4 Default -- Example The command below executes a peak search and marks the peak using marker 2.
RIGOL Chapter 2 Command System :CALCulate:MARKer:MINimum Syntax :CALCulate:MARKer:MINimum Description Search and mark the peak on the trace with the minimum amplitude. Parameter Name Type Discrete Range 1|2|3|4 Default -- Explanation When no peak is found, "No peak found" is displayed on the screen. :CALCulate:MARKer:MODE Syntax :CALCulate:MARKer:MODE POSition|DELTa|BAND|SPAN :CALCulate:MARKer:MODE? Description Set the type of the specified marker.
RIGOL Chapter 2 Command System :CALCulate:MARKer:PEAK:EXCursion Syntax :CALCulate:MARKer:PEAK:EXCursion :CALCulate:MARKer:PEAK:EXCursion? Description Set the peak excursion and the unit is dB. Query the peak excursion. Parameter Name Type Discrete Consecutive Real Number Range 1|2|3|4 0 dB to 200 dB Default -10 dB Return Format The query returns the peak excursion in scientific notation. Example The command below sets the peak excursion to 12 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 1. :CALCulate:MARKer1:PEAK:SEARch:MODE PARameter The query below returns PAR. :CALCulate:MARKer1:PEAK:SEARch:MODE? :CALCulate:MARKer:PEAK[:SET]:CF Syntax :CALCulate:MARKer: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:PTPeak Syntax :CALCulate:MARKer:PTPeak Description Execute peak-peak search and mark the peak using the specified marker. Parameter Name Type Discrete Range 1|2|3|4 Default -- Explanation The marker type of the specified marker will automatically change to Delta Pair after executing this command. The reference marker and delta marker are used to mark the peak-peak positions respectively. Example The command below executes peak-peak search.
RIGOL Chapter 2 Command System :CALCulate:MARKer[:SET]:RLEVel Syntax :CALCulate:MARKer[:SET]:RLEVel Description Set the reference level of the spectrum analyzer to the amplitude of the specified marker. Parameter Name Type Discrete Range 1|2|3|4 Default -- 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[:SET]:STEP Syntax :CALCulate:MARKer[:SET]:STEP Description Set the center frequency step of the spectrum analyzer to the frequency of the specified marker. Parameter Name Type Discrete Range 1|2|3|4 Default -- 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:STATe Syntax :CALCulate:MARKer:STATe OFF|ON|0|1 :CALCulate:MARKer:STATe? Description Enable or disable the specified marker. Query the status of the specified marker. Parameter Name -- Type Discrete Bool Range 1|2|3|4 OFF|ON|0|1 Default -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. Return Format The query returns 0 or 1.
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:TRACe:AUTO Syntax :CALCulate:MARKer:TRACe:AUTO OFF|ON|0|1 :CALCulate:MARKer:TRACe:AUTO? Description Set the marker trace of the specified marker to Auto. Query whether the marker trace is set to Auto.
RIGOL Chapter 2 Command System :CALCulate:MARKer:X Syntax :CALCulate:MARKer:X :CALCulate:MARKer: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 Discrete Consecutive Real Number Range 1|2|3|4 Refer to Explanation Default --- Explanation can be any value within the range currently available of the X axis.
RIGOL Chapter 2 Command System :CALCulate:MARKer:X:CENTer Syntax :CALCulate:MARKer:X:CENTer :CALCulate:MARKer: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 Discrete Consecutive Real Number Range 1|2|3|4 Refer to Explanation Default --- Explanation can be any value within the range currently available of the X axis.
RIGOL Chapter 2 Command System :CALCulate:MARKer:X:POSition Syntax :CALCulate:MARKer:X:POSition :CALCulate:MARKer:X:POSition? Description Set the position of the specified Normal marker. Query the position of the specified Normal marker. Parameter Name Type Discrete Integer Range 1|2|3|4 0 to 600 Default -300 Return Format The query returns the position of the marker in integer. Example The command below sets the position of marker 1 (Normal marker) to 100.
RIGOL Chapter 2 Command System :CALCulate:MARKer:X:POSition:SPAN Syntax :CALCulate:MARKer:X:POSition:SPAN :CALCulate:MARKer: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:X:POSition:STOP Syntax :CALCulate:MARKer:X:POSition:STOP :CALCulate:MARKer: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 Discrete Integer Range 1|2|3|4 0 to 600 Default -300 Return Format The query returns the position of the delta marker in integer.
RIGOL Chapter 2 Command System :CALCulate:MARKer:X:SPAN Syntax :CALCulate:MARKer:X:SPAN :CALCulate:MARKer: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 Name Type Discrete Consecutive Real Number Range 1|2|3|4 Refer to Explanation Default -0 Explanation can be any value within the range currently available of the X axis.
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. Return Format When the readout mode is frequency, the query returns the X value of the reference marker in integer and the unit is Hz.
RIGOL Chapter 2 Command System :CALCulate:MARKer:Y? Syntax :CALCulate:MARKer:Y? Description Query the Y-axis value of the specified marker and the default unit is dBm. Parameter Name Type Discrete Range 1|2|3|4 Default -- Explanation If the specified marker is normal marker, query the Y value of the marker. If the specified marker is Delta, Delta Pair or Span Pair marker, query the Y-axis difference between the reference marker and the delta 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.
RIGOL Chapter 2 Command System :CALibration Subsystem Command List: :CALibration:[ALL] :CALibration:AUTO :CALibration:[ALL] Syntax :CALibration:[ALL] Description Execute self-calibration immediately. Example The command below makes the instrument execute self-calibration immediately. :CALibration:ALL :CALibration:AUTO Syntax :CALibration:AUTO OFF|ON|0|1 :CALibration:AUTO? Description Enable or disable auto calibration. Query the status of auto calibration.
Chapter 2 Command System RIGOL :CONFigure Subsystem Command List: :CONFigure? :CONFigure:ACPower* :CONFigure:CHPower* :CONFigure:CNRatio* :CONFigure:EBWidth* :CONFigure:HDISt* :CONFigure:OBWidth* :CONFigure:PF :CONFigure:SANalyzer* :CONFigure:TOI* :CONFigure:TPOWer* Explanation: Commands marked with "*" are only available for DSA700 installed with the advanced measurement kit (option).
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 :READ command to initialize the measurement without restoring it to the default value.
Chapter 2 Command System RIGOL :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 :READ command to initialize the measurement without restoring it to the default value.
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 :READ command to initialize the measurement without restoring it to the default value.
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 Keyword Range ALL|NONE Default ALL Explanation The following parameters have coupling relationships.
RIGOL Chapter 2 Command System :DISPlay Subsystem Command List: :DISPlay:AFUnction:POSition :DISPlay:ANNotation:CLOCk[:STATe] :DISPlay:BRIGhtness :DISPlay:ENABle :DISPlay:MSGswitch:STATe :DISPlay:UKEY:STATe :DISPlay:WINdow:TRACe:GRATicule:GRID :DISPlay:WINdow:TRACe:X[:SCALe]:SPACing :DISPlay:WINdow:TRACe:Y:DLINe :DISPlay:WINdow:TRACe:Y:DLINe:STATe :DISPlay:WINdow:TRACe:Y[:SCALe]:PDIVision :DISPlay:WINdow:TRACe:Y[:SCALe]:RLEVel :DISPlay:WINdow:TRACe:Y[:SCALe
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 Keyword Range BOTTom|CENTer|TOP Default TOP Explanation BOTTom: bottom CENTer: center TOP: top Return Format The query returns BOTT, CENT or TOP.
RIGOL Chapter 2 Command System :DISPlay:BRIGhtness Syntax :DISPlay:BRIGhtness :DISPlay:BRIGhtness? Description Set the screen brightness. Query the screen brightness. Parameter Name Type Integer Range 0 to 7 Default 2 Return Format The query returns the brightness in integer. Example The command below sets the brightness to 6. :DISPlay:BRIGhtness 6 The query below returns 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 -Bool Range OFF|ON|0|1 Default ON|1 Return Format The query returns 0 or 1. Example The command below disables the message display. :DISPlay:MSGswitch:STATe OFF or :DISPlay:MSGswitch:STATe 0 The query below returns 0.
RIGOL Chapter 2 Command System :DISPlay:WINdow:TRACe:GRATicule:GRID Syntax :DISPlay:WINdow:TRACe:GRATicule:GRID :DISPlay:WINdow:TRACe:GRATicule:GRID? Description Set the brightness of the screen grid. Query the brightness of the screen grid. Parameter Name Type Integer Range 0 to 10 Default 3 Return Format The query returns the brightness of the screen grid in integer. Example The command below sets the screen grid brightness to 2.
RIGOL Chapter 2 Command System :DISPlay:WINdow:TRACe:Y:DLINe Syntax :DISPlay:WINdow:TRACe:Y:DLINe :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 Consecutive Real Number Range The current amplitude range Default 0 dBm Explanation By default, the display line is disabled. When the display line is enabled for the first time, its position is 0 dBm.
RIGOL Chapter 2 Command System :DISPlay:WINdow:TRACe:Y[:SCALe]:PDIVision Syntax :DISPlay:WINdow:TRACe:Y[:SCALe]:PDIVision :DISPlay:WINdow:TRACe:Y[:SCALe]:PDIVision? Description Set the Y-axis scale. Query the Y-axis scale. Parameter Name Type Consecutive Real Number Range 0.1 dB to 20 dB Default 10 dB Return Format The query returns the Y-axis scale in scientific notation. Example The command below sets the Y-axis scale to 15 dB.
RIGOL Chapter 2 Command System :DISPlay:WINdow:TRACe:Y[:SCALe]:RLEVel:OFFSet Syntax :DISPlay:WINdow:TRACe:Y[:SCALe]:RLEVel:OFFSet :DISPlay:WINdow:TRACe:Y[:SCALe]:RLEVel:OFFSet? Description Set the offset of the reference level. Query the offset of the reference level.
RIGOL Chapter 2 Command System :FETCh Subsystem Command List: :FETCh:ACPower? :FETCh:ACPower:LOWer? :FETCh:ACPower:MAIN? :FETCh:ACPower:UPPer? :FETCh:CHPower? :FETCh:CHPower:CHPower? :FETCh:CHPower:DENSity? :FETCh:CNRatio? :FETCh:CNRatio:CARRier? :FETCh:CNRatio:CNRatio? :FETCh:CNRatio:NOISe? :FETCh:EBWidth? :FETCh:HARMonics:AMPLitude:ALL? :FETCh:HARMonics:AMPLitude? :FETCh:HARMonics[:DISTortion]? :FETCh:HARMonics:FREQuency:ALL? :FETCh:HA
Chapter 2 Command System RIGOL :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. This command will select data from the latest measurement results and transmit the data to the output buffer.
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. This command will select data from the latest measurement results and transmit the data to the output buffer.
Chapter 2 Command System RIGOL :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. This command will select data from the latest measurement results and transmit the data to the output buffer.
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. This command will select data from the latest measurement results and transmit the data to the output buffer. Return Format The query returns the channel power spectral density in scientific notation.
Chapter 2 Command System RIGOL :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. This command will select data from the latest measurement results and transmit the data to the output buffer. Return Format The query returns the carrier power in scientific notation. Example The query below returns -1.
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. This command will select data from the latest measurement results and transmit the data to the output buffer. Return Format The query returns the noise power in scientific notation. Example The query below returns -1.442294E+01.
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. 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[: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. Return Format The query returns the percentage of the total harmonic distortion in scientific notation.
RIGOL Chapter 2 Command System :FETCh:HARMonics:FREQuency? Syntax :FETCh:HARMonics:FREQuency? Description Query the frequency of the specified harmonic. Parameter Name Type Integer Range 1 to 10 Default -- Explanation This command is only available when the harmonic distortion measurement is enabled. The query returns --- when the harmonic read does not have data. 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? 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. Return Format The query returns the occupied bandwidth (Hz) and the transmit frequency error (Hz) in integer (separated by comma).
Chapter 2 Command System RIGOL :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. Return Format The query returns the transmit frequency error in integer and the unit is Hz. Example The query below returns 20000.
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. Return Format The query returns the minor one in scientific notation. Example The query below returns -8.131735E+01.
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 Keyword Range NORMal|SWAPped Default NORMal Explanation NORMal: the transmission starts with the MSB (Most Significant Byte) and ends with the LSB (Least Significant Byte).
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 Keyword Range ASCii|REAL[,32] Default ASCii Explanation ASCii: the data points are ASCII characters separated by commas. REAL[,32]: the data points are a 32 bit binary number. Return Format The query returns ASCII or REAL,32.
RIGOL Chapter 2 Command System :HCOPy Subsystem Command List: :HCOPy:ABORt :HCOPy:IMAGe:COLor[:STATe] :HCOPy:IMAGe:FTYPe :HCOPy:IMAGe:INVert :HCOPy:IMAGe:PTIMe :HCOPy:IMAGe:QUALity :HCOPy[:IMMediate] :HCOPy:PAGE:ORIentation :HCOPy:PAGE:PRINts :HCOPy:PAGE:SIZE :HCOPy:RESume :HCOPy:ABORt Syntax :HCOPy:ABORt Description Cancel the current print operation.
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 Keyword Range DEFault|EXIFjpeg Default DEFault Return Format The query returns DEF or EXIF. Example The command below sets the image type of the print to Exif/JPEG. :HCOPy:IMAGe:FTYPe EXIFjpeg The query below returns EXIF.
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 Bool Range OFF|ON|0|1 Default OFF|0 Explanation OFF|0: disable date print. ON|1: enable date print. Return Format The query returns 0 or 1. Example The command below enables date print. :HCOPy:IMAGe:PTIMe ON or :HCOPy:IMAGe:PTIMe 1 The query below returns 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. Query the print orientation.
RIGOL Chapter 2 Command System :HCOPy:PAGE:PRINts Syntax :HCOPy:PAGE:PRINts :HCOPy:PAGE:PRINts? Description Set the print copies. Query the print copies. Parameter Name Type Integer Range 1 to 999 Default 1 Return Format The query returns the print copies in integer. Example The command below sets the print copies to 10. :HCOPy:PAGE:PRINts 10 The query below returns 10.
RIGOL Chapter 2 Command System :HCOPy:RESume Syntax :HCOPy:RESume Description Resume the paused print task.
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 *ESR? *IDN? *OPC *RST *SRE *STB? *TRG *TST? *WAI *CLS Syntax *CLS Description Clear all the event registers and clear the error queue.
RIGOL Chapter 2 Command System Return Format The query returns an integer which equals the sum of the weights of all the bits that have already been set in the register. For example, the query returns 144 if bit 4 (16 in decimal) and bit 7 (128 in decimal) are enabled. Example The command below sets the enable register of the standard event status register to 16. *ESE 16 The query below returns 16.
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. Return Format The query returns 1 if the current operation is finished, otherwise returns 0. *RST Syntax *RST Description Restore the instrument to its default state.
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 DSA700 installed with the advanced measurement kit (option). :INITiate:CONTinuous Syntax :INITiate:CONTinuous OFF|ON|0|1 :INITiate:CONTinuous? Description In non-measurement state, select continuous (ON|1) or single (OFF|0) sweep.
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 the :INITiate:CONTinuous command is set to ON or 1. Use the :FETCh? command to transmit a measurement result from the internal memory to the output buffer.
RIGOL Chapter 2 Command System :INPut Subsystem Command List: :INPut:IMPedance :INPut:IMPedance Syntax :INPut:IMPedance 50|75 :INPut:IMPedance? Description Set the input impedance for the voltage-to-power conversion and the unit is Ω. Query the input impedance for the voltage-to-power conversion.
RIGOL Chapter 2 Command System :MMEMory Subsystem Command List: :MMEMory:DELete :MMEMory:DISK:INFormation? :MMEMory:LOAD:CORRection :MMEMory:LOAD:LIMit :MMEMory:LOAD:MTABle :MMEMory:LOAD:SETUp :MMEMory:LOAD:STATe :MMEMory:LOAD:TRACe :MMEMory:MOVE :MMEMory:STORe:CORRection :MMEMory:STORe:LIMit :MMEMory:STORe:MTABle :MMEMory:STORe:PTABle :MMEMory:STORe:RESults :MMEMory:STORe:SCReen :MMEMory:STORe:SETUp :MMEMory:STORe:STATe :MMEMory:STORe:T
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. Example The return values of the query below are as follows. Disk Name: E Type: Mobile Disk File System: FAT32 Space Used: 2.15 MB Total Capacity: 3.
RIGOL Chapter 2 Command System :MMEMory:LOAD:LIMit Syntax :MMEMory:LOAD:LIMit Description Load the edited limit line file (.lim) into the instrument. Parameter Name Type ASCII String Range -- Default -- Explanation should contain the path and the filename. This operation fails when the specified file does not exist. Example The command below loads the limit line file upp1.lim in the D disk into the instrument. :MMEM:LOAD:LIM D:\Limit1:upp1.
RIGOL Chapter 2 Command System :MMEMory:LOAD:SETUp Syntax :MMEMory:LOAD:SETUp Description Load the specified setup file (.set). Parameter Name Type ASCII String Range -- Default -- Explanation should contain the path and the filename. This operation fails if the specified file does not exist. Example The command below loads the setup file pf.set in the D disk into the instrument. :MMEMory:LOAD:SETUp D:\Setup0:pf.
RIGOL Chapter 2 Command System :MMEMory:LOAD:TRACe Syntax :MMEMory:LOAD:TRACe Description Load the specified trace file (.trc). Parameter Name Type ASCII String Range -- Default -- Explanation should contain the path and the filename. This operation fails if the specified file does not exist. Example The comamnd below loads the trace file t1.trc in the D disk into the instrument. :MMEMory:LOAD:TRACe D:\Trace0:t1.
RIGOL Chapter 2 Command System :MMEMory:STORe:CORRection Syntax :MMEMory:STORe:CORRection ANTenna|CABLe|OTHer|USER, Description Save the amplitude correction data file with the specified filename (.cbl or .csv). Parameter Name - Type Keyword ASCII String Range ANTenna|CABLe|OTHer|USER -- Default --- Explanation should contain the path and the filename. You can save the amplitude correction file in the D disk or E disk. The .
RIGOL Chapter 2 Command System :MMEMory:STORe:MTABle Syntax :MMEMory:STORe:MTABle Description Save the marker table in the USB storage device with the specified filename (.mkr or .csv). Parameter Name Type ASCII String Range -- Default -- Explanation should contain the path and the filename. If the specified file already exists, it will be overwritten. Example The command below stores the marker table to the USB storage device with the filename MAK1.mkr.
RIGOL Chapter 2 Command System :MMEMory:STORe:RESults Syntax :MMEMory:STORe:RESults Description Save the current measurement results in the USB storage device with the specified filename (.csv). Parameter Name Type ASCII String Range -- Default -- Explanation should contain the path and the filename. If the specified file already exists, it will be overwritten.
RIGOL Chapter 2 Command System :MMEMory:STORe:SETUp Syntax :MMEMory:STORe:SETUp Description Save the current setting with the specified filename (.set). Parameter Name Type ASCII String Range -- Default -- Explanation should contain the path and the filename. You can save the setup file in the D disk or E disk. If the specified file already exists, it will be overwritten.
RIGOL Chapter 2 Command System :MMEMory:STORe:TRACe Syntax :MMEMory:STORe:TRACe
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.
Chapter 2 Command System RIGOL :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. Return Format The query returns the upper channel power in scientific notation. For example, -5.173441E+01.
Chapter 2 Command System RIGOL :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. Return Format The query returns the channel power spectral density in scientific notation. For example, -7.900511E+01.
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. For example, 8.956909E-02. :READ:CNRatio:NOISe? Syntax :READ:CNRatio:NOISe? Description Execute a C/N ratio measurement and return the noise power.
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. The amplitude unit of the return values is the same with the current Y-axis unit.
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. Return Format The query returns the percentage of the total harmonic distortion in scientific notation. For example, 2.490393E+02.
RIGOL Chapter 2 Command System :READ:HARMonics:FREQuency? Syntax :READ:HARMonics:FREQuency? Description Execute a harmonic distortion measurement and return the frequency of the specified harmonic. Parameter Name Type Integer Range 1 to 10 Default -- Explanation The query returns --- when the harmonic read does not have data. This command will select data from the latest measurement results and transmit the data to the output buffer.
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. For example, 1860000.
Chapter 2 Command System RIGOL :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. Return Format The query returns the minor one in scientific notation. For example, -8.131735E+01.
RIGOL Chapter 2 Command System [:SENSe] Subsystem Command List: [:SENSe]:ACPower:AVERage:COUNt* [:SENSe]:ACPower:AVERage[:STATe]* [:SENSe]:ACPower:AVERage:TCONtrol* [:SENSe]:ACPower:BANDwidth:ACHannel* [:SENSe]:ACPower:BANDwidth:INTegration* [:SENSe]:ACPower:CSPacing* [:SENSe]:BANDwidth:EMIFilter:STATe [:SENSe]:BANDwidth[:RESolution] [:SENSe]:BANDwidth[:RESolution]:AUTO [:SENSe]:BANDwidth:VIDeo [:SENSe]:BANDwidth:VIDeo:AUTO [:SENSe]:BANDwidth:VIDeo:RATio [:
Chapter 2 Command System [:SENSe]:DETector[:FUNCtion] [:SENSe]:EBWidth:AVERage:COUNt* [:SENSe]:EBWidth:AVERage[:STATe]* [:SENSe]:EBWidth:AVERage:TCONtrol* [:SENSe]:EBWidth:FREQuency:SPAN* [:SENSe]:EBWidth:MAXHold:STATe* [:SENSe]:EBWidth:XDB* [:SENSe]:EXTRef[:STATe]? [:SENSe]:FREQuency:CENTer [:SENSe]:FREQuency:CENTer:DOWN [:SENSe]:FREQuency:CENTer:SET:STEP [:SENSe]:FREQuency:CENTer:STEP:AUTO [:SENSe]:FREQuency:CENTer:STEP[:INCRement] [:SENSe]:FREQuency
RIGOL [:SENSe]:POWer[:RF]:GAIN[:STATe] [:SENSe]:POWer[:RF]:MIXer:RANGe[:UPPer] [:SENSe]:SIGCapture[:STATe]*** [:SENSe]:SIGCapture:SIGC[:STATe]*** [:SENSe]:SIGCapture:MAXHold[:STATe]*** [:SENSe]:SIGCapture:RESet*** [:SENSe]:SIGCapture:2FSK:STATe*** [:SENSe]:SIGCapture:2FSK:RESet*** [:SENSe]:SIGCapture:2FSK:MAXHold[:STATe]*** [:SENSe]:SIGCapture:2FSK:PFSWitch*** [:SENSe]:SIGCapture:2FSK:SIGNal*** [:SENSe]:SIGCapture:2FSK:AMPUp*** [:SENSe]:SIGCapture:2FSK:AMP
RIGOL Chapter 2 Command System [:SENSe]:ACPower:AVERage:COUNt Syntax [:SENSe]:ACPower:AVERage:COUNt [: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 Integer Range 1 to 1000 Default 10 Explanation This command is only available when the adjacent channel power function is enabled.
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.
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 [:SENSe]:ACPower:BANDwidth:INTegration? Description Set the main channel bandwidth. Query the main channel bandwidth. Parameter Name Type Consecutive Real Number Range 33 Hz to 333.
RIGOL Chapter 2 Command System [:SENSe]:ACPower:CSPacing Syntax [:SENSe]:ACPower:CSPacing [: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 Consecutive Real Number Range 33 Hz to 333.33333 MHz Default 2 MHz Explanation This command is only available when the adjacent channel power measurement is enabled.
RIGOL Chapter 2 Command System [:SENSe]:BANDwidth[:RESolution] Syntax [:SENSe]:BANDwidth[:RESolution] [:SENSe]:BANDwidth[:RESolution]? Description Set the resolution bandwidth (RBW). Query the resolution bandwidth.
RIGOL Chapter 2 Command System [:SENSe]:BANDwidth:VIDeo Syntax [:SENSe]:BANDwidth:VIDeo [:SENSe]:BANDwidth:VIDeo? Description Set the video bandwidth (VBW). Query the video bandwidth. Parameter Name Type Discrete Range 1 Hz to 3 MHz, at 1-3-10 step Default 1 MHz Return Format The query returns the video bandwidth in integer and the unit is Hz. Example The command below sets the video bandwidth to 1000 Hz. :SENSe:BANDwidth:VIDeo 1000 The query below returns 1000.
RIGOL Chapter 2 Command System [:SENSe]:BANDwidth:VIDeo:RATio Syntax [:SENSe]:BANDwidth:VIDeo:RATio [: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 Discrete Range 0.000001 to 30000, at 1-3-10 step Default 1 Return Format The query returns the V/R ratio in scientific notation. Example The command below sets the V/R ratio to 0.01. :SENSe:BANDwidth:VIDeo:RATio 0.01 The query below returns 1.
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 Bool Range OFF|ON|0|1 Default OFF|0 Explanation This command is only available when the channel power measurement function is enabled.
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 [: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 [:SENSe]:CNRatio:AVERage:COUNt? Description Set the number of averages of the C/N ratio measurement. Query the number of averages of the C/N ratio measurement.
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 Bool Range OFF|ON|0|1 Default OFF|0 Explanation This command is only available when the C/N ratio measurement is enabled.
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 [:SENSe]:CNRatio:BANDwidth:INTegration? Description Set the carrier bandwidth. Query the carrier bandwidth. Parameter Name Type Consecutive Real Number Range 33 Hz to 333.
RIGOL Chapter 2 Command System [:SENSe]:CNRatio:BANDwidth:NOISe Syntax [:SENSe]:CNRatio:BANDwidth:NOISe [:SENSe]:CNRatio:BANDwidth:NOISe? Description Set the noise bandwidth. Query the noise bandwidth. Parameter Name Type Consecutive Real Number Range 33 Hz to 333.33333 MHz Default 2 MHz Explanation This command is only available when the C/N ratio measurement is enabled. Return Format The query returns the noise bandwidth in integer and the unit is Hz.
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.
RIGOL Chapter 2 Command System [:SENSe]:CORRection:CSET:DATA Syntax [:SENSe]:CORRection:CSET:DATA ,{,,} [:SENSe]:CORRection:CSET:DATA? Description Create an amplitude correction curve using the specified data. Query the specified amplitude correction data.
RIGOL Chapter 2 Command System [:SENSe]:CORRection:CSET:DELete Syntax [:SENSe]:CORRection:CSET:DELete Description Delete the specified amplitude correction setting. Parameter Name Type Discrete Range 1|2|3|4 Default -- Explanation : 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:X:SPACing Syntax [:SENSe]:CORRection:CSET:X:SPACing LINear|LOGarithmic [:SENSe]:CORRection:CSET:X:SPACing? Description Set the frequency interpolation mode of the amplitude correction. Query the frequency interpolation mode of the amplitude correction. Parameter Name -- Type Discrete Keyword Range 1|2|3|4 LINear|LOGarithmic Default -LINear Explanation : 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 Keyword Range AM|FM|OFF Default 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 point, the [:SENSe]:DEMod:STATe? command returns 1.
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 [:SENSe]:DEMod:GAIN:INCRement? Description Set the signal gain. Query the signal gain.
RIGOL Chapter 2 Command System Example The command below enables the demodulation function. :SENSe:DEMod:STATe ON or :SENSe:DEMod:STATe 1 The query below returns 1. :SENSe:DEMod:STATe? [:SENSe]:DEMod:TIME Syntax [:SENSe]:DEMod:TIME
RIGOL Chapter 2 Command System Return Format The query returns NEG, NORM, POS, RMS, SAMP, VAV or QPEAK. Example The command below sets the detector type to Quasi-Peak. :SENSe:DETector:FUNCtion QPEak The query below returns QPEAK. :SENSe:DETector:FUNCtion? [:SENSe]:EBWidth:AVERage:COUNt Syntax [:SENSe]:EBWidth:AVERage:COUNt [:SENSe]:EBWidth:AVERage:COUNt? Description Set the number of averages of the emission bandwidth measurement.
RIGOL Chapter 2 Command System [: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. Query the status of the average measurement function of the emission bandwidth measurement. Parameter Name -- Type Bool Range OFF|ON|0|1 Default 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 average mode to repeat average. :SENSe:EBWidth:AVERage:TCONtrol REPeat The query below returns REP. :SENSe:EBWidth:AVERage:TCONtrol? [:SENSe]:EBWidth:FREQuency:SPAN Syntax [:SENSe]:EBWidth:FREQuency:SPAN [:SENSe]:EBWidth:FREQuency:SPAN? Description Set the span of the emission bandwidth measurement. Query the span of the emission bandwidth measurement.
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 -Bool Range OFF|ON|0|1 Default OFF|0 Explanation This command is only available when the emission bandwidth measurement is enabled. When Max Hold is enabled, each measurement result is compared with the previous result and the maximum is displayed.
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. The query returns 0: the instrument is using internal reference oscillator. Return Format The query returns 1 or 0.
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] [:SENSe]:FREQuency:CENTer:STEP[:INCRement]? Description Set the CF step. Query the CF step. Parameter Name Type Consecutive Real Number Range 1 Hz to 1 GHz Default 100 MHz Return Format The query returns the CF step in integer and the unit is Hz. Example The command below sets the CF step to 100 kHz.
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 [:SENSe]:FREQuency:SPAN? Description Set the span. Query the span.
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 [:SENSe]:FREQuency:STOP? Description Set the stop frequency. Query the stop frequency. Parameter Name Type Consecutive Real Number Range 0 Hz to 1 GHz Default 1 GHz Return Format The query returns the stop frequency in integer and the unit is Hz. Example The command below sets the stop frequency to 10 MHz. :SENSe:FREQuency:STOP 10000000 The query below returns 10000000.
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 Bool Range OFF|ON|0|1 Default OFF|0 Explanation This command is only available when the harmonic distortion measurement is enabled.
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 [: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
RIGOL Chapter 2 Command System [:SENSe]:OBWidth:AVERage:COUNt Syntax [:SENSe]:OBWidth:AVERage:COUNt [: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 Integer Range 1 to 1000 Default 10 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.
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. Query the status of the Max Hold of the occupied bandwidth measurement.
RIGOL Chapter 2 Command System [:SENSe]:OBWidth:PERCent Syntax [:SENSe]:OBWidth:PERCent [: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 Consecutive Real Number Range 1 to 99.99 Default 99 Explanation This command is only available when the occupied bandwidth measurement is enabled. The range (1 to 99.
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 [:SENSe]:POWer[:RF]:ATTenuation? Description Set the attenuation of the RF attenuator. Query 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 -Bool Range OFF|ON|0|1 Default ON|1 Return Format The query returns 0 or 1. Example The command below disables the auto setting mode of the input attenuation.
RIGOL Chapter 2 Command System [:SENSe]:POWer[:RF]:MIXer:RANGe[:UPPer] Syntax [:SENSe]:POWer[:RF]:MIXer:RANGe[:UPPer] [: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 Integer Range -30 dBm to 0 dBm Default -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]:SIGCapture:SIGC[:STATe] Syntax [:SENSe]:SIGCapture:SIGC[:STATe] OFF|ON|0|1 [:SENSe]:SIGCapture:SIGC[:STATe]? Description Turn the real time trace on or off. Query the on/off status of the real time trace. Parameter Name —— Type Bool Range OFF|ON|0|1 Default OFF|0 Explanation The real time trace, max hold and 2FSK are mutually exclusive. Return Format The query returns 0 or 1. Example The command below turns the real time trace on.
RIGOL Chapter 2 Command System [:SENSe]:SIGCapture:RESet Syntax [:SENSe]:SIGCapture:RESet Description Reset the max hold. Explanation This command is valide only when the Sig Capture function is turned on. [:SENSe]:SIGCapture:2FSK[:STATe] Syntax [:SENSe]:SIGCapture:2FSK[:STATe] OFF|ON|0|1 [:SENSe]:SIGCapture:2FSK[:STATe]? Description Turn 2FSK on or off. Query the on/off status of 2FSK.
RIGOL Chapter 2 Command System [:SENSe]:SIGCapture:2FSK:MAXHold[:STATe] Syntax [:SENSe]:SIGCapture:2FSK:MAXHold[:STATe] OFF|ON|0|1 [:SENSe]:SIGCapture:2FSK:MAXHold[:STATe]? Description Turn the max hold of 2FSK on or off. Query the on/off status of the max hold of 2FSK. Parameter Name —— Type Bool Range OFF|ON|0|1 Default OFF|0 Explanation This command is valid only when 2FSK is turned on. Return Format The query returns 0 or 1. Example The command below turns the max hold of 2FSK on.
RIGOL Chapter 2 Command System [:SENSe]:SIGCapture:2FSK:SIGNal Syntax [:SENSe]:SIGCapture:2FSK:SIGNal 0|1|2 [:SENSe]:SIGCapture:2FSK:SIGNal? Description Select the desired 2FSK signal for editing its amplitude limits of pass/fail test. Query the 2FSK signal selected currently. Parameter Name —— Type Discrete Range 0|1|2 Default 0 Explanation 0: Modify the first 2FSK signal (Peak 1 and Peak 2). 1: Modify the second 2FSK signal (Peak 3 and Peak 4). 2: Modify the third 2FSK signal (Peak 5 and Peak 6).
RIGOL Chapter 2 Command System [:SENSe]:SIGCapture:2FSK:AMPDown Syntax [:SENSe]:SIGCapture:2FSK:AMPDown [:SENSe]:SIGCapture:2FSK:AMPDown? Description Set the amplitude lower limit of the specified 2FSK signal. Query the amplitude lower limit of the specified 2FSK signal. Parameter Name Type Consecutive Real Number Range Default -400 dBm to the amplitude upper limit -100 dBm Explanation This command is valid only when 2FSK is turned on.
RIGOL Chapter 2 Command System [:SENSe]:SIGCapture:2FSK:MARK1:Switch[:STATe] Syntax [:SENSe]:SIGCapture:2FSK:MARK1:Switch[:STATe] OFF|ON|0|1 [:SENSe]:SIGCapture:2FSK:MARK1:Switch[:STATe]? Description Turn the Marker 1 on or off. Query the on/off of Marker 1. Parameter Name —— Type Bool Range OFF|ON|0|1 Default OFF|0 Explanation This command is valid only when 2FSK is turned on. Return Format The query returns 0 or 1. Example The command below turns the Marker 1 on.
RIGOL Chapter 2 Command System [:SENSe]:SIGCapture:2FSK:MARK2:Switch[:STATe] Syntax [:SENSe]:SIGCapture:2FSK:MARK2:Switch[:STATe] OFF|ON|0|1 [:SENSe]:SIGCapture:2FSK:MARK2:Switch[:STATe]? Description Turn the Marker 2 on or off. Query the on/off of Marker 2. Parameter Name —— Type Bool Range OFF|ON|0|1 Default OFF|0 Explanation This command is valid only when 2FSK is turned on. Return Format The query returns 0 or 1. Example The command below turns the Marker 2 on.
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 The [: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:AUTO Syntax [:SENSe]:SWEep:TIME:AUTO OFF|ON|0|1 [:SENSe]:SWEep:TIME:AUTO? Description Enable or disable the auto sweep time. Query the status of the auto sweep time. Parameter Name Type -Bool Range OFF|ON|0|1 Default ON|1 Return Format The query returns 0 or 1. Example The command below enables the auto sweep time. :SENSe:SWEep:TIME:AUTO ON or :SENSe:SWEep:TIME:AUTO 1 The query below returns 1.
RIGOL Chapter 2 Command System [:SENSe]:TOI:AVERage:COUNt Syntax [:SENSe]:TOI:AVERage:COUNt [:SENSe]:TOI:AVERage:COUNt? Description Set the number of averages of the TOI measurement. Query the number of averages of the TOI measurement. Parameter Name Type Integer Range 1 to 1000 Default 10 Explanation This command is only available when the TOI measurement is enabled. Return Format The query returns the number of averages in integer.
RIGOL Chapter 2 Command System [:SENSe]:TOI:AVERage:TCONtrol Syntax [:SENSe]:TOI:AVERage:TCONtrol EXPonential|REPeat [:SENSe]:TOI:AVERage:TCONtrol? Description Set the average mode of the TOI measurement. Query the average mode of the TOI measurement.
RIGOL Chapter 2 Command System Example The command below sets the span to 1 MHz. :SENSe:TOI:FREQuency:SPAN 1000000 The query below returns 1000000. :SENSe:TOI:FREQuency:SPAN? [:SENSe]:TPOWer:AVERage:COUNt Syntax [:SENSe]:TPOWer:AVERage:COUNt [: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.
RIGOL Chapter 2 Command System Example The command below enables the average measurement. :SENSe:TPOWer:AVERage:STATe ON or :SENSe:TPOWer:AVERage:STATe 1 The query below returns 1. :SENSe:TPOWer:AVERage:STATe? [: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.
RIGOL Chapter 2 Command System Explanation This command is only available when the T-power measurement is enabled. Return Format The query returns the start line in scientific notation and the unit is s. 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.
RIGOL Chapter 2 Command System [:SENSe]:TPOWer:RLIMit Syntax [:SENSe]:TPOWer:RLIMit [: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 Consecutive Real Number Range Start line to the sweep time Default 50 ms Explanation This command is only available when the T-power measurement is enabled. Return Format The query returns the stop line in scientific notation and the unit is s.
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. The :STATus commands are used to set and query the Questionable Status Register and Operation Status Register. IEEE488.
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 7 8 9 10 11 12 13 14 15 Chapter 2 Command System 128 0 0 0 0 0 8192 16384 0 Reserved Not Used Not Used Not Used Not Used Not Used Reserved Reserved Not Used Return Format The query returns the value of the enable register of the operation status register in integer. Example The command below sets the value of the enable register of the operation status register to 100. :STATus:OPERation:ENABle 100 The query below returns 100.
RIGOL Chapter 2 Command System :STATus:QUEStionable:ENABle Syntax :STATus:QUEStionable:ENABle :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 Integer Range Refer to Explanation Default 0 Explanation The following table lists the bit definitions for the questionable status register.
RIGOL Chapter 2 Command System :SYSTem Subsystem Command List: :SYSTem:BEEPer:STATe :SYSTem:CLEar :SYSTem:COMMunicate:APORt :SYSTem:COMMunicate:BRMT :SYSTem:COMMunicate:GPIB[:SELF]:ADDRess :SYSTem:COMMunicate:LAN[:SELF]:AUToip:STATe :SYSTem:COMMunicate:LAN[:SELF]:DHCP:STATe :SYSTem:COMMunicate:LAN[:SELF]:IP:ADDress :SYSTem:COMMunicate:LAN[:SELF]:IP:DNSServer :SYSTem:COMMunicate:LAN[:SELF]:IP:GATeway :SYSTem:COMMunicate:LAN[:SELF]:IP:SUBMask :SYSTem:COMMunicate:
RIGOL Chapter 2 Command System :SYSTem:USERkey:CONFirm :SYSTem:USERkey:KEYCmd :SYSTem:USERkey:STATe :SYSTem:VERSion? Explanation: Commands marked with "**" are only available for DSA700 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. Query the status of the beeper.
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 Keyword Range GPIB|LAN|USB|OFF Default OFF Return Format The query returns GPIB, LAN, USB or OFF. Example The command below set the communication port to LAN.
RIGOL Chapter 2 Command System :SYSTem:COMMunicate:GPIB[:SELF]:ADDRess Syntax :SYSTem:COMMunicate:GPIB[:SELF]:ADDRess :SYSTem:COMMunicate:GPIB[:SELF]:ADDRess? Description Set the GPIB address. Query the GPIB address. Parameter Name Type Integer Range 0 to 30 Default 18 Return Format The query returns the GPIB address in integer. Example The command below sets the GPIB address to 16. :SYSTem:COMMunicate:GPIB:SELF:ADDRess 16 The query below returns 16.
RIGOL Chapter 2 Command System :SYSTem:COMMunicate:LAN[:SELF]:DHCP:STATe Syntax :SYSTem:COMMunicate:LAN[:SELF]:DHCP:STATe OFF|ON|0|1 :SYSTem:COMMunicate:LAN[:SELF]:DHCP:STATe? Description Enable or disable the DHCP mode. Query the status of the DHCP mode. Parameter Name -- Type Bool Range OFF|ON|0|1 Default ON|1 Explanation The spectrum analyzer always tries to get the IP address configuration in the order of DHCP, auto IP and manual IP. The three setting modes cannot be turned off at the same time.
RIGOL Chapter 2 Command System :SYSTem:COMMunicate:LAN[:SELF]:IP:DNSServer Syntax :SYSTem:COMMunicate:LAN[:SELF]:IP:DNSServer :SYSTem:COMMunicate:LAN[:SELF]:IP:DNSServer? Description Set the DNS address. Query the DNS address. Parameter Name Type ASCII STRING Range Refer to Explanation Default -- Explanation The format of 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:SUBMask Syntax :SYSTem:COMMunicate:LAN[:SELF]:IP:SUBMask :SYSTem:COMMunicate:LAN[:SELF]:IP:SUBMask? Description Set the subnet mask. Query the subnet mask. Parameter Name Type ASCII STRING Range Refer to Explanation Default -- Explanation The format of is nnn.nnn.nnn.nnn and the range of the nnn is from 0 to 255. Return Format The query returns the current subnet mask in nnn.nnn.nnn.nnn format.
RIGOL Chapter 2 Command System :SYSTem:COMMunicate:LAN[:SELF]:RESet Syntax :SYSTem:COMMunicate:LAN[:SELF]:RESet Description Reset the LAN setting: enable the DHCP and Auto IP, disable the Manual IP. :SYSTem:COMMunicate:USB[:SELF]:ADDRess? Syntax :SYSTem:COMMunicate:USB[:SELF]:ADDRess? Description Query the USB device address. Return Format The query returns the USB device address; for example, 1.
RIGOL Chapter 2 Command System :SYSTem:CONFigure:INFormation? Syntax :SYSTem:CONFigure:INFormation? Description Query the system information of the spectrum analyzer. Explanation The system information includes the model, serial number, software and hardware versions. Return Format The query returns the system information (the language depends on the current system language). For example, Model: DSA710 Serial Number: DSA8A134400008 Version Version Version Version Version of of of of of Main Board: 00.
RIGOL Chapter 2 Command System :SYSTem:DATE Syntax :SYSTem:DATE ,, :SYSTem:DATE? Description Set the date of the instrument. Query the date of the instrument. Parameter Name Type ASCII String ASCII String ASCII String Range 2000 to 2099 01 to 12 01 to 31 Default ---- Return Format The query returns the current date in YYYY,MM,DD format. Example The command below sets the date of the instrument to 2016/05/16.
RIGOL Chapter 2 Command System :SYSTem:FSWItch[:STATe] Syntax :SYSTem:FSWItch[:STATe] OFF|ON|0|1 :SYSTem:FSWItch[:STATe]? Description Enable or disable the front panel power switch. Query the status of the front panel power switch. Parameter Name Type -Bool Range OFF|ON|0|1 Default ON|1 Return Format The query returns 0 or 1. Example The command below disables the front panel power switch. :SYSTem:FSWItch:STATe OFF or :SYSTem:FSWItch:STATe 0 The query below returns 0.
RIGOL Chapter 2 Command System Return Format The query returns "keyname 0" or "keyname 1". Example The command below locks the FREQ key. :SYSTem:KLOCk ON,FREQ or :SYSTem:KLOCk 1,FREQ The query below returns FREQ 1. :SYSTem:KLOCk? FREQ :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.
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 Keyword Range FACTory|USER1|USER2|USER3|USER4| USER5|USER6|OFF Default 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. For example, Serial NO.
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 the :SYSTem:PRESet:TYPE command. :SYSTem:PRESet:SAVE Syntax :SYSTem:PRESet:SAVE , Description Save the user setting.
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 Bool Range OFF|ON|0|1 Default OFF|0 Explanation This command is only available when the AM or FM demodulation is enabled. Return Format The query returns 0 or 1. Example The command below enables the earphone.
RIGOL Chapter 2 Command System :SYSTem:TIME Syntax :SYSTem:TIME ,, :SYSTem:TIME? Description Set the time of the instrument. Query the time of the instrument. Parameter Name Type ASCII String ASCII String ASCII String Range 00 to 23 00 to 59 00 to 59 Default ---- Return Format The query returns the current time in HH,MM,SS format. Example The command below sets the time to 15:10:30. :SYSTem:TIME 15,10,30 The query below returns 15,10,30.
RIGOL Chapter 2 Command System :SYSTem:TX:SWset Syntax :SYSTem:TX:SWset ,OFF|ON|0|1 Description Set the on/off status of TX1000. Parameter Name --- Type Keyword Bool Range SW1|SW2|SW3|SW4|SW5 OFF|ON|0|1 Default -OFF|0 Explanation SW1 to SW5 represents the 5 switches of TX1000 respectively. This command is only available when TX1000 is connected. Example The command below sets switch 1 to on.
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 the :SYSTem:USERkey:STATe command) and this command is sent after sending the defining command (refer to the :SYSTem:USERkey:KEYCmd 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 Bool Range OFF|ON|0|1 Default OFF|0 Example The command below enables the UserKey setting. :SYSTem:USERkey:STATe ON or :SYSTem:USERkey:STATe 1 The query below returns 1.
RIGOL Chapter 2 Command System :TRACe Subsystem Command List: :TRACe:AVERage:CLEar :TRACe:AVERage:COUNt :TRACe:AVERage:COUNt:CURRent? :TRACe:AVERage:RESet :TRACe:CLEar:ALL :TRACe[:DATA] :TRACe:MATH:A :TRACe:MATH:B :TRACe:MATH:CONSt :TRACe:MATH:PEAK[:DATA]? :TRACe:MATH:PEAK:POINts? :TRACe:MATH:PEAK:SORT :TRACe:MATH:PEAK:TABLe:STATe :TRACe:MATH:PEAK:THReshold :TRACe:MATH:STATe :TRACe:MATH:TYPE :TRACe:AVERage:TYPE :TRACe:MODE :TRACe:
Chapter 2 Command System RIGOL 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 :TRACe:AVERage:COUNt:CURRent? Description Query the number of averages currently executed of the trace. Return Format The query returns the number of averages currently executed of the trace in integer.
RIGOL Chapter 2 Command System :TRACe[:DATA] Syntax :TRACe[:DATA] TRACE1|TRACE2|TRACE3|TRACE4,| :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 Keyword ASCII String ASCII String Range TRACE1|TRACE2|TRACE3|TRACE4 --- Default ---- Explanation 1.
RIGOL Chapter 2 Command System 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. The first figure (9) following # denotes the number of digits of the number in the data block header; this number denotes the number of bytes of the data in this transmission (add 0 before the number when the number of digits is less than 9). For example, the data block header is #9000000100 when 100 bytes of data is transmitted.
RIGOL Chapter 2 Command System Parameter Name Type -Keyword Range T1|T2|T3 Default T2 Return Format The query returns T1, T2 or T3. Example The command below sets B to trace 1. :TRACe:MATH:B T1 The query below returns T1. :TRACe:MATH:B? :TRACe:MATH:CONSt Syntax :TRACe:MATH:CONSt :TRACe:MATH:CONSt? Description Set the constant in the trace math expression. Query the constant in the trace math expression.
RIGOL Chapter 2 Command System :TRACe:MATH:PEAK:POINts? Syntax :TRACe:MATH:PEAK:POINts? Description Query the number of peaks in the peak table. Return Format The query returns an integer between 0 and 10. :TRACe:MATH:PEAK:SORT Syntax :TRACe:MATH:PEAK:SORT AMPLitude|FREQuency :TRACe:MATH:PEAK:SORT? Description Set the sorting rule of the peak table. Query the sorting rule of the peak table.
RIGOL Chapter 2 Command System Example The command below enables the peak table. :TRACe:MATH:PEAK:TABLe:STATe ON or :TRACe:MATH:PEAK:TABLe:STATe 1 The query below returns 1. :TRACe:MATH:PEAK:TABLe:STATe? :TRACe:MATH:PEAK:THReshold Syntax :TRACe:MATH:PEAK:THReshold NORMal|DLMore|DLLess :TRACe:MATH:PEAK:THReshold? Description Set the display mode of the peak in the peak table. Query the display mode of the peak in the peak table.
RIGOL Chapter 2 Command System Return Format The query returns 0 or 1. Example The command below enables the math operation of the trace. :TRACe:MATH:STATe ON or :TRACe:MATH:STATe 1 The query below returns 1. :TRACe:MATH:STATe? :TRACe:MATH:TYPE Syntax :TRACe:MATH:TYPE A-B|A+CONST|A-CONST :TRACe:MATH:TYPE? Description Set the operation type of the trace. Query the operation type of the trace.
RIGOL Chapter 2 Command System When the Pass/Fail test is enabled, both the :TRACe2:AVERage:TYPE? command and :TRACe3:AVERage:TYPE? command return ERR. Return Format The query returns VID or RMS. Example The command below sets the average type of trace 1 to video average. :TRACe1:AVERage:TYPE VIDeo The query below returns VID. :TRACe1:AVERage:TYPE? :TRACe:MODE Syntax :TRACe:MODE WRITe|MAXHold|MINHold|VIEW|BLANk|VIDeoavg|POWeravg :TRACe:MODE? Description Set the type of the specified trace.
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. Return Format Return 1 -- the trigger is ready. Return 0 -- the trigger is being prepared.
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 -Keyword Range IMMediate|VIDeo|EXTernal Default 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 :TRIGger:SEQuence:VIDeo:LEVel? Description Set the trigger level of video trigger. Query the trigger level of video trigger. Parameter Name Type Consecutive Real Number Range -300 dBm to 50 dBm Default 0 dBm Explanation This command is only valid when video trigger is selected. You can use the :TRIGger:SEQuence:SOURce command to select video trigger.
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 Keyword Range DBM|DBMV|DBUV|V|W Default Refer to Explanation Explanation The default log unit is dBm. The default linear unit is V. Return Format The query returns DBM, DBMV, DBUV, V or W. Example The comamnd below sets the amplitude unit to Watts.
Chapter 3 Programming Demos RIGOL 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 realize the common functions in Linux operation system.
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. 1. When you use a working environment built via network, it is recommended that you build a pure local network environment. 2.
Chapter 3 Programming Demos 3. 4. Select "Don't search. I will choose the device to install."; Click "Next"; 5. 6.
RIGOL 7. 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.
Chapter 3 Programming Demos RIGOL Visual C++ 6.0 Programming Demo Enter the Visual C++6.0 programming environment and follow the steps below. 1. Build a MFC project based on dialog box and name it as DemoForDSA. 2. Open the Link tab in Project Settings and add visa32.lib to the Object/library modules manually. 3. Open the Directories tab in Tools Options.
RIGOL Chapter 3 Programming Demos At present, VISA library has been added. 4. Add the Text, Edit and Button controls as shown in the figure below. 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. 1) Encapsulate the write operation of VISA for easier operation.
Chapter 3 Programming Demos RIGOL bool bWriteOK = false; CString str; // Change the address's data style from CString to char* SendAddr = strAddr.GetBuffer(strAddr.GetLength()); strcpy(SendAddr,strAddr); strAddr.ReleaseBuffer(); // Change the command's data style from CString to char* SendBuf = strContent.GetBuffer(strContent.GetLength()); strcpy(SendBuf,strContent); strContent.
RIGOL Chapter 3 Programming Demos } //Open the instrument status = viOpen(defaultRM, SendAddr, VI_NULL, VI_NULL, &instr); //Read from the instrument status = viRead(instr, RecBuf, MAX_REC_SIZE, &retCount); //close the system status = viClose(instr); status = viClose(defaultRM); (*pstrResult).Format("%s",RecBuf); } 3) return bReadOK; Encapsulate the the read operation with exception handling function of VISA.
Chapter 3 Programming Demos RIGOL } return status; } bool CDemoForDSADlg::InstrWriteEx(CString strAddr, CString strContent) //Write operation with exception handling { ViStatus status; ViUInt32 retCount; char * SendBuf = NULL; bool bWriteOK = true; // Change the address's data style from CString to char* SendBuf = strContent.GetBuffer(strContent.GetLength()); strcpy(SendBuf,strContent); strContent.
RIGOL Chapter 3 Programming Demos ViUInt32 retCount; char * SendAddr = NULL; unsigned char RecBuf[MAX_REC_SIZE]; bool bReadOK = true; // Change the address's data style from CString to char* SendAddr = strAddr.GetBuffer(strAddr.GetLength()); strcpy(SendAddr,strAddr); strAddr.
Chapter 3 Programming Demos RIGOL CString strInstr = ""; unsigned long i = 0; bool bFindDSA = false; status = viOpenDefaultRM(&defaultRM); if (status < VI_SUCCESS) { // Error Initializing VISA...exiting MessageBox("No VISA instrument was opened ! "); return ; } memset(instrDesc,0,1000); // Find resource status = viFindRsrc(defaultRM,expr,findList, retcnt, instrDesc); for (i = 0;i < (*retcnt);i++) { // Get instrument name strSrc.
RIGOL 3) 8. Chapter 3 Programming Demos Read Operation void CDemoForDSADlg::OnBtRead() //Read operation { // TODO: Add your control notification handler code here UpdateData(true); InstrRead(m_strInstrAddr,&m_strResult); UpdateData(false); } Execution Result 1) Click "Connect" to search for the spectrum analyzer; 2) Input "*IDN?" in the "Command" edit box; 3) Click "Write" to write the command into the spectrum analyzer; 4) Click "Read" to read the return value.
Chapter 3 Programming Demos RIGOL Visual Basic 6.0 Programming Demo Enter the Visual Basic 6.0 programming environment and follow the steps below. 1. Build a standard application program project (Standard EXE) and name it as DemoForDSA. 2. 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.
RIGOL Chapter 3 Programming Demos '----------------------------------------------------------Public Sub InstrWrite(rsrcName As String, strCmd As String) Dim status As Long 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!" Exit Sub End If 'Open the VISA instrument status = viOpen(dfltRM, rsrcName, VI_NULL, VI_NULL, sesn) 'Failed to open the instru
Chapter 3 Programming Demos RIGOL End If 'Open the instrument status = viOpen(dfltRM, rsrcName, VI_NULL, VI_NULL, sesn) '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 " Failed to read from the instrument! " Exit Function End If 'Close the system status = viClose(sesn) status = viClose(dfltRM) ' Remove the space at th
RIGOL Chapter 3 Programming Demos InstrWrite rsrcName(i), "*IDN?" Sleep 200 strRet = InstrRead(rsrcName(i)) ' 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)) Next i 'Dispaly If (bFindDSA = True) Then TxtInsAddr.Text = rsrcName(i) Else TxtInsAddr.
Chapter 3 Programming Demos RIGOL LabVIEW 8.6 Programming Demo Enter the Labview 8.6 programming environment and follow the steps below. 1. Create a new VI file and name it as DemoForDSA LV86. 2. 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. 3. Create the event structure in Show block Diagram under the Window menu. 4.
RIGOL 2) 3-18 Chapter 3 Programming Demos Write operation (include error judgment) DSA700 Programming Guide
Chapter 3 Programming Demos 3) RIGOL Read operation (include error processing) DSA700 Programming Guide 3-19
RIGOL 3-20 Chapter 3 Programming Demos 4) Exit 5) 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; the return value is displayed in the Return box.
Chapter 3 Programming Demos RIGOL 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 1. programming environment used here: Operation System: Fedroa 8 (Linux-2.6.23) GCC Version: gcc-4.1.2 2. Install the VISA library: make sure your PC has installed the VISA library of NI (download it from http://www.ni.com/visa/). The installation procedures are as follows.
RIGOL 4. Chapter 3 Programming Demos 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. 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.
Chapter 3 Programming Demos RIGOL Method 2: add the search path of the library in the /etc/ld.so.conf file. Add Method: #echo "/usr/local/lib" >> /etc/ld.so.conf, as shown in the figure below. After setting the search path of the library in /etc/ld.so.conf, run the /sbin/ldconfig command to update /etc/ld.so.cache (this command should have the root permission) so as to ensure the location of the library when executing the program.
RIGOL Chapter 3 Programming Demos Linux Programming Procedures 1. 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 #include #include #include //#include
Chapter 3 Programming Demos RIGOL string strInstr = ""; ViChar instrDesc[1000]; unsigned long i = 0; bool bFindDSA = false; memset(instrDesc,0,1000); //Turn on the VISA device status = viOpenDefaultRM(&defaultRM); if (status < VI_SUCCESS) { cout<<"No VISA equipment!"<
RIGOL Chapter 3 Programming Demos string str; //Address conversion, convert the strig type to char* SendAddr = const_cast(strAddr.c_str()); //Address conversion, convert the strig type to char* SendBuf = const_cast(strContent.
Chapter 3 Programming Demos RIGOL 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); } for(int i = 0;i < instr.length();i++) { instr[i] = toupper(instr[i]); } } 3. Edit the function file mainloop.cpp to complete the flow control. #include "DemoForDSA.
RIGOL Chapter 3 Programming Demos && demo.m_strCommand[2]='a' && demo.m_strCommand[3]='d') { //demo.InstrWrite(demo.m_strInstrAddr,"*IDN?"); //demo.InstrRead(demo.m_strInstrAddr,demo.m_strResult); cout<<"read result:"<
Chapter 3 Programming Demos RIGOL rm demo $(obj) 5. Execution Result 1) #make 2) ./demo 3) 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. 4) Input write (for example, write<*IDN?>) to write the command into the spectrum analyzer.