The Keysight N9042B spectrum analyzer is controlled remotely with SCPI commands. TestFlow's instrument library holds 386 commands for it, 193 of them queries that read values or state, grouped below by subsystem with their arguments. It is the same library TestFlow's AI agent uses to drive the N9042B on a real bench.
Describe the test; TestFlow's agent uses this command set to drive your Keysight N9042B and writes the report from the measured results.
With PyVISA, any VISA backend, and the instrument on USB, LAN or GPIB, this opens a session, identifies the instrument, sends one setting, and reads one value. Every command in it comes from the reference below. For a full walkthrough, see the PyVISA tutorial and the SCPI command cheat sheet.
import pyvisa
rm = pyvisa.ResourceManager()
print(rm.list_resources()) # find the Keysight N9042B's VISA address
# Paste the address of your Keysight N9042B (USB, LAN or GPIB).
inst = rm.open_resource("PASTE_VISA_ADDRESS_HERE")
inst.timeout = 5000 # ms
print(inst.query("*IDN?")) # identify the instrument
inst.write(":SOURce:PRESet") # Source Preset
print(inst.query(":FETCh:HARMonics:FREQuency:ALL?")) # Fetch Harmonic Frequency All
inst.close()Describe the test; TestFlow's agent uses this command set to drive your Keysight N9042B and writes the report from the measured results.
Describe the test in a sentence, for example “source preset on the N9042B, then fetch harmonic frequency all and log it against a limit”. TestFlow's agent builds the steps from this command library, runs them on your bench through the TestFlow desktop app, and writes the report from the measured values. See AI test automation for lab instruments for how that works and where it stops.
386 commands in 23 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values.
| Command | What it does | Arguments |
|---|---|---|
| :SENSe:CORRection:CSET:GROup:BReak <state> | Set Break State. Turns the correction group break on or off. | Text: ON,OFF,1,0 |
| :SENSe:CORRection:CSET:GROup:BReak? | Query Break State. Returns the correction group break state. | None |
| :SENSe:CORRection:CSET:GROup:COMMent <text> | Set Correction Group Comment. Sets a comment for the correction group. | Text |
| :SENSe:CORRection:CSET:GROup:COMMent? | Query Correction Group Comment. Returns the correction group comment. | None |
| :SENSe:CCORrection:CSET:DESCription <text> | Set Complex Correction Description. Sets the description of the selected complex correction. | Text: Up to 45 characters |
| :SENSe:CCORrection:CSET:DESCription? | Query Complex Correction Description. Returns the description of the selected complex correction. | None |
| :SENSe:ROSCillator:PXIReference:SOURce <source> | Set External Reference Source. Selects the internal or external frequency reference. | Text: INTernal,EXTernal |
| :SENSe:ROSCillator:PXIReference:SOURce? | Query External Reference Source. Returns the frequency reference source. | None |
| :SENSe:ROSCillator:PXIReference:EXTernal:FREQuency <freq> | Set External Reference Frequency. Sets the frequency of the external reference. | Number: 1 MHz to 110 MHz |
| :SENSe:ROSCillator:PXIReference:EXTernal:FREQuency? | Query External Reference Frequency. Returns the external reference frequency. | None |
| :SENSe:ROSCillator:PXIReference:EXTernal:LOCK? | Query External Reference Locked. Returns the external reference locked status. | None |
| :SENSe:SWEep:EGATe:DELay:COMPensation:TYPE <type> | Set Gate Delay Compensation. Selects the RBW-dependent gate delay compensation. | Text: OFF | SETTled | GDELay |
| :SENSe:SWEep:EGATe:DELay:COMPensation:TYPE? | Query Gate Delay Compensation. Returns the gate delay compensation type. | None |
| :SENSe:SWEep:EGATe:DELay <time> | Set Gate Delay. Sets the gate delay. | Number: 0.0 us to 100 s |
| :SENSe:SWEep:EGATe:DELay? | Query Gate Delay. Returns the gate delay. | None |
| :SENSe:SWEep:EGATe:LENGth <time> | Set Gate Length. Sets the length of time the gate is on after it opens. | Number: Time value |
| :SENSe:SWEep:EGATe:LENGth? | Query Gate Length. Returns the gate length. | None |
| :SENSe:SWEep:EGATe:TIME <time> | Set Gate View Sweep Time. Sets the gate view sweep time. | Number: 1 us to 6000 s |
| :SENSe:SWEep:EGATe:TIME? | Query Gate View Sweep Time. Returns the gate view sweep time. | None |
| :SENSe:SWEep:EGATe:VIEW:STARt <time> | Set Gate View Start Time. Sets the time at the left edge of the gate view. | Number: 0 to 500 ms (-150 ms for non-sweeping hardware) |
| :SENSe:SWEep:EGATe:VIEW:STARt? | Query Gate View Start Time. Returns the gate view start time. | None |
| :SENSe:SWEep:EGATe:HOLDoff:AUTO <state> | Set Gate Holdoff Auto. Turns automatic gate holdoff on or off. | Text: OFF | ON | 0 | 1 |
| :SENSe:SWEep:EGATe:HOLDoff:AUTO? | Query Gate Holdoff Auto. Returns the automatic gate holdoff state. | None |
| :SENSe:SWEep:EGATe:POLarity <polarity> | Set Gate Polarity. Sets the polarity of the gate signal. | Text: NEGative | POSitive |
| :SENSe:SWEep:EGATe:POLarity? | Query Gate Polarity. Returns the gate polarity. | None |
| :SENSe:POWer:RF:RANGe <real> | Set RF Range. Sets the largest signal amplitude the IF can pass without clipping. | Number: -100 to 100 dBm |
| :SENSe:POWer:RF:RANGe? | Query RF Range. Returns the RF range setting. | None |
| :SENSe:POWer:RF:RANGe:OPTimize IMMediate | Adjust Range for Min Clipping. Sets the range for minimum clipping from the measured level and initiates a measurement. | None |
| :SENSe:POWer:RF:RANGe:OPTimize:OFFSet <real> | Set Range Offset. Sets an offset added to the result of Adjust Range for Min Clipping. | Number: dB offset applied after Adjust Range for Min Clipping |
| :SENSe:POWer:RF:RANGe:OPTimize:OFFSet? | Query Range Offset. Returns the range offset used by Adjust Range. | None |
| :SENSe:VOLTage:IQ:I:RANGe:UPPer <voltage> | Set I Range. Sets the internal gain range for the I channel. | Number: V peak: 0.125, 0.25, 0.5 or 1 (1 V if greater) |
| :SENSe:VOLTage:IQ:I:RANGe:UPPer? | Query I Range. Returns the I channel gain range. | None |
| :SENSe:FREQuency:IQ:CENTer <freq> | Set IQ Center Frequency. Sets the center frequency used when the I/Q input is selected. | Number: -40.049995 MHz to 40.049995 MHz |
| :SENSe:FREQuency:IQ:CENTer? | Query IQ Center Frequency. Returns the I/Q center frequency. | None |
| :SENSe:FREQuency:CENTer:STEP:INCRement <freq> | Set Center Frequency Step. Sets the step size used by center frequency up and down steps. | Number: Hz, within hardware limits |
| :SENSe:FREQuency:CENTer:STEP:INCRement? | Query Center Frequency Step. Returns the center frequency step size. | None |
| :SENSe:FEED:IQ:TYPE <Setting> | Set Input IQ Type. Selects I+jQ, I only or Q only as the I/Q input path. | Text: IQ,IONLy,QONLy |
| :SENSe:FEED:IQ:TYPE? | Query Input IQ Type. Returns the I/Q input path. | None |
| :SENSe:CORRection:IQ:I:GAIN <rel_ampl> | Set I Ext Gain. Sets the external gain applied to the I channel input. | Number: dB, -100 to 100; negative is a loss |
| :SENSe:CORRection:IQ:I:GAIN? | Query I Ext Gain. Returns the I channel external gain. | None |
| :SENSe:LIST:EATTenuation <rel_ampl> | Set List Electronic Attenuation. Sets the list sweep electronic attenuation value. | Number: dB, within electronic attenuator range |
| :SENSe:LIST:EATTenuation? | Query List Electronic Attenuation. Returns the list electronic attenuation values. | None |
| :SENSe:LIST:BANDwidth:RESolution:TYPE <type> | Set List RBW Type. Sets the list sweep RBW filter type. | Text: GAUSsian | FLATtop | EMI |
| :SENSe:LIST:BANDwidth:RESolution:TYPE? | Query List RBW Type. Returns the list sweep RBW types. | None |
| :SENSe:LIST:BANDwidth:RESolution <freq> | Set List RBW. Sets the list sweep resolution bandwidth values. | Number: Hz, values available in Swept SA |
| :SENSe:LIST:BANDwidth:RESolution? | Query List RBW. Returns the list sweep resolution bandwidth values. | None |
| :SENSe:LIST:BANDwidth:VIDeo <freq> | Set List VBW. Sets the list sweep video bandwidth values. | Number: Hz, values available in Swept SA |
| :SENSe:LIST:BANDwidth:VIDeo? | Query List VBW. Returns the list sweep video bandwidth values. | None |
| :SENSe:LIST:SWEep:TIME <time> | Set List Sweep Time. Sets the list sweep time values. | Number: s, within Swept SA sweep time range |
| :SENSe:LIST:SWEep:TIME? | Query List Sweep Time. Returns the list sweep time values. | None |
| :SENSe:LIST:TRIGger:DELay <time> | Set List Trigger Delay. Sets the list sweep trigger delay values. | Number: s, within external trigger delay range |
| :SENSe:LIST:TRIGger:DELay? | Query List Trigger Delay. Returns the list sweep trigger delay values. | None |
| :SENSe:LIST:FREQuency:SYNThesis <integer> | Set List Phase Noise Optimization. Sets the list sweep phase noise optimization. | Number: 1 | 2 | 3 |
| :SENSe:LIST:FREQuency:SYNThesis? | Query List Phase Noise Optimization. Returns the list sweep phase noise optimization. | None |
| :SENSe:LIST:TRIGger:SLOPe <Setting> | Set List Trigger Slope. Sets the list sweep trigger polarity to rising or falling edge. | Text: POSitive,NEGative |
| :SENSe:LIST:TRIGger:SLOPe? | Query List Trigger Slope. Returns the list sweep trigger slope. | None |
| :SENSe:LIST:SEQuence <value> | Set List Sequence. Sets the order in which the list steps are stepped through. | Number: list step indexes, comma separated, e.g. 1,2,4,3 |
| :SENSe:LIST:SEQuence? | Query List Sequence. Returns the list step sequence. | None |
| :SENSe:LIST:SEQuence:AUTO ON | Set List Auto Sequence. Sets the list sequence to 1 through N, where N is the longest list. | None |
| :SENSe:LIST:SEQuence:AUTO? | Query List Auto Sequence. Returns whether the automatic list sequence is on. | None |
| :SENSe:PAVTime:SEGMents:INTerval <time> | Set PAvT Measurement Interval. Sets the acquisition window duration within each segment. | Number: s, 100 ns to max capture length less offset and transient |
| :SENSe:PAVTime:SEGMents:INTerval? | Query PAvT Measurement Interval. Returns the acquisition window duration. | None |
| :SENSe:PAVTime:SEGMents:OFFSet <time> | Set PAvT Measurement Offset. Sets the offset before the measurement interval within a segment. | Number: s, 0 to max capture length less interval and transient |
| :SENSe:PAVTime:SEGMents:OFFSet? | Query PAvT Measurement Offset. Returns the offset before the measurement interval. | None |
| :SENSe:PAVTime:SEGMents:TRANsient <time> | Set PAvT Measurement Transient. Sets the time between the end of the interval and the end of the segment. | Number: s, 0 to max capture length less offset and interval |
| :SENSe:PAVTime:SEGMents:TRANsient? | Query PAvT Measurement Transient. Returns the time between the interval end and segment end. | None |
| :SENSe:PAVTime:MTIMe? | Query PAvT Total Measurement Time. Returns the total measurement time for all segments. | None |
| :SENSe:PAVTime:FERRor:IMMediate | Measure PAvT Frequency Error. Measures the input frequency error at the center frequency. | None |
| :SENSe:PAVTime:FERRor <freq> | Set PAvT Frequency Error. Sets the frequency error offset from the center frequency. | Number: Hz, -100 MHz to 100 MHz |
| :SENSe:PAVTime:FERRor? | Query PAvT Frequency Error. Returns the frequency error offset. | None |
| :SENSe:PAVTime:FERRor:TIME <time> | Set PAvT Frequency Error Time. Sets the acquisition time for the frequency error measurement. | Number: s, 100 ns to 500 ms |
| :SENSe:PAVTime:FERRor:TIME? | Query PAvT Frequency Error Time. Returns the frequency error measurement time. | None |
| :SENSe:PAVTime:FERRor:CORRection <Setting> | Set PAvT Frequency Error Correction. Turns real-time segment frequency error correction on or off. | Text: OFF,ON |
| :SENSe:PAVTime:FERRor:CORRection:STATe? | Query PAvT Frequency Error Correction. Returns the frequency error correction state. | None |
| :SENSe:PAVTime:IF:GAIN <Setting> | Set PAvT IF Gain. Sets IF gain to low (OFF) or high (ON). | Text: OFF,ON |
| :SENSe:PAVTime:IF:GAIN:STATe? | Query PAvT IF Gain. Returns the IF gain state. | None |
| :SENSe:PAVTime:IF:GAIN:AUTO <Setting> | Set PAvT IF Gain Auto. Turns automatic IF gain selection on or off. | Text: OFF,ON |
| :SENSe:PAVTime:IF:GAIN:AUTO:STATe? | Query PAvT IF Gain Auto. Returns the automatic IF gain state. | None |
| :SENSe:FREQuency:CENTer <freq> | Set Center Frequency. Sets the center frequency of the analyzer display. | Number: Frequency in Hz (default unit Hz), within instrument range |
| :SENSe:FREQuency:CENTer? | Query Center Frequency. Returns the current center frequency in Hz. | None |
| :SENSe:OBWidth:FREQuency:SPAN <freq> | Set Span. Sets the frequency span for the Occupied BW measurement. | Number: Span in Hz, 100 Hz to hardware maximum span |
| :SENSe:OBWidth:FREQuency:SPAN? | Query Span. Returns the Occupied BW frequency span in Hz. | None |
| :SENSe:OBWidth:BANDwidth:RESolution <bandwidth> | Set Resolution Bandwidth. Sets the resolution bandwidth manually; the nearest available value is used. | Number: Bandwidth in Hz, 1 Hz to 8 MHz or 10 MHz depending on options and filter |
| :SENSe:OBWidth:BANDwidth:RESolution? | Query Resolution Bandwidth. Returns the resolution bandwidth in Hz. | None |
| :SENSe:OBWidth:BANDwidth:RESolution:AUTO <state> | Set Resolution Bandwidth Auto. Sets the resolution bandwidth to auto or manual coupling. | Text: ON | OFF | 1 | 0 |
| :SENSe:OBWidth:BANDwidth:RESolution:AUTO? | Query Resolution Bandwidth Auto. Returns the resolution bandwidth auto coupling state. | None |
| :SENSe:POWer:RF:ATTenuation <rel_ampl> | Set Attenuation. Sets the RF mechanical attenuation to a manual value. | Number: Attenuation in dB |
| :SENSe:POWer:RF:ATTenuation? | Query Attenuation. Returns the RF attenuation in dB. | None |
| :SENSe:OBWidth:PERCent <real> | Set Percent of OBW Power. Sets the percentage of total power used for occupied bandwidth. | Number: Percent, 10 to 99.99 |
| :SENSe:OBWidth:PERCent? | Query Percent of OBW Power. Returns the occupied bandwidth power percentage. | None |
| :SENSe:OBWidth:XDB <rel_ampl> | Set x dB Value. Sets the x dB value for the x dB bandwidth result. | Number: -100.0 to -0.1 dB |
| :SENSe:OBWidth:XDB? | Query x dB Value. Returns the x dB value in dB. | None |
| :SENSe:FREQuency:CENTer:STEP <freq> | Set Center Frequency Step (:SENSE:FREQUENCY:CENTER:STEP). Sets the step size used by UP and DOWN center frequency changes. | Number: Hz; 0 Hz up to the instrument maximum frequency |
| :SENSe:FREQuency:CENTer:STEP? | Query Center Frequency Step (:SENSE:FREQUENCY:CENTER:STEP?). Returns the center frequency step size in Hz. | None |
| :SENSe:TXPower:SWEep:TIME <time> | Set Sweep Time. Sets the sweep time captured and shown on screen. | Number: s; 1.0e-6 to 50 (SA mode) |
| :SENSe:TXPower:SWEep:TIME? | Query Sweep Time. Returns the sweep time in seconds. | None |
| :SENSe:PSTatistic:COUNts <integer> | Set PST Counts. Sets the accumulated number of sampling points for PST data acquisition. | Number: sample points; 1000 to 2000000000 |
| :SENSe:PSTatistic:COUNts? | Query PST Counts. Returns the accumulated number of sampling points for PST. | None |
| :SENSe:POWer:RF:ATTenuation:AUTO <state> | Set RF Attenuation Auto. Sets RF attenuation to automatic or manual coupling. | Text: OFF | ON | 0 | 1 |
| :SENSe:POWer:RF:ATTenuation:AUTO? | Query RF Attenuation Auto. Returns the RF attenuation auto state. | None |
| :SENSe:TOI:FREQuency:SPAN <freq> | Set TOI Span. Sets the TOI measurement frequency span about the center. | Number: 10 Hz to the instrument maximum span (Hz) |
| :SENSe:TOI:FREQuency:SPAN? | Query TOI Span. Returns the TOI measurement span in Hz. | None |
| :SENSe:TOI:AVERage:COUNt <integer> | Set TOI Averaging Count. Sets the number of TOI measurements averaged. | Number: 1 to 10000 |
| :SENSe:TOI:AVERage:COUNt? | Query TOI Averaging Count. Returns the TOI averaging count. | None |
| :SENSe:TOI:AVERage:STATe <state> | Set TOI Averaging State. Turns TOI averaging on or off. | Text: OFF | ON | 1 | 0 |
| :SENSe:TOI:AVERage:STATe? | Query TOI Averaging State. Returns whether TOI averaging is on. | None |
| :SENSe:TOI:ZSPan:BANDwidth <frequency> | Set TOI Zero-Span RBW. Sets the resolution bandwidth used for zero-span intermod measurements. | Number: 1 Hz to 8 MHz |
| :SENSe:TOI:ZSPan:BANDwidth? | Query TOI Zero-Span RBW. Returns the TOI zero-span RBW in Hz. | None |
| :SENSe:TOI:ZSPan:SWEep:TIME <time> | Set TOI Zero-Span Dwell Time. Sets the sweep (dwell) time for zero-span intermod measurements. | Number: sweep time in seconds |
| :SENSe:TOI:ZSPan:SWEep:TIME? | Query TOI Zero-Span Dwell Time. Returns the TOI zero-span dwell time in seconds. | None |
| :SENSe:HARMonics:FREQuency:FUNDamental <freq> | Set Harmonics Fundamental. Sets the fundamental frequency for the harmonics measurement. | Number: 1 Hz to half the instrument maximum frequency (Hz) |
| :SENSe:HARMonics:FREQuency:FUNDamental? | Query Harmonics Fundamental. Returns the harmonics fundamental frequency in Hz. | None |
| :SENSe:HARMonics:SWEeptime <time> | Set Harmonics Sweep Time. Sets the dwell time for the fundamental in the harmonics measurement. | Number: 100 us to 4000 s |
| :SENSe:HARMonics:SWEeptime? | Query Harmonics Sweep Time. Returns the harmonics dwell time in seconds. | None |
| :SENSe:HARMonics:AVERage:COUNt <integer> | Set Harmonics Averaging Count. Sets the number of harmonics sweeps averaged. | Number: 1 to 9999 |
| :SENSe:HARMonics:AVERage:COUNt? | Query Harmonics Averaging Count. Returns the harmonics averaging count. | None |
| :SENSe:HARMonics:TONE<n>:STATe <state> | Set Harmonic Tone State. Turns measurement of the selected harmonic on or off. | Number: tone 1 to 10; Text: OFF | ON | 0 | 1 |
| :SENSe:HARMonics:TONE<n>:STATe? | Query Harmonic Tone State. Returns whether the selected harmonic is measured. | Number: tone 1 to 10 |
| :SENSe:HARMonics:TONE<n>:FREQuency <frequency> | Set Harmonic Tone Frequency. Sets the frequency of the selected harmonic. | Number: tone 1 to 10; Number: instrument minimum to maximum frequency (Hz) |
| :SENSe:HARMonics:TONE<n>:FREQuency? | Query Harmonic Tone Frequency. Returns the frequency of the selected harmonic in Hz. | Number: tone 1 to 10 |
| :SENSe:HARMonics:TONE<n>:BANDwidth:RESolution <frequency> | Set Harmonic Tone Resolution BW. Sets the resolution bandwidth for the selected harmonic. | Number: tone 1 to 10; Number: 1 Hz to 8 MHz |
| :SENSe:HARMonics:TONE<n>:BANDwidth:RESolution? | Query Harmonic Tone Resolution BW. Returns the resolution bandwidth of the selected harmonic in Hz. | Number: tone 1 to 10 |
| :SENSe:HARMonics:TONE<n>:SWEep:TIME <time> | Set Harmonic Tone Dwell Time. Sets the dwell time for the selected harmonic. | Number: tone 1 to 10; Number: 100 us to 4000 s |
| :SENSe:HARMonics:TONE<n>:SWEep:TIME? | Query Harmonic Tone Dwell Time. Returns the dwell time of the selected harmonic in seconds. | Number: tone 1 to 10 |
| :SENSe:SEMask:FREQuency:SPAN <freq> | Set SEM Span. Sets the span used for the reference channel power in SEM. | Number: 1 kHz to instrument maximum (Hz) |
| :SENSe:SEMask:FREQuency:SPAN? | Query SEM Span. Returns the SEM reference channel span in Hz. | None |
| :SENSe:SEMask:BANDwidth:RESolution <bandwidth> | Set SEM Resolution BW. Sets the SEM reference channel resolution bandwidth. | Number: 1 Hz to 8 MHz (10 MHz with FS1/FS2) |
| :SENSe:SEMask:BANDwidth:RESolution? | Query SEM Resolution BW. Returns the SEM reference channel resolution bandwidth in Hz. | None |
| :SENSe:SEMask:SWEep:ACQuisition:TIME <time> | Set SEM Acquisition Time. Sets the minimum acquisition time per chunk for SEM on non-sweeping hardware. | Number: minimum acquisition time per chunk in seconds |
| :SENSe:SEMask:SWEep:ACQuisition:TIME? | Query SEM Acquisition Time. Returns the SEM minimum acquisition time in seconds. | None |
| :SENSe:SEMask:CARRier:POWer <real> | Set SEM Total Power Ref. Sets the carrier power used as the SEM relative power reference. | Number: reference carrier power in dBm |
| :SENSe:SEMask:CARRier:POWer? | Query SEM Total Power Ref. Returns the SEM carrier reference power in dBm. | None |
| :SENSe:FREQuency:OFFSet <freq> | Set Frequency Offset. Sets a frequency offset added to all absolute frequency readouts. | Number: -500 GHz to +500 GHz, in Hz or with unit |
| :SENSe:FREQuency:OFFSet? | Query Frequency Offset. Returns the current frequency offset. | None |
| :SENSe:ACPower:BANDwidth:RESolution <freq> | Set ACP Resolution Bandwidth. Sets the ACP resolution bandwidth (RBW). | Number: 1 Hz to 10 MHz (maximum depends on hardware option); unavailable values snap to the closest available bandwidth |
| :SENSe:ACPower:BANDwidth:RESolution? | Query ACP Resolution Bandwidth. Returns the ACP resolution bandwidth. | None |
| :SENSe:ACPower:BANDwidth:RESolution:AUTO <Setting> | Set ACP RBW Auto. Sets the RBW to Auto or Manual coupling. | Text: ON, OFF, 1, 0 |
| :SENSe:ACPower:BANDwidth:RESolution:AUTO? | Query ACP RBW Auto. Returns whether RBW is in Auto. | None |
| :SENSe:ACPower:BANDwidth:SHAPe <Setting> | Set RBW Filter Shape. Selects the RBW filter shape. | Text: GAUSsian, FLATtop |
| :SENSe:ACPower:BANDwidth:SHAPe? | Query RBW Filter Shape. Returns the RBW filter shape. | None |
| :SENSe:ACPower:BANDwidth:TYPE <Setting> | Set RBW Filter BW Type. Selects the Gaussian filter bandwidth reference. | Text: DB3,DB6 |
| :SENSe:ACPower:BANDwidth:TYPE? | Query RBW Filter BW Type. Returns the Gaussian filter bandwidth reference. | None |
| :SENSe:ACPower:AVERage:COUNt <integer> | Set Average Count. Sets the number of measurement averages. | Number: 1 to 1000 |
| :SENSe:ACPower:AVERage:COUNt? | Query Average Count. Returns the number of measurement averages. | None |
| :SENSe:ACPower:AVERage:STATe <Setting> | Set Averaging On/Off. Turns measurement averaging on or off. | Text: OFF, ON, 0, 1 |
| :SENSe:ACPower:AVERage:STATe? | Query Averaging On/Off. Returns whether averaging is on. | None |
| :SENSe:ACPower:AVERage:TCONtrol <Setting> | Set Average Mode. Sets the averaging termination action after the average count. | Text: EXPonential, REPeat |
| :SENSe:ACPower:AVERage:TCONtrol? | Query Average Mode. Returns the averaging mode. | None |
| :SENSe:ACPower:TYPE <Setting> | Set ACP Power Reference Type. Sets the reference used for the ACP measurement. | Text: TPRef,PSDRef |
| :SENSe:ACPower:TYPE? | Query ACP Power Reference Type. Returns the ACP reference type. | None |
| :SENSe:ACPower:CARRier:POWer <real> | Set Total Power Reference. Sets the manual total power reference of the carrier. | Number: Real value in dBm |
| :SENSe:ACPower:CARRier:POWer? | Query Total Power Reference. Returns the manual total power reference. | None |
| :SENSe:ACPower:CARRier:LIST:BANDwidth:INTegration <freq> | Set Carrier Integration Bandwidth. Sets the carrier measurement (integration) bandwidth. | Number: 10 Hz to instrument maximum span, in Hz or with unit |
| :SENSe:ACPower:CARRier:LIST:BANDwidth:INTegration? | Query Carrier Integration Bandwidth. Returns the carrier integration bandwidth list. | None |
| :SENSe:ACPower:OFFSet:LIST:FREQuency <List> | Set Offset Frequency List. Sets the offset frequencies for the ACP measurement. | Text |
| :SENSe:ACPower:OFFSet:LIST:FREQuency? | Query Offset Frequency List. Returns the offset frequency list. | None |
| :SENSe:ACPower:OFFSet:LIST:ABSolute <List> | Set Offset Absolute Limits. Sets the absolute amplitude limits for each offset. | Text |
| :SENSe:ACPower:OFFSet:LIST:ABSolute? | Query Offset Absolute Limits. Returns the six absolute amplitude limits. | None |
| :SENSe:ACPower:OFFSet:LIST:TEST <Setting> | Set Offset Fail Mask. Selects the fail logic between results and limits per offset. | Text: ABSolute, AND, OR, RELative |
| :SENSe:ACPower:OFFSet:LIST:TEST? | Query Offset Fail Mask. Returns the fail logic per offset. | None |
| :SENSe:ACPower:SWEep:ACQuisition:TIME <time> | Set Sweep Acquisition Time. Sets the minimum acquisition time per chunk on non-sweeping hardware. | Number: 100 ns to 4.00 ks, in s or with unit |
| :SENSe:ACPower:SWEep:ACQuisition:TIME? | Query Sweep Acquisition Time. Returns the minimum acquisition time per chunk. | None |
| :SENSe:SPURious:FREQuency:STARt <List> | Set Spur Start Frequency. Sets the start frequency for each spurious range. | Text |
| :SENSe:SPURious:RANGe:LIST:FREQuency:STARt? | Query Spur Start Frequency. Returns the start frequency of all 20 spurious ranges. | None |
| :SENSe:SPURious:FREQuency:SPAN <List> | Set Spur Span. Sets the span for each spurious range. | Text |
| :SENSe:SPURious:RANGe:LIST:FREQuency:SPAN? | Query Spur Span. Returns the span of all 20 spurious ranges. | None |
| :SENSe:SPURious:BANDwidth <List> | Set Spur Resolution Bandwidth. Sets the resolution bandwidth for each spurious range. | Text |
| :SENSe:SPURious:RANGe:LIST:BANDwidth:RESolution? | Query Spur Resolution Bandwidth. Returns the resolution bandwidth of all 20 spurious ranges. | None |
| :SENSe:SPURious:SWEep:POINts <List> | Set Spur Sweep Points. Sets the number of sweep points for each spurious range. | Text |
| :SENSe:SPURious:RANGe:LIST:SWEep:POINts? | Query Spur Sweep Points. Returns the sweep points of all 20 spurious ranges. | None |
| :SENSe:POWer:RF:ATTenuation:AUTO <bool> | Set Attenuation Auto (:SENSE:POWER:RF:ATTENUATION:A…). Sets the RF attenuator Auto or Manual mode. | Text: OFF | ON | 0 | 1 |
| :SENSe:SPURious:TYPE <type> | Set Spur Measurement Type. Sets the spurious measurement type. | Text: EXAMine | FULL |
| :SENSe:SPURious:TYPE? | Query Spur Measurement Type. Returns the spurious measurement type. | None |
| :SENSe:SPURious:STATe <List> | Set Spur Range Enabled. Enables or disables each spurious range. | Text |
| :SENSe:SPURious:RANGe:LIST:STATe? | Query Spur Range Enabled. Returns the enabled state of all 20 spurious ranges. | None |
| Command | What it does | Arguments |
|---|---|---|
| :CALCulate:OBWidth:MARKer1:MODE <mode> | Set Marker Mode. Sets the control mode of marker 1 to Normal, Delta or Off. | Text: POSition,DELTa,OFF |
| :CALCulate:OBWidth:MARKer1:MODE? | Query Marker Mode. Returns the control mode of marker 1. | None |
| :CALCulate:OBWidth:MARKer1:MAXimum | Marker Peak Search. Moves marker 1 to the trace point with the maximum Y value; query SYST:ERR? to confirm a peak was found. | None |
| :CALCulate:OBWidth:MARKer1:X <freq> | Set Marker X Value. Sets the marker X-axis value for marker 1. | Number |
| :CALCulate:OBWidth:MARKer1:X? | Query Marker X Value. Returns the marker 1 X-axis value in Hz. | None |
| :CALCulate:OBWidth:MARKer1:Y? | Query Marker Amplitude. Returns the marker 1 Y-axis value in the current Y unit. | None |
| :CALCulate:TXPower:MARKer1:MAXimum | Marker Peak Search (:CALCULATE:TXPOWER:MARKER1:MA…). Moves marker 1 to the trace point with the maximum Y value; use :SYSTem:ERRor? to check whether a peak was found. | None |
| :CALCulate:TXPower:MARKer1:MODE <mode> | Set Marker Mode (:CALCULATE:TXPOWER:MARKER1:MO…). Sets the control mode of marker 1. | Text: POSition | DELTa | OFF |
| :CALCulate:TXPower:MARKer1:MODE? | Query Marker Mode (:CALCULATE:TXPOWER:MARKER1:MO…). Returns the control mode of marker 1. | None |
| :CALCulate:TXPower:MARKer1:X <real> | Set Marker X Value (:CALCULATE:TXPOWER:MARKER1:X). Sets the X value of marker 1. | Number: s for time X-axis; no suffix uses fundamental units of the current X-axis scale |
| :CALCulate:TXPower:MARKer1:X? | Query Marker X Value (:CALCULATE:TXPOWER:MARKER1:X?). Returns the absolute X value of marker 1 (NAN if off). | None |
| :CALCulate:TXPower:MARKer1:Y? | Query Marker Y Value. Returns the Y-axis result of marker 1 (NAN if off). | None |
| :CALCulate:TXPower:MARKer:AOFF | All Markers Off. Turns off all markers. | None |
| :CALCulate:PSTatistic:RANGe:PROBability:MINimum <pp> | Set PST Probability Minimum. Sets the minimum probability range for the Power Stat CCDF measurement. | Text: PP2 (1 %) | PP3 (0.1 %) | PP4 (0.01 %) | PP5 (0.001 %) | PP6 | PP7 |
| :CALCulate:PSTatistic:RANGe:PROBability:MINimum? | Query PST Probability Minimum. Returns the minimum probability range of the Power Stat CCDF measurement. | None |
| :CALCulate:ACPower:OFFSet:LIST:LIMit:NEGative:UPPer:DATA <List> | Set Negative Offset Upper Limit. Sets the upper limit for the lower segment of each offset pair. | Text |
| :CALCulate:ACPower:OFFSet:LIST:LIMit:NEGative:UPPer:DATA? | Query Negative Offset Upper Limit. Returns the negative offset upper limits. | None |
| :CALCulate:ACPower:LIMit:STATe <Setting> | Set ACP Limit Test. Turns limit checking for the offsets on or off. | Text: OFF, ON, 0, 1 |
| :CALCulate:ACPower:LIMit:STATe? | Query ACP Limit Test. Returns whether limit checking is on. | None |
| :CALCulate:ACPower:MARKer<n>:MAXimum | Set Marker Peak Search. Moves the selected marker to the trace maximum. | Number: Marker number 1 to 12 |
| :CALCulate:ACPower:MTRace <Setting> | Set ACP Measure Trace. Selects the trace whose results are reported by READ or FETCh. | Text: TRACe1, TRACe2, TRACe3 |
| :CALCulate:ACPower:MTRace? | Query ACP Measure Trace. Returns the trace used for measurement results. | None |
| :CALC:MARK<n>:MAX | Marker Peak Search (:CALC:MARK<N>:MAX). Moves the marker to the maximum point of its trace. | Number: Marker 1 to 24 |
| :CALC:MARK<n>:MAX:NEXT | Marker Next Peak. Moves the marker to the next lower peak in amplitude. | Number: Marker 1 to 24 |
| :CALC:MARK<n>:MAX:RIGH | Marker Next Peak Right. Moves the marker to the nearest peak to the right. | Number: Marker 1 to 24 |
| :CALC:MARK<n>:MAX:ALL | Marker Peak Search All. Searches all peaks on a Spectrogram view. | Number: Marker 1 to 24 |
| :CALC:MARK<n>:X <freq> | Set Marker Frequency. Sets the marker X-axis value. | Number; Number |
| :CALC:MARK<n>:X? | Query Marker Frequency. Returns the marker X-axis value. | Number: Marker 1 to 24 |
| :CALC:MARK<n>:Y? | Query Marker Amplitude (:CALC:MARK<N>:Y?). Returns the marker amplitude value. | Number: Marker 1 to 24 |
| :CALC:MARK<n>:MODE <mode> | Set Marker Mode (:CALC:MARK<N>:MODE). Sets the marker control mode. | Number: Marker 1 to 24; Text: POS (normal), DELT (delta) or OFF |
| :CALC:MARK:COUP <bool> | Set Marker Coupling. Turns marker coupling on or off. | Text: OFF, ON, 0 or 1 |
| :CALC:MARK:PEAK:THR <ampl> | Set Peak Threshold. Sets the peak search threshold. | Number: Current Ref Level minus 200 dB to current Ref Level, in dBm |
| :CALC:MARK:PEAK:THR? | Query Peak Threshold. Returns the peak search threshold. | None |
| :CALC:MARK:PEAK:THR:STAT <bool> | Set Peak Threshold State. Turns the peak threshold criterion on or off. | Text: OFF, ON, 0 or 1 |
| :CALC:MARK:PEAK:EXC <rel_ampl> | Set Peak Excursion. Sets the peak excursion value. | Number: 0.0 dB to 100.0 dB |
| :CALC:MARK:PEAK:EXC:STAT <bool> | Set Peak Excursion State. Turns the peak excursion criterion on or off. | Text: OFF, ON, 0 or 1 |
| :CALC:MARK:PEAK:TABL:STAT <bool> | Set Peak Table State. Turns the peak table on or off. | Text: OFF, ON, 0 or 1 |
| :CALC:MARK:PEAK:SORT <sort> | Set Peak Table Sort. Sets the peak table sort order. | Text: FREQuency, AMPLitude or DELTa |
| :CALC:MARK:PEAK:MPE <max_peaks> | Set Maximum Number of Peaks. Sets the maximum number of peaks in the peak table. | Number: 1 to 500 |
| :CALC:DATA:PEAK? <threshold>,<excursion> | Query Signal Peaks. Returns the list of signal peaks above the threshold with the given excursion. | Number: Threshold in dBm; Number: Excursion in dB |
| :CALC:LLIN<n>:FAIL? | Query Limit Line Fail. Returns whether the limit line test failed. | Number: Limit line 1 to 6 |
| :CALCulate:SPURious:MARKer<n>:MAXimum | Spur Marker Peak Search. Moves the selected spurious marker to the maximum trace point. | Number: Marker number 1 to 12 |
| :CALCulate:SPURious:MARKer<n>:MODE <mode> | Set Spur Marker Mode. Sets the spurious marker control mode. | Number: Marker number 1 to 12; Text: POSition | DELTa | OFF |
| :CALCulate:SPURious:MARKer<n>:MODE? | Query Spur Marker Mode. Returns the spurious marker control mode. | Number: Marker number 1 to 12 |
| :CALCulate:SPURious:MARKer<n>:X <freq> | Set Spur Marker Frequency. Sets the spurious marker X-axis value. | Number: Marker number 1 to 12; Number: X-axis value in Hz or with suffix |
| :CALCulate:SPURious:MARKer<n>:X? | Query Spur Marker Frequency. Returns the spurious marker X-axis value. | Number: Marker number 1 to 12 |
| :CALCulate:SPURious:MARKer<n>:Y? | Query Spur Marker Amplitude. Returns the spurious marker Y-axis value. | Number: Marker number 1 to 12 |
| :CALCulate:SPURious:MARKer:AOFF | All Spur Markers Off. Turns off all spurious markers. | None |
| :CALCulate:SEMask:MARKer<n>:MODE <mode> | Set SEM Marker Mode. Sets the SEM marker control mode. | Number: Marker number 1 to 12; Text: POSition | OFF |
| :CALCulate:SEMask:MARKer<n>:MODE? | Query SEM Marker Mode. Returns the SEM marker control mode. | Number: Marker number 1 to 12 |
| :CALCulate:SEMask:MARKer<n>:Y? | Query SEM Marker Amplitude. Returns the SEM marker Y-axis value. | Number: Marker number 1 to 12 |
| :CALCulate:SEMask:OFFSet1:LIST:STARt:ABSolute <List> | Set SEM Absolute Start Limit. Sets the absolute power limit at the start frequency of each SEM offset. | Text |
| :CALCulate:SEMask:OFFSet1:OUTer:LIST:STARt:ABSolute? | Query SEM Absolute Start Limit. Returns the absolute start limits of the SEM offsets. | None |
| Command | What it does | Arguments |
|---|---|---|
| :SYSTem:CALibration:CGRoup <integer> | Set Cal Group. Selects the calibration group. | Number: 1 to 100 |
| :SYSTem:CALibration:CGRoup? | Query Cal Group. Returns the selected calibration group. | None |
| :SYSTem:CALibration:CGRoup:APPLy <state> | Set Apply Cal Group. Controls whether the checked Apply rows of the selected Cal Group are applied. | Text: ON | OFF | 1 | 0 |
| :SYSTem:CALibration:CGRoup:APPLy? | Query Apply Cal Group. Returns the Apply Cal Group state. | None |
| :SYSTem:CALibration:CGRoup:APPLy:AOFF | All Apply Cal Group Off. Turns off Apply Cal Group for all groups. | None |
| :SYSTem:CALibration:TUNE:SELected <source> | Set Calibrator Source. Selects the calibrator to control. | Text: NONE | REF50 | REF4800 | TUNAble | CALOUT | RCM1 to RCM10 |
| :SYSTem:CALibration:TUNE:SELected? | Query Calibrator Source. Returns the selected calibrator. | None |
| :SYSTem:CALibration:TUNE:OUTput:STATe <state> | Set Calibrator Output. Sets the selected calibrator RF power output state. | Text: ON | OFF | 1 | 0 |
| :SYSTem:CALibration:TUNE:OUTput:STATe? | Query Calibrator Output. Returns the selected calibrator output state. | None |
| :SYSTem:CALibration:TUNE:FREQuency <freq> | Set Calibrator Frequency. Sets the selected calibrator frequency. | Number: Depends on the selected calibrator; SA6210A 10 MHz to 55 GHz |
| :SYSTem:CALibration:TUNE:FREQuency? | Query Calibrator Frequency. Returns the selected calibrator frequency. | None |
| :SYSTem:CALibration:TUNE:TYPE <type> | Set Calibrator Signal Type. Sets the selected calibrator signal type. | Text: CW | COMB |
| :SYSTem:CALibration:TUNE:TYPE? | Query Calibrator Signal Type. Returns the selected calibrator signal type. | None |
| :SYSTem:CALibration:TUNE:SPACing <freq> | Set Calibrator Comb Spacing. Sets the calibrator comb spacing when the signal type is COMB. | Number: Comb spacing frequency in Hz |
| :SYSTem:CALibration:TUNE:SPACing? | Query Calibrator Comb Spacing. Returns the calibrator comb spacing. | None |
| :SYSTem:PRINt:THEMe <theme> | Set Print Theme. Sets the print theme. | Text: FILLed | OUTLine |
| :SYSTem:PRINt:THEMe? | Query Print Theme. Returns the print theme. | None |
| :SYSTem:IDN? | Query Identity. Returns the instrument identity string. | None |
| :SYSTem:ERRor? | Query Error Queue. Returns the most recent error from the error queue. | None |
| :SYSTem:PRESet | Mode Preset. Presets the instrument mode and measurement to their default settings. | None |
| :SYST:ERR? | Query Error. Returns the next error from the error queue. | None |
| Command | What it does | Arguments |
|---|---|---|
| :FETCh:SANalyzern? | Fetch Swept SA Results. Returns the Swept SA results without initiating a new measurement. | None |
| :FETCh:PAVTime<n>? | Fetch Phase and Amplitude vs Time. Returns Phase and Amplitude vs Time results without measuring. | Number |
| :FETCh:OBWidth<n>? | Fetch Occupied BW Results. Retrieves the last OBW results for index n without starting a new measurement. | Number |
| :FETCh:OBWidth:OBWidth? | Measure Occupied BW Occupied Bandwidth. Returns the occupied bandwidth in Hz from the last OBW measurement. | None |
| :FETCh:OBWidth:FERRor? | Fetch Transmit Frequency Error. Returns the transmit frequency error in Hz from the last OBW measurement. | None |
| :FETCh:OBWidth:XDB? | Fetch x dB Bandwidth. Returns the x dB bandwidth in Hz from the last OBW measurement. | None |
| :FETCh:PSTatistic<n>? | Fetch PST Results. Retrieves Power Stat CCDF data from the last measurement. | Number: 0 = unprocessed I/Q trace data; 1 or omitted = 11 scalar results |
| :FETCh:TOI<n>? | Fetch TOI Trace Data. Fetches TOI results without triggering a new measurement. | Number |
| :FETCh:TOI:IP3? | Fetch TOI Worst-Case Output Intercept. Fetches the worst-case output intercept power in dBm. | None |
| :FETCh:HARMonics:DISTortion? | Fetch Harmonics Distortion. Fetches the total harmonic distortion as a percentage. | None |
| :FETCh:HARMonics:FUNDamental? | Fetch Harmonics Fundamental Frequency. Fetches the frequency of the fundamental in Hz. | None |
| :FETCh:HARMonics:AMPLitude<n>? | Fetch Harmonic Amplitude. Fetches the amplitude of the specified harmonic. | Number |
| :FETCh:HARMonics:AMPLitude:ALL? | Fetch Harmonic Amplitude All. Fetches the amplitudes of the first 10 harmonics in dBc. | None |
| :FETCh:HARMonics:FREQuency<n>? | Fetch Harmonic Frequency. Fetches the frequency of the specified harmonic in Hz. | Number: 1-10 |
| :FETCh:HARMonics:FREQuency:ALL? | Fetch Harmonic Frequency All. Fetches the frequencies of the first 10 harmonics in Hz. | None |
| :FETC:SAN<n>? | Fetch Swept SA Data. Retrieves swept SA measurement data without starting a measurement. | Number: 0 to 9, selects the data returned |
| :FETCh:SEMask<n>? | Fetch SEM Results. Returns the requested SEM results from the last measurement without starting a new one. | Number |
| Command | What it does | Arguments |
|---|---|---|
| :TRIGger:SEQuence:RF:SOURce <source> | Set RF Trigger Source. Selects the RF trigger source for the Swept SA measurement. | Text: EXTernal1 | EXTernal2 | EXTernal3 | EXTernal4 | AEXTernal | IMMediate | LEVel | FMT | LINE | ADC | FRAMe | RFBurst | VIDeo | TV | PXI | INTernal | PRTChandet | PRTFrame | PRTEvent |
| :TRIGger:SEQuence:RF:SOURce? | Query RF Trigger Source. Returns the RF trigger source for the Swept SA measurement. | None |
| :TRIGger:<Source>:DELay <time> | Set Trigger Delay. Sets the trigger delay for the selected trigger source. | Text: LINE,EXTernal1,EXTernal2,EXTernal3,EXTernal4,AEXTernal,VIDeo,ADC,RFBurst,FRAMe,LEVel,FMT,IQMag,IDEMod,QDEMod,IINPut,QINPut,AIQMag,PXI,INTernal; Number |
| :TRIGger:<Source>:DELay? | Query Trigger Delay. Returns the trigger delay for the selected trigger source. | Text: LINE,EXTernal1,EXTernal2,EXTernal3,EXTernal4,AEXTernal,VIDeo,ADC,RFBurst,FRAMe,LEVel,FMT,IQMag,IDEMod,QDEMod,IINPut,QINPut,AIQMag,PXI,INTernal |
| :TRIGger:<Source>:DELay:STATe <state> | Set Trigger Delay State. Turns the trigger delay on or off for the selected source. | Text: LINE,EXTernal1,EXTernal2,EXTernal3,EXTernal4,AEXTernal,VIDeo,ADC,RFBurst,FRAMe,LEVel,FMT,IQMag,IDEMod,QDEMod,IINPut,QINPut,AIQMag,PXI,INTernal; Text: OFF,ON,0,1 |
| :TRIGger:<Source>:DELay:STATe? | Query Trigger Delay State. Returns the trigger delay state for the selected source. | Text: LINE,EXTernal1,EXTernal2,EXTernal3,EXTernal4,AEXTernal,VIDeo,ADC,RFBurst,FRAMe,LEVel,FMT,IQMag,IDEMod,QDEMod,IINPut,QINPut,AIQMag,PXI,INTernal |
| :TRIGger:<Source>:SLOPe <slope> | Set Trigger Slope. Sets the trigger slope for the selected source. | Text: LINE,EXTernal1,EXTernal2,EXTernal3,EXTernal4,AEXTernal,VIDeo,ADC,RFBurst,FRAMe,LEVel,FMT,IQMag,IDEMod,QDEMod,IINPut,QINPut,AIQMag,PXI,INTernal; Text: POSitive,NEGative |
| :TRIGger:<Source>:SLOPe? | Query Trigger Slope. Returns the trigger slope for the selected source. | Text: LINE,EXTernal1,EXTernal2,EXTernal3,EXTernal4,AEXTernal,VIDeo,ADC,RFBurst,FRAMe,LEVel,FMT,IQMag,IDEMod,QDEMod,IINPut,QINPut,AIQMag,PXI,INTernal |
| :TRIGger:SEQuence:RFBurst:LEVel:TYPE <type> | Set RF Burst Trigger Level Type. Selects absolute or relative RF burst trigger level. | Text: ABSolute | RELative |
| :TRIGger:SEQuence:RFBurst:LEVel:TYPE? | Query RF Burst Trigger Level Type. Returns the RF burst trigger level type. | None |
| :TRIGger:SEQuence:TV:LINE <integer> | Set TV Trigger Line. Selects the TV line number on which to trigger. | Number: Line number within the TV standard range |
| :TRIGger:SEQuence:TV:LINE? | Query TV Trigger Line. Returns the TV trigger line number. | None |
| :TRIGger:SEQuence:FRAMe:SYNC <source> | Set Periodic Timer Sync Source. Selects the sync source for the periodic timer trigger. | Text: EXTernal1 | EXTernal2 | EXTernal3 | EXTernal4 | RFBurst | PXI | INTernal | OFF |
| :TRIGger:SEQuence:FRAMe:SYNC? | Query Periodic Timer Sync Source. Returns the periodic timer sync source. | None |
| :TRIGger:SEQuence:OFFSet:STATe <state> | Set Trigger Offset State. Turns the trigger offset on or off. | Text: OFF | ON | 0 | 1 |
| :TRIGger:SEQuence:OFFSet:STATe? | Query Trigger Offset State. Returns the trigger offset state. | None |
| Command | What it does | Arguments |
|---|---|---|
| :CONFigure:<measurement>:NDEFault | Configure Measurement. Stops the current measurement and sets up the specified measurement with defaults. | Text: Measurement name such as SANalyzer, ACPower, CHPower, OBWidth |
| :CONFigure? | Query Configured Measurement. Returns the current measurement. | None |
| :CONFigure:CATalog? | Query Measurement Catalog. Returns a quoted string of all licensed measurement names in the current mode. | None |
| :CONFigure:PAVTime | Configure Phase and Amplitude vs Time. Configures the Phase and Amplitude vs Time measurement. | None |
| :CONFigure:OBWidth | Meas Preset Occupied BW. Selects the OBW measurement and restores its settings to preset state. | None |
| :CONFigure:PSTatistic:NDEFault | Configure Power Stat CCDF. Selects the Power Stat CCDF measurement without changing its settings. | None |
| :CONFigure:TOI | Configure TOI Measurement. Selects the TOI measurement with Meas Setup in preset state. | None |
| :CONFigure:TOI:NDEFault | Configure TOI Measurement No Default. Selects the TOI measurement without changing settings. | None |
| :CONF:SAN | Select Swept SA Measurement. Selects the swept SA measurement with preset settings. | None |
| :CONF:SAN:NDEF | Select Swept SA Measurement No Default. Selects the swept SA measurement without changing its settings. | None |
| :CONF? | Query Current Measurement. Returns the long form name of the current measurement. | None |
| :CONFigure:SPURious | Preset Spurious Measurement. Restores all Spurious measurement parameters to their default values. | None |
| :CONFigure:SEMask | Configure SEM Measurement. Selects SEM measurement with Meas Setup settings in preset state. | None |
| :CONFigure:SEMask:NDEFault | Configure SEM Without Defaults. Selects SEM measurement without changing current settings. | None |
| Command | What it does | Arguments |
|---|---|---|
| :INITiate:IMMediate | Initiate Measurement. Initiates a sweep or measurement. | None |
| :INITiate:CONTinuous <state> | Initiate Continuous Sweep. Sets continuous or single sweeping. | Text: ON | OFF | 1 | 0 |
| :INITiate:CONTinuous? | Query Continuous Sweep. Returns the continuous sweep state. | None |
| :INITiate:RESTart | Restart Measurement. Restarts the measurement. | None |
| :INITiate:PAVTime | Initiate Phase and Amplitude vs Time. Starts a Phase and Amplitude vs Time measurement. | None |
| :INITiate:OBWidth | Initiate Occupied BW. Starts a trigger cycle for the OBW measurement without returning data; then use FETCh to retrieve results. | None |
| :INITiate:PSTatistic | Initiate Power Stat CCDF. Starts a trigger cycle for the Power Stat CCDF measurement without returning data. | None |
| :INITiate:TOI | Initiate TOI Measurement. Initiates a trigger cycle for the TOI measurement without returning data. | None |
| :INITiate:CONTinuous <Setting> | Set Continuous Sweep. Selects single or continuous measurement operation. | Text: OFF,ON,0,1 |
| :INIT:CONT <bool> | Set Continuous Sweep (:INIT:CONT). Selects continuous or single measurement operation. | Text: OFF, ON, 0 or 1 (OFF is single) |
| :INIT:SAN | Initiate Measurement (:INIT:SAN). Starts a trigger cycle for the swept SA measurement without returning data; then use FETC:SAN to read data. | None |
| :INITiate:SEMask | Initiate SEM Measurement. Starts a trigger cycle for the SEM measurement without returning data. | None |
| Command | What it does | Arguments |
|---|---|---|
| :READ:SANalyzern? | Read Swept SA Results. Initiates a measurement and returns the Swept SA results. | None |
| :READ:PAVTime<n>? | Read Phase and Amplitude vs Time. Initiates and returns Phase and Amplitude vs Time results. | Number |
| :READ:OBWidth<n>? | Read Occupied BW Results. Starts the OBW measurement and returns the data for index n. | Number |
| :READ:PSTatistic<n>? | Read PST Results. Starts a Power Stat CCDF measurement and retrieves the data. | Number: 0 = unprocessed I/Q trace data; 1 or omitted = 11 scalar results |
| :READ:TOI<n>? | Read TOI Results. Acquires and returns TOI results. | Number |
| :READ:TOI:IP3? | Read TOI Worst-Case Output Intercept. Acquires and returns the worst-case output intercept power in dBm. | None |
| :READ:HARMonics:DISTortion? | Read Harmonics Distortion. Acquires and returns the total harmonic distortion as a percentage. | None |
| :READ:SAN<n>? | Read Swept SA Data. Starts the measurement and retrieves the data selected by n. | Number: 0 to 9, selects the data returned |
| :READ:SEMask<n>? | Read SEM Results. Starts the SEM measurement and returns the requested results. | Number |
| Command | What it does | Arguments |
|---|---|---|
| :MEASure:SANalyzern? | Measure Swept SA Results. Configures and measures Swept SA results in one step. | None |
| :MEASure:PAVTime<n>? | Measure Phase and Amplitude vs Time. Configures, measures and returns Phase and Amplitude vs Time results. | Number |
| :MEASure:OBWidth<n>? | Measure Occupied BW Results. Switches to OBW, restores defaults, measures and returns the data for index n. | Number |
| :MEASure:PSTatistic<n>? | Measure PST Results. Switches to Power Stat CCDF, restores defaults, measures and retrieves the data. | Number: 0 = unprocessed I/Q trace data; 1 or omitted = 11 scalar results |
| :MEASure:TOI<n>? | Measure TOI Results. Triggers a TOI measurement and returns the results. | Number |
| :MEASure:TOI:IP3? | Measure TOI Worst-Case Output Intercept. Triggers a TOI measurement and returns the worst-case output intercept power in dBm. | None |
| :MEAS:SAN<n>? | Measure Swept SA Data. Switches to the swept SA measurement, restores defaults, measures, and retrieves the data selected by n. | Number: 0 to 9, selects the data returned |
| :MEASure:SEMask<n>? | Measure SEM Results. Switches to SEM, restores defaults, starts the measurement and returns the requested results. | Number |
| Command | What it does | Arguments |
|---|---|---|
| :DISPlay:TXPower:WINDow1:TRACe:Y:SCALe:RLEVel <real> | Set Reference Level (:DISPLAY:TXPOWER:WINDOW1:TRAC…). Sets the reference level of the Y-axis; turns Auto Scaling off. | Number: dBm; -250.00 to +250.00 |
| :DISPlay:TXPower:WINDow1:TRACe:Y:SCALe:RLEVel? | Query Reference Level (:DISPLAY:TXPOWER:WINDOW1:TRAC…). Returns the reference level in dBm. | None |
| :DISPlay:WINDow[1]:TRACe:Y[:SCALe]:RLEVel:OFFSet:STATe <state> | Set Ref Level Offset State. Turns the reference level offset on or off. | Text: OFF | ON | 0 | 1 |
| :DISPlay:WINDow[1]:TRACe:Y[:SCALe]:RLEVel:OFFSet:STATe? | Query Ref Level Offset State. Returns whether the reference level offset is on. | None |
| :DISPlay:TOI:VIEW:WINDow:TRACe:Y:SCALe:RLEVel <amplitude> | Set TOI Ref Value. Sets the absolute power reference value in the TOI view. | Number: -250.00 to +250.00 dBm |
| :DISPlay:TOI:VIEW:WINDow:TRACe:Y:SCALe:RLEVel? | Query TOI Ref Value. Returns the TOI absolute power reference value in dBm. | None |
| :DISPlay:SEMask:WINDow[1]:TRACe:Y[:SCALe]:RLEVel <real> | Set Reference Level (:DISPLAY:SEMASK:WINDOW1:TRACE…). Sets the absolute power reference level value. | Number: -250.00 to 250.00 dBm |
| :DISPlay:SEMask:WINDow[1]:TRACe:Y[:SCALe]:RLEVel? | Query Reference Level (:DISPLAY:SEMASK:WINDOW1:TRACE…). Returns the reference level value. | None |
| Command | What it does | Arguments |
|---|---|---|
| :FREQ:CENT <freq> | Set Center Frequency (:FREQ:CENT). Sets the center frequency. | Number: 0 Hz to the maximum frequency of the instrument, in Hz (suffixes such as MHz allowed); UP or DOWN steps by the CF Step |
| :FREQ:CENT? | Query Center Frequency (:FREQ:CENT?). Returns the center frequency. | None |
| :FREQ:CENT:STEP <freq> | Set CF Step. Sets the center frequency step size. | Number: 0 Hz to the maximum frequency of the instrument, in Hz |
| :FREQ:CENT:STEP? | Query CF Step. Returns the center frequency step size. | None |
| :FREQ:SPAN:BAND:RAT <integer> | Set Span to RBW Ratio. Sets the ratio between span and resolution bandwidth. | Number: 2 to 10000 |
| :FREQ:SPAN:BAND:RAT? | Query Span to RBW Ratio. Returns the span to resolution bandwidth ratio. | None |
| :FREQ:SPAN:BAND:RAT:AUTO <bool> | Set Span to RBW Ratio Auto. Turns automatic coupling of the span to RBW ratio on or off. | Text: OFF, ON, 0 or 1 |
| :FREQ:SPAN:BAND:RAT:AUTO? | Query Span to RBW Ratio Auto. Returns whether the span to RBW ratio is auto coupled. | None |
| Command | What it does | Arguments |
|---|---|---|
| :POW:ATT <rel_ampl> | Set Attenuation (:POW:ATT). Sets the RF input attenuation; sets it to manual. | Number: Attenuation in dB, as allowed by the instrument |
| :POW:ATT? | Query Attenuation (:POW:ATT?). Returns the RF input attenuation. | None |
| :POW:ATT:AUTO <bool> | Set Attenuation Auto. Turns automatic attenuation coupling on or off. | Text: OFF, ON, 0 or 1 |
| :POW:ATT:AUTO? | Query Attenuation Auto. Returns the attenuation auto coupling state. | None |
| :POW:PADJ <freq> | Set Preselector Adjust. Sets the preselector adjust offset. | Number: -500 MHz to +500 MHz |
| :POW:PADJ? | Query Preselector Adjust. Returns the preselector adjust offset. | None |
| Command | What it does | Arguments |
|---|---|---|
| :SWE:TIME:AUTO <bool> | Set Sweep Time Auto. Turns automatic sweep time coupling on or off. | Text: OFF, ON, 0 or 1 |
| :SWE:TIME:AUTO? | Query Sweep Time Auto. Returns the sweep time auto coupling state. | None |
| :SWE:TIME:AUTO:RUL <rules> | Set Sweep Time Rules. Selects the rules used to set sweep time in auto mode. | Text: NORMal, ACCuracy or SRESponse |
| :SWE:TIME:AUTO:RUL? | Query Sweep Time Rules. Returns the sweep time rules. | None |
| :SWE:TYPE <type> | Set Sweep Type. Selects swept or FFT sweep type. | Text: SWP (swept) or FFT |
| :SWE:TYPE? | Query Sweep Type. Returns the sweep type. | None |
| Command | What it does | Arguments |
|---|---|---|
| [:DISPlay]:OBWidth:WINDow[1]:TRACe:Y[:SCALe]:RLEVel <real> | Set Reference Level. Sets the absolute amplitude reference value at the top, center or bottom of the graticule. | Number: Reference level in dBm, -250 to 250 |
| [:DISPlay]:OBWidth:WINDow[1]:TRACe:Y[:SCALe]:RLEVel? | Query Reference Level. Returns the reference level in dBm. | None |
| [:DISPlay]:WINDow[1]:TRACe:Y[:SCALe]:RLEVel:OFFSet <rel_ampl> | Set Reference Level Offset. Sets the reference level offset in dB. | Number: Offset in dB, keeps reference level within -327.6 dB to 327.6 dB |
| [:DISPlay]:WINDow[1]:TRACe:Y[:SCALe]:RLEVel:OFFSet? | Query Reference Level Offset. Returns the reference level offset in dB. | None |
| Command | What it does | Arguments |
|---|---|---|
| :BAND:VID:RAT <real> | Set VBW to RBW Ratio. Sets the ratio of video bandwidth to 3 dB resolution bandwidth. | Number: 0.00001 to 3000000 |
| :BAND:VID:RAT? | Query VBW to RBW Ratio. Returns the video bandwidth to resolution bandwidth ratio. | None |
| :BAND:VID:AUTO <bool> | Set VBW Auto. Turns automatic video bandwidth coupling on or off. | Text: OFF, ON, 0 or 1 |
| :BAND:VID:AUTO? | Query VBW Auto. Returns the video bandwidth auto coupling state. | None |
| Command | What it does | Arguments |
|---|---|---|
| :AVER:COUN <integer> | Set Average Count (:AVER:COUN). Sets the terminal count for average, max hold and min hold. | Number: Terminal count number N, integer |
| :AVER:COUN? | Query Average Count (:AVER:COUN?). Returns the average/hold count. | None |
| :AVER:CLE | Clear Average. Resets the average/hold count and restarts the sweeps. | None |
| Command | What it does | Arguments |
|---|---|---|
| :HCOPy:IMMediate | Print Hardcopy. Opens the print dialog, equivalent to pressing PRINT. | None |
| :HCOPy:ABORt | Abort Print. Aborts a print that is already in progress. | None |
| Command | What it does | Arguments |
|---|---|---|
| :FEED:RF:PORT <port> | Set RF Input Port. Selects the front-panel RF input port. | Text: RFIN | RFIN2 | ERFIN (N9040B family; other models list their own ports) |
| :FEED:RF:PORT? | Query RF Input Port. Returns the selected RF input port. | None |
| Command | What it does | Arguments |
|---|---|---|
| :INPut:IMPedance:REFerence <integer> | Set I/Q Reference Impedance. Sets the impedance used to convert I/Q voltage to power. | Number: ohm, 1 to 1000000 |
| :INPut:IMPedance:REFerence? | Query I/Q Reference Impedance. Returns the I/Q reference impedance. | None |
| Command | What it does | Arguments |
|---|---|---|
| :DET:FUNC <detector> | Set Detector. Selects the detector for the selected trace. | Text: NORMal, AVERage, POSitive, SAMPle, NEGative, QPEak, EAVerage or RAVerage |
| :DET:FUNC? | Query Detector. Returns the detector of the selected trace. | None |
| Command | What it does | Arguments |
|---|---|---|
| :ABORt | Abort Measurement. Stops the current sweep or measurement. | None |
| Command | What it does | Arguments |
|---|---|---|
| :SOURce:PRESet | Source Preset. Presets the source settings to their default values. | None |
| Command | What it does | Arguments |
|---|---|---|
| *RST | Reset Instrument. Aborts the current measurement and sets the default measurement with default couplings. | None |
| *IDN? | Identify Query. Returns manufacturer, model, serial number and firmware revision. | None |
| *OPC | Operation Complete. Sets the OPC bit in the Standard Event Status Register when pending operations finish. | None |
| *OPC? | Operation Complete Query. Returns 1 after all overlapped commands are complete. | None |
| *WAI | Wait to Continue. Holds off further commands until pending operations complete. | None |
| *ESR? | Standard Event Status Register Query. Queries and clears the Standard Event Status Register. | None |
| *STB? | Status Byte Query. Returns the Status Byte Register without erasing it. | None |
| *CLS | Clear Status. Clears the status byte and event registers and empties the error queue. | None |
| *SRE <integer> | Set Service Request Enable. Enables bits of the Service Request Enable Register. | Number: 0 to 255 |
| *SRE? | Query Service Request Enable. Returns the Service Request Enable Register value. | None |
| *TRG | Trigger Instrument. Triggers the instrument to take a sweep or start a measurement. | None |
| *TST? | Self Test Query. Runs internal self-test and returns 0 on pass or 1 on failure. | None |
This reference is generated from TestFlow's instrument library, which is drafted from Keysight's programming documentation for the N9042B and checked when the agent runs it. The library marks this instrument as supporting *OPC? for operation-complete synchronisation. It reads errors back with SYSTem:ERRor?. Ranges, timing, and option-dependent commands are defined by Keysight's programming manual: check it before you rely on an edge case. Last updated November 17, 2026.
Yes. The Keysight N9042B accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 386 SCPI commands for it: 193 queries that read values or state, and 193 settings and actions.
Install PyVISA and a VISA backend, find the instrument's address with ResourceManager().list_resources(), open it, then send commands with write() and read values with query(). The example on this page sends *IDN?, :SOURce:PRESet and :FETCh:HARMonics:FREQuency:ALL?.
:FETCh:HARMonics:FREQuency:ALL? (fetch harmonic frequency all). Fetches the frequencies of the first 10 harmonics in Hz. The full list of queries is in the command reference on this page, grouped by subsystem.
Yes. TestFlow is an AI agent for electronics testing: you describe the test, and it builds the automation from this command library, runs it on the Keysight N9042B through the TestFlow desktop app, and writes the report from the measured results.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.