The Tektronix MDO34 oscilloscope is controlled remotely with SCPI commands. TestFlow's instrument library holds 66 commands for it, 19 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 MDO34 on a real bench.
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 Tektronix MDO34's VISA address
# Paste the address of your Tektronix MDO34 (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("ACQuire:STOPAfter RUNSTop ;STATE RUN ;:DISplay:PERSistence Auto") # RUN
print(inst.query("RF:MEASUre:ACPR:LA1DB?")) # RF Cent2 low Side1
inst.close()Describe the test in a sentence, for example “run on the MDO34, then rf cent2 low side1 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.
66 commands in 14 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values.
| Command | What it does | Arguments |
|---|---|---|
| RF:CLIPPing? | RF:CLIPPing. Queries whether the RF input/measurement is clipping/overloading (signal level too high for valid measurement). | None |
| RF:DETECTionmethod:MODe <AUTO,MANual> | RF detect mode. Sets RF detector selection to automatic or manual (who chooses detector behavior: scope or user). | Text: AUTO,MANual |
| RF:DETECTionmethod:RF_<> <> | RF Timeout. Selects RF detection/trace behavior (e.g., normal/average/max hold/min hold) and detector type (sample/average/peak). | Text: AVErage,MAXHold,MINHold,NORMal; Text: PLUSpeak,MINUSpeak,SAMple,AVErage |
| RF:FREQuency <Frequency_center> | RF freq center. Sets the RF analysis center frequency. | Number |
| RF:POSition <RF_position> | RF position. Adjusts vertical display position/offset of the RF trace on the screen. | Number: 10,9,8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10 |
| RF:REFLevel <RF_level> | RF Level. Sets RF reference level to AUTO (instrument automatically scales reference level). | Text: AUTO |
| RF:LABel "<RF_label>" | RF Label. Adds/sets a custom label for the RF measurement/trace display. | Text |
| RF:MEASUre:ACPR:ADJACENTPAIRs <Pairs> | RF ADJ Pairs. Sets how many adjacent channel pairs are used in ACPR measurement (1st, 2nd, 3rd adjacents). | Text: 1,2,3 |
| RF:MEASUre:ACPR:CHANBW <Bandwidth> | RF bandwidth. Sets the channel bandwidth used for ACPR measurement integration. | Number |
| RF:MEASUre:ACPR:CHANSPACing <Center to Center spacing> | RF spacing. Sets center-to-center channel spacing for ACPR (defines adjacent channel offsets). | Number |
| RF:MEASUre:ACPR:LA1DB? | RF Cent2 low Side1. Queries ACPR result for lower adjacent channel 1 relative to carrier (in dB). | None |
| RF:MEASUre:ACPR:LA2DB? | RF Cent2 low Side2. Queries ACPR result for lower adjacent channel 2 (in dB). | None |
| RF:MEASUre:ACPR:LA3DB? | RF Cent2 low Side3. Queries ACPR result for lower adjacent channel 3 (in dB). | None |
| RF:MEASUre:ACPR:UA1DB? | RF Cent2 Up Side1. Queries ACPR result for upper adjacent channel 1 (in dB). | None |
| RF:MEASUre:ACPR:UA2DB? | RF Cent2 Up Side2. Queries ACPR result for upper adjacent channel 2 (in dB). | None |
| RF:MEASUre:ACPR:UA3DB? | RF Cent2 Up Side2. Queries ACPR result for upper adjacent channel 3 (in dB). | None |
| RF:MEASUre:TYPe <Measure_type> | RF measure type. Selects which RF measurement application is active: Channel Power (CP), ACPR, or Occupied BW (OBW). | Text: NONe,CP,ACPR,OBW |
| RF:MEASUre:<Mode>:POWer? | RF measure power. Reads the measured power result for the selected RF measurement mode. | Text: CP,ACPR,OBW |
| RF:MEASUre:<Mode>:CHANBW? | RF measure BW. Reads the configured/measured channel bandwidth parameter for the selected RF mode. | Text: CP,ACPR,OBW |
| RF:MEASUre:OBW:LOWERFreq? | RF measure Low Freq. Queries the lower frequency edge of occupied bandwidth measurement. | None |
| RF:MEASUre:OBW:UPPERFreq? | RF measure Up Freq. Queries the upper frequency edge of occupied bandwidth measurement. | None |
| RF:PRObe:AUTOZero EXECute | RF AUTO Zero. Performs RF probe auto-zero calibration to reduce offset and measurement error. | None |
| RF:PRObe:DEGAUss EXECute | RF Probe Degauss. Runs RF probe degauss cycle (reduces hysteresis/magnetization effects in the probe). | None |
| RF:PRObe:PREAmp:MODe <BYPass,AUTO> | RF Probe mode. Sets RF probe preamp mode: bypass preamp or automatically control it. | Text: BYPass,AUTO |
| RF:REFLevel <Level> | RF Ref Level. Sets the RF reference level (here using AUTO so instrument scales for best dynamic range). | Text: AUTO |
| RF:SCAle <Scale> | RF Scale. Sets RF display amplitude scale (e.g., dB/div depending on units/mode). | Number |
| RF:SPAN <SPAN> | RF SPAN. Sets the frequency span around center frequency for RF analysis. | Number |
| RF:STARt <Start_frequency> | RF Start Freq. Sets the start frequency for the RF spectrum/analysis view. | Number |
| RF:STOP <Stop_frequency> | RF Stop Freq. Sets the stop frequency for the RF spectrum/analysis view. | Number |
| RF:UNIts <Units> | RF Units. Sets RF amplitude units (power, voltage-referenced dB, or current-referenced dB). | Text: DBM,DBUW,DBMV,DBUV,DBMA,DBUA |
| RF:WINdow <Window> | RF Window. Selects FFT/windowing function to control spectral leakage vs amplitude accuracy. | Text: RECTangular,HAMming,HANning,BLAckmanharris,KAIser,FLATtop |
| Command | What it does | Arguments |
|---|---|---|
| CURSor:SOUrce <Channel> | Cursor channel. Assigns cursor measurements to operate on a specific channel waveform. | Text: CH1,CH2,CH3,CH4 |
| CURSor:MODe <Mode> | Cursor mode. Sets whether cursors move independently or as a coupled pair (dependent tracking). | Text: TRACk,INDependent |
| CURSor:FUNCtion WAVEFORM | Cursers ON. Enables waveform cursors mode so delta time/voltage can be read using cursor functions. | None |
| CURSor:FUNCtion OFF | Cursers OFF. Disables cursor functionality (no cursor readouts active). | None |
| CURSor:DDT? | Cursers dV/dT. Returns the computed slope (ΔV/ΔT) based on current cursor positions. | None |
| CURSor:VBArs:DELTa? | Cursor dT. Returns time delta (ΔT) between vertical bar cursors (timing cursors). | None |
| CURSor:HBArs:DELTa? | Cursor dV. Returns voltage delta (ΔV) between horizontal bar cursors (amplitude cursors). | None |
| CURSor:HBArs:POSITION<Position>? | Cursor voltage. Reads the current voltage position of a specified horizontal cursor bar. | Number: 1,2 |
| Command | What it does | Arguments |
|---|---|---|
| MEASUrement:IMMed:SOUrce <Channel> ; MEASUrement:IMMed:TYPe <Measurement> ; MEASUrement:IMMed:VALue? | Measurement. Configures the immediate measurement (source + type) and then queries the current numeric result. | Text: CH1,CH2,CH3,CH4; Text: AMPlitude,RMS,PK2Pk,FREQuency,HIGH,LOW,MAXimum,MEAN,MEDian,MINImum,NDUty,PDUty,NOVershoot,NWIdth,PERIod,POVershoot,PWIdth,RISe,FALL |
| MEASUrement:IMMed:SOUrce <Channel> ; MEASUrement:IMMed:VALue? | Measurement Channel. Sets the measurement source channel (and often immediately reads the current value based on the already-selected measurement type). | Text: CH1,CH2,CH3,CH4 |
| MEASUrement:IMMed:TYPe <Measurement> | Measurement Type. Selects what measurement algorithm to compute for the “immediate measurement” engine. | Text: AMPlitude,RMS,PK2Pk,FREQuency,HIGH,LOW,MAXimum,MEAN,MEDian,MINImum,NDUty,PDUty,NOVershoot,NWIdth,PERIod,POVershoot,PWIdth,RISe,FALL |
| MEASUrement:IMMed:VALue? | Measure. Reads the numeric value of the currently configured immediate measurement (source + type). | None |
| MEASUrement:IMMed:DELay:EDGE1 <Edge> ; MEASUrement:IMMed:SOUrce1 <Source_1> ; MEASUrement:IMMed:SOUrce2 <Source_2> ; MEASUrement:IMMed:DELay:EDGE2 <Edge> | Measure delay. Configures a delay measurement between Source1 and Source2 using specified edge direction (rise/fall). | Text: FALL,RISe; Text: CH1,CH2,CH3,CH4; Text: CH1,CH2,CH3,CH4 |
| Command | What it does | Arguments |
|---|---|---|
| ACQuire:STOPAfter SEQuence ;STATE RUN | Single seq. Arms the scope to acquire one sequence and then stop automatically (single-shot capture). | None |
| ACQuire:STOPAfter RUNSTop ;STATE RUN ;:DISplay:PERSistence Auto | RUN. Starts continuous acquisition and sets display persistence to Auto so older traces fade automatically. | None |
| ACQuire:STOPAfter RUNSTop ;STATE Stop ;:DISplay:PERSistence Auto | STOP. Stops acquisition (freezes waveform updates) while keeping persistence mode configured as Auto. | None |
| ACQuire:STOPAfter RUNSTop ;STATE Stop ;:DISplay:PERSistence INFInite | INFInite. Stops acquisition and sets Infinite persistence (accumulates traces without fading). | None |
| Command | What it does | Arguments |
|---|---|---|
| <Channel>:LABel "<Text>" | Chan label. Sets a custom label string for the selected analog channel (shown on UI and screenshots). | Text: CH1,CH2,CH3,CH4; Text |
| <Channel>:POSition <Position> | Channel position. Moves the channel waveform vertically (display offset in divisions). | Text: CH1,CH2,CH3,CH4; Number: 5,4,3,2,1,0,-1,-2,-3,-4,-5 |
| <Channel>:SCALE <Scale> | Channel scale. Sets the channel vertical scale (Volts/div), changing waveform amplitude scaling. | Text: CH1,CH2,CH3,CH4; Number |
| <Output Variable>=<Equation> | Math. Variable equals an equation like (${Var_name}= ${Var_name}/2) | Number; Text |
| Command | What it does | Arguments |
|---|---|---|
| TRIGger:A:EDGE:SLOpe <Slope> | Trigget slope. Chooses the edge direction that triggers (rising, falling, or either). | Text: RISe,FALL,EITHer |
| TRIGger:A:EDGE:COUPling <Coupling> | Trigger coupling. Sets trigger coupling/filtering to reduce false triggers (AC coupling, HF/LF reject, noise reject). | Text: DC,AC,HFRej,LFRej,NOISErej |
| TRIGger:A:LEVel:<Channel> <Volt> | Trigger level. Sets the trigger threshold voltage for the chosen trigger channel. | Text: CH1,CH2,CH3,CH4; Number |
| Command | What it does | Arguments |
|---|---|---|
| SELect:<Channel> ON | Show channel. Turns ON display of the selected channel waveform. | Text: CH1,CH2,CH3,CH4 |
| SELect:<Channel> OFF | Hide channel. Turns OFF display of the selected channel waveform (channel still exists but is hidden). | Text: CH1,CH2,CH3,CH4 |
| SELect:RF_<Mode> <ON/OFF> | RF Display. Enables/disables RF display trace for a specific detector/trace mode (avg/maxhold/minhold/normal). | Text: AVErage,MAXHold,MINHold,NORMal; Text: ON,OFF |
| Command | What it does | Arguments |
|---|---|---|
| HORIZONTAL:POSITION <Position> | Time position. Shifts the waveform horizontally relative to the trigger position (pre/post-trigger view). | Number |
| HORIZONTAL:SCALE <Scale> | Time scale. Sets the timebase scale (Seconds/div), zooming in/out in time. | Number |
| Command | What it does | Arguments |
|---|---|---|
| TRIGGER:A:EDGE:SOURCE <Channel> | Trigger channel. Selects which analog channel is used as the edge trigger source. | Text: CH1,CH2,CH3,CH4 |
| Command | What it does | Arguments |
|---|---|---|
| Hardcopy:Layout Landscape ; SAVe:IMAGe:INKSaver ON ; SAVe:IMAGe:FILEFormat PNG | Capture. Takes a PNG screenshot, saves it temporarily, waits for file creation, reads the PNG back to the controller, then deletes the temp file. | None |
| Command | What it does | Arguments |
|---|---|---|
| Set? | Get settings. Queries the instrument for its current setup / configuration string (used to restore or log state). | None |
| Command | What it does | Arguments |
|---|---|---|
| ROSc:SOUrce <Source> | Oscilator source. Selects reference oscillator source: internal timebase or external reference input for better frequency accuracy/locking. | Text: INTERnal,EXTernal |
| Command | What it does | Arguments |
|---|---|---|
| wait(<ms>) | Wait. Waits for number of milliseconds | Number |
| Command | What it does | Arguments |
|---|---|---|
| save2var <Variable_name> | Save2Variable. Saves last mearurment to a variable | Text |
This reference is generated from TestFlow's instrument library, which is drafted from Tektronix's programming documentation for the MDO34 and checked when the agent runs it. Ranges, timing, and option-dependent commands are defined by Tektronix's programming manual: check it before you rely on an edge case. Last updated November 17, 2026.
Yes. The Tektronix MDO34 accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 66 SCPI commands for it: 19 queries that read values or state, and 47 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?, ACQuire:STOPAfter RUNSTop ;STATE RUN ;:DISplay:PERSistence Auto and RF:MEASUre:ACPR:LA1DB?.
RF:MEASUre:ACPR:LA1DB? (rf cent2 low side1). Queries ACPR result for lower adjacent channel 1 relative to carrier (in dB). 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 Tektronix MDO34 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.