The Tektronix DPO_4054B oscilloscope is controlled remotely with SCPI commands. TestFlow's instrument library holds 33 commands for it, 7 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 DPO_4054B on a real bench.
Describe the test; TestFlow's agent uses this command set to drive your Tektronix DPO_4054B 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 Tektronix DPO_4054B's VISA address
# Paste the address of your Tektronix DPO_4054B (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("Set?")) # Get settings
inst.close()Describe the test; TestFlow's agent uses this command set to drive your Tektronix DPO_4054B and writes the report from the measured results.
Describe the test in a sentence, for example “run on the DPO_4054B, then get settings 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.
33 commands in 12 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values.
| Command | What it does | Arguments |
|---|---|---|
| CURSor:SOUrce <Channel> | Cursor channel. Assigns cursor measurements to operate on the selected channel waveform. | Text: CH1,CH2,CH3,CH4 |
| CURSor:MODe <Mode> | Cursor mode. Sets whether cursors move independently or track together as a pair. | Text: TRACk,INDependent |
| CURSor:FUNCtion WAVEFORM | Cursers ON. Enables waveform cursor functionality for manual delta measurements. | None |
| CURSor:FUNCtion OFF | Cursers OFF. Disables all cursor measurements. | None |
| CURSor:DDT? | Cursers dV/dT. Calculates and returns the slope (ΔV/ΔT) between cursor points. | None |
| CURSor:VBArs:DELTa? | Cursor dT. Returns the time difference (ΔT) between vertical cursors. | None |
| CURSor:HBArs:DELTa? | Cursor dV. Returns the voltage difference (ΔV) between horizontal cursors. | None |
| CURSor:HBArs:POSITION<Cursor>? | Cursor voltage. Reads the absolute voltage position of a horizontal cursor. | 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 channel used for immediate measurements and typically reads the current value. | Text: CH1,CH2,CH3,CH4 |
| MEASUrement:IMMed:TYPe <Measurement> | Measurement Type. Selects which measurement algorithm (frequency, RMS, rise time, etc.) is applied. | Text: AMPlitude,RMS,PK2Pk,FREQuency,HIGH,LOW,MAXimum,MEAN,MEDian,MINImum,NDUty,PDUty,NOVershoot,NWIdth,PERIod,POVershoot,PWIdth,RISe,FALL |
| MEASUrement:IMMed:VALue? | Measure. Returns the numeric result of the currently configured immediate measurement. | None |
| MEASUrement:IMMed:DELay:EDGE1 <Edge> ; MEASUrement:IMMed:SOUrce1 <Source_1> ; MEASUrement:IMMed:SOUrce2 <Source_2> | Measure delay. Configures a propagation delay measurement between two channels using selected edge types. | 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 oscilloscope to capture exactly one acquisition sequence and then stop automatically (single-shot capture). | None |
| ACQuire:STOPAfter RUNSTop ;STATE RUN ;:DISplay:PERSistence Auto | RUN. Starts continuous waveform acquisition with display persistence set to Auto, allowing older traces to fade naturally. | None |
| ACQuire:STOPAfter RUNSTop ;STATE Stop ;:DISplay:PERSistence Auto | STOP. Stops waveform acquisition (freezes updates) while keeping persistence behavior configured as Auto. | None |
| ACQuire:STOPAfter RUNSTop ;STATE Stop ;:DISplay:PERSistence INFInite | INFInite. Stops acquisition and enables infinite persistence, accumulating all past waveforms without fading. | None |
| Command | What it does | Arguments |
|---|---|---|
| <Channel>:LABel <Text> | Chan label. Assigns a custom text label to the selected analog channel for identification in the UI and screenshots. | Text: CH1,CH2,CH3,CH4; Text |
| <Channel>:POSition <Position> | Channel position. Adjusts the vertical position of the channel waveform on the display. | Text: CH1,CH2,CH3,CH4; Number |
| <Channel>:SCALE <Scale> | Channel scale. Sets the channel’s vertical scale (Volts/div), controlling 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. Defines whether the trigger occurs on a rising edge, falling edge, or either. | Text: RISe,FALL,EITHer |
| TRIGger:A:EDGE:COUPling <Coupling> | Trigger coupling. Applies filtering to the trigger signal to reduce noise or reject high/low-frequency components. | Text: DC,HFRej,LFRej,NOISErej |
| TRIGger:A:LEVel:<Channel> <Volt> | Trigger level. Sets the voltage threshold at which the trigger fires for the specified channel. | Text: CH1,CH2,CH3,CH4; Number |
| Command | What it does | Arguments |
|---|---|---|
| HORIZONTAL:POSITION <Position> | Time position. Shifts the waveform left or right in time relative to the trigger point (pre/post-trigger view). | Number |
| HORIZONTAL:SCALE <Scale> | Time scale. Sets the horizontal timebase (Seconds/div), zooming in or out in time. | Number |
| Command | What it does | Arguments |
|---|---|---|
| SELect:<Channel> ON | Show channel. Makes the selected channel waveform visible on the display. | Text: CH1,CH2,CH3,CH4 |
| SELect:<Channel> OFF | Hide channel. Hides the selected channel waveform from the display without disabling the input. | Text: CH1,CH2,CH3,CH4 |
| 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 ; SAVe:IMAGe "imgx.png" ; wait(100) ; FILESYSTEM:DELETE "imgx.png" | Capture. Captures a PNG screenshot of the display | None |
| Command | What it does | Arguments |
|---|---|---|
| Set? | Get settings. Queries the oscilloscope for its current setup/state, useful for logging or restoring configuration. | None |
| 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 DPO_4054B 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 12, 2026.
Yes. The Tektronix DPO_4054B accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 33 SCPI commands for it: 7 queries that read values or state, and 26 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 Set?.
Set? (get settings). Queries the oscilloscope for its current setup/state, useful for logging or restoring configuration. 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 DPO_4054B 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.