The Keysight UXR0051AP, UXR0104A, UXR0134A, UXR0164A, UXR0204A, UXR0252AP, UXR0254A, UXR0254AP, UXR0334A, UXR0402A, UXR0402AP, UXR0404A, UXR0404AP, UXR0502A, UXR0504A, UXR0592A, UXR0592AP, UXR0594A, UXR0594AP, UXR0702A, UXR0702AP, UXR0704A, UXR0704AP, UXR0802A, UXR0804A, UXR1002A, UXR1004A, UXR1102A, and UXR1104A oscilloscope is controlled remotely with SCPI commands. TestFlow's instrument library holds 149 commands for it, 60 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 UXR0051AP on a real bench.
Commands
149
Queries
60
Subsystems
24
Models covered
29
Run this on your bench
Describe the test; TestFlow's agent uses this command set to drive your Keysight UXR0051AP, UXR0104A, UXR0134A, UXR0164A, UXR0204A, UXR0252AP, UXR0254A, UXR0254AP, UXR0334A, UXR0402A, UXR0402AP, UXR0404A, UXR0404AP, UXR0502A, UXR0504A, UXR0592A, UXR0592AP, UXR0594A, UXR0594AP, UXR0702A, UXR0702AP, UXR0704A, UXR0704AP, UXR0802A, UXR0804A, UXR1002A, UXR1004A, UXR1102A, or UXR1104A 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 UXR0051AP's VISA address
# Paste the address of your Keysight UXR0051AP (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(":AUToscale") # Auto Scale
print(inst.query(":MEASure:RESults?")) # Get Measure Results
inst.close()
Run this on your bench
Describe the test; TestFlow's agent uses this command set to drive your Keysight UXR0051AP, UXR0104A, UXR0134A, UXR0164A, UXR0204A, UXR0252AP, UXR0254A, UXR0254AP, UXR0334A, UXR0402A, UXR0402AP, UXR0404A, UXR0404AP, UXR0502A, UXR0504A, UXR0592A, UXR0592AP, UXR0594A, UXR0594AP, UXR0702A, UXR0702AP, UXR0704A, UXR0704AP, UXR0802A, UXR0804A, UXR1002A, UXR1004A, UXR1102A, or UXR1104A and writes the report from the measured results.
Describe the test in a sentence, for example “auto scale on the UXR0051AP, then get measure results 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.
149 commands in 24 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values. The UXR0051AP, UXR0104A, UXR0134A, UXR0164A, UXR0204A, UXR0252AP, UXR0254A, UXR0254AP, UXR0334A, UXR0402A, UXR0402AP, UXR0404A, UXR0404AP, UXR0502A, UXR0504A, UXR0592A, UXR0592AP, UXR0594A, UXR0594AP, UXR0702A, UXR0702AP, UXR0704A, UXR0704AP, UXR0802A, UXR0804A, UXR1002A, UXR1004A, UXR1102A, and UXR1104A share this command set in TestFlow's library.
Measurement (MEASure) (27)
Command
What it does
Arguments
:MEASure:SOURce <Source>
Measure Source. Selects the source used by subsequent measurement commands.
Text: CHANnel1
:MEASure:SOURce?
Get Measure Source. Queries the source currently selected for measurements.
None
:MEASure:VPP? <Source>
Measure Vpp. Measures the peak-to-peak voltage of the selected source.
Text: CHANnel1
:MEASure:VMAX? <Source>
Measure Vmax. Measures the maximum voltage of the selected source.
Text: CHANnel1
:MEASure:VMIN? <Source>
Measure Vmin. Measures the minimum voltage of the selected source.
Text: CHANnel1
:MEASure:VAMPlitude? <Source>
Measure Vamplitude. Measures the amplitude (top minus base) of the selected source.
Text: CHANnel1
:MEASure:VTOP? <Source>
Measure Vtop. Measures the top (logic high) voltage level of the selected source.
Text: CHANnel1
:MEASure:VBASe? <Source>
Measure Vbase. Measures the base (logic low) voltage level of the selected source.
Text: CHANnel1
:MEASure:VMIDdle? <Source>
Measure Vmiddle. Measures the middle voltage level (midpoint of top and base) of the selected source.
Text: CHANnel1
:MEASure:VAVerage? <Interval>,<Source>
Measure Vaverage. Measures the average voltage of the selected source.
Text: CYCLe,DISPlay; Text: CHANnel1
:MEASure:FREQuency? <Source>
Measure Frequency. Measures the frequency in hertz of the first complete cycle on screen.
Text: CHANnel1
:MEASure:PERiod? <Source>
Measure Period. Measures the period in seconds of the first complete cycle on screen.
Text: CHANnel1
:MEASure:PWIDth? <Source>
Measure Pos Width. Measures the width in seconds of the first positive pulse on screen.
Text: CHANnel1
:MEASure:NWIDth? <Source>
Measure Neg Width. Measures the width in seconds of the first negative pulse on screen.
Text: CHANnel1
:MEASure:DUTYcycle? <Source>
Measure Duty Cycle. Measures the duty cycle of the first complete cycle as a percentage.
Text: CHANnel1
:MEASure:RISetime? <Source>
Measure Rise Time. Measures the rise time in seconds of the first rising edge on screen.
Text: CHANnel1
:MEASure:FALLtime? <Source>
Measure Fall Time. Measures the fall time in seconds of the first falling edge on screen.
Text: CHANnel1
:MEASure:OVERshoot? <Source>
Measure Overshoot. Measures the overshoot of the first edge on screen as a percentage.
Text: CHANnel1
:MEASure:PREShoot? <Source>
Measure Preshoot. Measures the preshoot of the first edge on screen as a percentage.
Text: CHANnel1
:MEASure:VRMS? <Interval>,<Type>,<Source>
Measure Vrms. Measures the AC or DC RMS voltage over one cycle or over the whole display.
Text: CYCLe,DISPlay; Text: AC,DC; Text: CHANnel1
:MEASure:PHASe? <Source_1>,<Source_2>
Measure Phase. Measures the phase shift in degrees between the two specified sources.
Text: CHANnel1; Text: CHANnel1
:MEASure:DELTatime? <Source_1>,<Source_2>
Measure Delta Time. Measures the delta time in seconds between the selected edges of the two specified sources.
Text: CHANnel1; Text: CHANnel1
:MEASure:RESults?
Get Measure Results. Returns the results of the continuously displayed measurements as a comma-separated list.
None
:MEASure:STATistics <Type>
Statistics Type. Selects which statistics the measurement results query returns.
Header Off. Turns off command headers in query responses so replies contain the value only.
None
:SYSTem:HEADer ON
Header On. Turns on command headers in query responses.
None
:SYSTem:ERRor?
Get Error. Reads and clears the next entry in the error queue.
None
:SYSTem:DSP "<Message>"
Display Message. Writes a quoted text message to the oscilloscope display.
Text
:SYSTem:LOCK ON
Key Lock On. Locks the front panel so the oscilloscope can only be controlled remotely.
None
:SYSTem:LOCK OFF
Key Lock Off. Unlocks the front panel keys and knobs.
None
:SYSTem:LONGform ON
Long Form On. Returns query response headers and alpha arguments in their long form.
None
:SYSTem:LONGform OFF
Long Form Off. Returns query response headers and alpha arguments in their abbreviated short form.
None
:SYSTem:SETup?
Get Setup. Reads the complete oscilloscope setup back as a binary block for later restore.
None
Timebase (TIMebase) (8)
Command
What it does
Arguments
:TIMebase:SCALe <Scale>
Timebase Scale. Sets the main timebase in seconds per division.
Number
:TIMebase:SCALe?
Get Timebase Scale. Queries the main timebase in seconds per division.
None
:TIMebase:RANGe <Range>
Timebase Range. Sets the full-scale horizontal time in seconds for 10 divisions.
Number
:TIMebase:POSition <Position>
Timebase Position. Sets the time in seconds between the trigger event and the horizontal reference point.
Number
:TIMebase:POSition?
Get Timebase Position. Queries the horizontal position of the trigger event relative to the reference point.
None
:TIMebase:REFerence <Reference>
Timebase Reference. Sets the horizontal reference point on the screen.
Text: LEFT,CENTer,RIGHt
:TIMebase:WINDow:SCALe <Scale>
Zoom Scale. Sets the zoomed (delayed) window timebase in seconds per division.
Number
:TIMebase:WINDow:POSition <Position>
Zoom Position. Sets the horizontal position in the zoomed window relative to the trigger event.
Number
Display (DISPlay) (5)
Command
What it does
Arguments
:DISPlay:PERSistence MINimum
Persistence Minimum. Sets waveform persistence to minimum so old acquisitions are erased immediately.
None
:DISPlay:PERSistence INFinite
Persistence Infinite. Sets infinite persistence so acquisitions accumulate on screen without fading.
None
:DISPlay:PERSistence <Seconds>
Persistence Time. Sets variable persistence in seconds (100 ms to 200 s).
Number
:DISPlay:CGRade ON
Color Grade On. Turns on the colour grade (density) display of the waveform.
None
:DISPlay:CGRade OFF
Color Grade Off. Turns off the colour grade display of the waveform.
None
Other subsystem (2)
Command
What it does
Arguments
[PNG:DISPlay:DATA? PNG,SCReen,OFF]
Capture. Reads an uncompressed PNG screenshot of the current display back to the controller.
None
<Output Variable>=<Equation>
Math. Variable equals an equation like (${Var_name}= ${Var_name}/2)
Number; Text
DISK subsystem (2)
Command
What it does
Arguments
:DISK:SAVE:IMAGe "<Filename>",PNG
Save Screen Image. Saves a PNG screen image to the specified file on the oscilloscope disk.
Text
:DISK:SAVE:WAVeform <Source>,"<Filename>",CSV
Save Waveform File. Saves the specified waveform to a CSV file on the oscilloscope disk.
Text: CHANnel1; Text
Auto setup (1)
Command
What it does
Arguments
:AUToscale
Auto Scale. Evaluates all input signals and sets the correct vertical, horizontal and trigger settings to display the signals.
None
Run control (1)
Command
What it does
Arguments
:RUN
Run. Starts repetitive acquisitions (same as pressing Run on the front panel).
None
Run control (1)
Command
What it does
Arguments
:STOP
Stop. Stops the acquisition system and freezes the last acquired waveform on screen.
None
Run control (1)
Command
What it does
Arguments
:SINGle
Single Trigger. Arms the oscilloscope for a single acquisition and stops after the trigger occurs.
None
DIG subsystem (1)
Command
What it does
Arguments
:DIGitize
Digitize. Acquires the specified channels according to the current settings and stops the acquisition.
None
CDIS subsystem (1)
Command
What it does
Arguments
:CDISplay
Clear Display. Clears the display and resets all associated measurements.
None
AST subsystem (1)
Command
What it does
Arguments
:ASTate?
Get Acquisition State. Returns the acquisition state (ARM, TRIG, ATRIG or ADONE).
None
RST subsystem (1)
Command
What it does
Arguments
:RSTate?
Get Run State. Returns the run state of the oscilloscope (RUN, STOP or SING).
None
VIEW subsystem (1)
Command
What it does
Arguments
:VIEW <Source>
Show Channel. Turns on the display of the specified waveform source.
Text: CHANnel1
BLAN subsystem (1)
Command
What it does
Arguments
:BLANk <Source>
Hide Channel. Turns off the display of the specified waveform source.
Text: CHANnel1
WAIT subsystem (1)
Command
What it does
Arguments
wait(<ms>)
Wait. Waits for number of milliseconds
Number
SAVE subsystem (1)
Command
What it does
Arguments
save2var <Variable_name>
Save2Variable. Saves last measurement to a variable
Text
IEEE 488.2 common commands (12)
Command
What it does
Arguments
*IDN?
Identify. Returns the instrument identification string (manufacturer, model, serial number, firmware version).
None
*RST
Reset. Restores the oscilloscope to its factory default state.
None
*CLS
Clear Status. Clears all event registers and the error queue.
None
*TST?
Self Test. Runs the internal self-test and returns 0 for pass or a non-zero code for failure.
None
*OPC?
Operation Complete. Returns 1 when all pending operations are complete.
None
*WAI
Wait To Continue. Waits until all pending operations are complete before executing the next command.
None
*TRG
Trigger Bus. Generates a bus trigger, equivalent to sending the :DIGitize command.
None
*ESR?
Get Event Status. Reads and clears the standard event status register.
None
*STB?
Get Status Byte. Reads the status byte register.
None
*OPT?
Get Options. Returns a comma-separated list of the licences and options installed in the oscilloscope.
None
*SAV <Register>
Save Setup. Stores the current oscilloscope setup in the specified save/recall register.
Number
*RCL <Register>
Recall Setup. Recalls a previously stored oscilloscope setup from the specified register.
Number
Where these commands come from
This reference is generated from TestFlow's instrument library, which is drafted from Keysight's programming documentation for the UXR0051AP, UXR0104A, UXR0134A, UXR0164A, UXR0204A, UXR0252AP, UXR0254A, UXR0254AP, UXR0334A, UXR0402A, UXR0402AP, UXR0404A, UXR0404AP, UXR0502A, UXR0504A, UXR0592A, UXR0592AP, UXR0594A, UXR0594AP, UXR0702A, UXR0702AP, UXR0704A, UXR0704AP, UXR0802A, UXR0804A, UXR1002A, UXR1004A, UXR1102A, and UXR1104A and checked when the agent runs it. 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.
Frequently asked questions
Does the Keysight UXR0051AP support SCPI remote control?
Yes. The Keysight UXR0051AP accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 149 SCPI commands for it: 60 queries that read values or state, and 89 settings and actions.
How do I control the Keysight UXR0051AP from Python?
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?, :AUToscale and :MEASure:RESults?.
Which command reads a value from the Keysight UXR0051AP?
:MEASure:RESults? (get measure results). Returns the results of the continuously displayed measurements as a comma-separated list. The full list of queries is in the command reference on this page, grouped by subsystem.
Can I automate the Keysight UXR0051AP without writing code?
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 UXR0051AP through the TestFlow desktop app, and writes the report from the measured results.
Your next test, automated today
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.