Oscilloscope · SCPI command reference

Tektronix MSO22 and MSO24 SCPI commands

The Tektronix MSO22 and MSO24 oscilloscope is controlled remotely with SCPI commands. TestFlow's instrument library holds 71 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 MSO22 on a real bench.

Commands
71
Queries
7
Subsystems
16
Models covered
2

Run this on your bench

Describe the test; TestFlow's agent uses this command set to drive your Tektronix MSO22 or MSO24 and writes the report from the measured results.

Get started

Control the Tektronix MSO22 from Python

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 MSO22's VISA address

# Paste the address of your Tektronix MSO22 (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()

Run this on your bench

Describe the test; TestFlow's agent uses this command set to drive your Tektronix MSO22 or MSO24 and writes the report from the measured results.

Get started

Run a MSO22 test without writing code

Describe the test in a sentence, for example “run on the MSO22, 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.

Get started

SCPI command reference

71 commands in 16 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values. The MSO22 and MSO24 share this command set in TestFlow's library.

AFG subsystem (17)

CommandWhat it doesArguments
AFG:AMPLitude <Voltage>AFG Amplitude. Sets output amplitude of the arbitrary function generator.Number
AFG:ARBitrary:SOUrce <Source_path>AFG source. Loads an arbitrary waveform file.Text
AFG:BURSt:CCOUnt <Cycles_count>AFG cycles count. Defines number of cycles for burst mode.Number
AFG:BURSt:TRIGgerAFG burst. Triggers a burst waveform output.None
AFG:FUNCtion <Function>AFG function. Selects waveform shape generated by AFG.Text: SINE,SQUare,PULSe,RAMP,NOISe,DC,SINC,GAUSsian,LORENtz,ERISe,EDECAy,HAVERSINe,CARDIac,ARBitrary
AFG:FREQuency <Frequency>AFG frequency. Sets output frequency.Number
AFG:HIGHLevel <Voltage>AFG High LVL. Sets waveform high voltage level.Number
AFG:LOWLevel <Voltage>AFG Low LVL. Sets waveform low voltage level.Number
AFG:NOISEAdd:PERCent <Percentage> ; AFG:NOISEAdd:STATE ONAFG Noise. Injects controlled noise into output signal.Number
AFG:NOISEAdd:STATE OFFAFG Noise off. Disables noise injection.None
AFG:OFFSet <Offset>AFG offset. Applies DC offset to waveform.Number
AFG:OUTPut:MODe <Cont/Burst>AFG mode. Selects output operating mode.Text: CONTinuous,BURSt,OFF
AFG:OUTPut:STATE ONAFG turn On. Enables AFG output.None
AFG:OUTPut:STATE OFFAFG turn Off. Disables AFG output.None
AFG:PERIod <Seconds>AFG period. Sets waveform period directly.Number
AFG:PULse:WIDth <Width>AFG width. Sets pulse width for pulse waveforms.Number
AFG:RAMP:SYMmetry <Percentage>AFG symetry. Controls ramp waveform symmetry.Number: 10,20,30,40,50,60,70,80,90

Trigger (TRIGger) (7)

CommandWhat it doesArguments
TRIGger:A:EDGE:SLOpe <Slope>Trigget slope. Defines whether triggering occurs on rising, falling, or either edge.Text: RISe,FALL,EITHer
TRIGger:A:EDGE:COUPling <Coupling>Trigger coupling. Filters the trigger signal to improve trigger stability.Text: DC,HFRej,LFRej,NOISErej
TRIGger:A:LEVel:<Channel> <Volt>Trigger level. Sets the voltage threshold at which the trigger fires.Text: CH1,CH2; Number
TRIGger:A:TYPe LOGIc ; TRIGger:A:LOGIc:FUNCtion <Condition>D trigger condition. Defines the logical relationship between trigger inputs.Text: AND,OR,NANd,NOR
TRIGger:A:LOGIc:POLarity <Polarity>D trigger polarity. Sets active logic level for digital trigger.Text: POSitive,NEGative,EITher
TRIGger:A:MODe <Mode>D trigger mode. Selects trigger behavior when no valid event occurs.Text: NORMal,AUTO
TRIGger:A:LOGICPattern:DCH<Digital Channel>_D<Bit> <State>D trigger pattern. Defines a bit-level pattern required for triggering.Text: 1; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text: HIGH,LOW,X

DIS subsystem (7)

CommandWhat it doesArguments
DISplay:WAVEView1:CURSor:CURSOR1:MODe <Mode>Cursor mode. Sets whether cursors move independently or track each other.Text: INDEPENDENT,TRACK
DISplay:WAVEView1:CURSor:CURSOR1:VBArs:DELTa?Cursor dT. Returns time difference between vertical cursors.None
DISplay:GLObal:DCH<Digital Channel>:STATE <State>D channel display. Enables or disables the entire digital channel group.Text: 1; Text: ON,OFF
DISplay:WAVEView<WAVEView>:DCH<Digital Channel>_D<Bit>:STATE ONWaveView display. Shows a digital bit in a specific WaveView pane.Text: 1; Text: 1; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
DISplay:WAVEView<WAVEView>:DCH<Digital Channel>_D<Bit>:STATE OFFWaveView Hide. Hides a digital bit from a WaveView pane.Text: 1; Text: 1; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
DISplay:WAVEView<WAVEView>:DCH<Digital Channel>_DALL:DIGORDER "<Order>"WaveView order. Defines the visual ordering of digital bits.Text: 1; Text: 1; Text: fedcba9876543210,0123456789abcdef
DISplay:WAVEView<WAVEView>:DCH<Digital Channel>_DALL:VERTical:POSition <Vertical_position>D Vertical position. Adjusts vertical placement of digital waveforms.Text: 1; Text: 1; Text: 5,4,3,2,1,0,-1,-2,-3,-4,-5

CURS subsystem (6)

CommandWhat it doesArguments
CURSor:SOUrce <Channel>Cursor channel. Assigns cursors to operate on a specific channel waveform.Text: CH1,CH2,CH3,CH4
CURSor:FUNCtion WAVEFORMCursers ON. Enables waveform cursors for manual measurement.None
CURSor:FUNCtion OFFCursers OFF. Disables all cursors.None
CURSor:DDT?Cursers dV/dT. Returns slope (dV/dT) between cursor points.None
CURSor:HBArs:DELTa?Cursor dV. Returns voltage difference between horizontal cursors.None
CURSor:HBArs:POSITION<Position>?Cursor voltage. Reads the voltage position of a horizontal cursor.None

DCH subsystem (6)

CommandWhat it doesArguments
DCH<Digital Channel>_D<Bit>:THReshold <Threshold>Digital Threshold. Sets the logic threshold voltage for a digital input bit.Text: 1; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Number
DCH<Digital Channel>_D<Bit>:LABel:COLor <Color>Digital label color. Changes the color of a digital channel label.Text: 1; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text
DCH1_D<Bit>:LABel:FONT:<Font> <State>Digital label font. Sets digital label font style (bold/italic).Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text: BOLD,ITALic,UNDERline; Text: ON,OFF
DCH<Digital Channel>_D<Bit>:LABel:FONT:SIZE <Size>Digital font size. Adjusts font size of the digital label.Text: 1; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Number
DCH<Digital Channel>_D<Bit>:LABel:FONT:TYPE "<FontName>"Digital font type. Selects the font family used for digital labels.Text: 1; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text: Arial,Helvetica,Courier,Courier New,Times New Roman
DCH<Digital Channel>_D<Bit>:LABel:NAMe "<Label>"Digital label name. Assigns a custom name to a digital signal.Text: 1; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text

MEASU subsystem (5)

CommandWhat it doesArguments
MEASUrement:IMMed:SOUrce <Channel> ; MEASUrement:IMMed:TYPe <Measurement> ; MEASUrement:IMMed:VALue?Measurement. Configures a measurement source and type, then queries its numeric result.Text: CH1,CH2; Text: AMPLITUDE,BASE,FALLTIME,FREQUENCY,MAXIMUM,MEAN,MINIMUM,NDUTY,NOVERSHOOT,NWIDTH,PDUTY,PERIOD,PK2Pk,POVERSHOOT,PWIDTH,RISETIME,RMS,TOP
MEASUrement:IMMed:SOUrce <Channel> ; MEASUrement:IMMed:VALue?Measurement Channel. Sets which channel the immediate measurement operates on.Text: CH1,CH2,CH3,CH4
MEASUrement:IMMed:TYPe <Measurement>Measurement Type. Selects the type of measurement to perform (frequency, RMS, rise time, etc.).Text: AMPLITUDE,BASE,FALLTIME,FREQUENCY,MAXIMUM,MEAN,MINIMUM,NDUTY,NOVERSHOOT,NWIDTH,PDUTY,PERIOD,PK2Pk,POVERSHOOT,PWIDTH,RISETIME,RMS,TOP
MEASUrement:IMMed:VALue?Measure. Reads the numeric result of the currently configured measurement.None
MEASUrement:IMMed:DELay:EDGE1 <Edge> ; MEASUrement:IMMed:SOUrce1 <Source_1> ; MEASUrement:IMMed:SOUrce2 <Source_2> ; MEASUrement:IMMed:TYPe DELayMeasure delay. Measures propagation delay between two signal edges.Text: FALL,RISe; Text: CH1,CH2; Text: CH1,CH2

Acquisition (ACQuire) (4)

CommandWhat it doesArguments
ACQuire:STOPAfter SEQuence ;STATE RUNSingle seq. Runs a single acquisition sequence and automatically stops after one complete capture, useful for one-shot events.None
ACQuire:STOPAfter RUNSTop ;STATE RUN ;:DISplay:PERSistence AutoRUN. Starts continuous acquisition with auto display persistence, updating waveforms in real time.None
ACQuire:STOPAfter RUNSTop ;STATE Stop ;:DISplay:PERSistence AutoSTOP. Stops waveform acquisition while keeping display persistence behavior automatic.None
ACQuire:STOPAfter RUNSTop ;STATE Stop ;:DISplay:PERSistence INFIniteINFInite. Stops acquisition and enables infinite persistence, keeping all past waveforms visible.None

Other subsystem (4)

CommandWhat it doesArguments
<Channel>:LABel:NAMe <Text>Chan label. Assigns a custom text label to an analog channel for clarity in the UI and screenshots.Text: CH1,CH2; Text
<Channel>:POSition <Position>Channel position. Vertically shifts the analog channel trace on the display.Text: CH1,CH2,CH3,CH4; Number
<Channel>:SCALE <Scale>Channel scale. Sets the volts per division for the selected channel.Text: CH1,CH2,CH3,CH4; Number
<Output Variable>=<Equation>Math. Variable equals an equation like (${Var_name}= ${Var_name}/2)Number; Text

SEL subsystem (4)

CommandWhat it doesArguments
SELect:<Channel> ONShow channel. Makes a channel visible on the display.Text: CH1,CH2,CH3,CH4
SELect:<Channel> OFFHide channel. Hides a channel from the display without disabling it.Text: CH1,CH2,CH3,CH4
SELect:DCH<Digital Channel>:DAll ONBits ON. Enables all digital bits in the group.Text: 1
SELect:DCH<Digital Channel>:DAll OFFBits OFF. Disables all digital bits in the group.Text: 1
CommandWhat it doesArguments
SEARCH:SEARCH<Search>:TRIGger:A:LOGIc:LOGICPattern:DCH1_D<Bit> <State>Search pattern. Searches captured data for a specific digital pattern.Number; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text: H,L,X
SEARCH:SEARCH<Search>:TRIGger:A:LOGIc:WHEn <Condition>Search condition. Defines how the pattern comparison is evaluated.Number; Text: TRUe,FALSe,MOREThan,LESSThan,EQual,UNEQual
SEARCH:SEARCH<Search>:TRIGger:A:PULSEWidth:HIGHLimit <Width>Search puls width. Searches for pulses based on width criteria.Number; Number
SEARCH:SEARCH<Search>:TRIGger:A:TIMEOut:TIMe <Time>Search TIMEOUT. Defines timeout behavior for search operations.Number; Number

HORIZONTAL subsystem (2)

CommandWhat it doesArguments
HORIZONTAL:POSITION <Position>Time position. Moves the waveform left or right relative to the trigger point.Number
HORIZONTAL:SCALE <Scale>Time scale. Sets the time per division for the horizontal axis.Number

TRIGGER subsystem (1)

CommandWhat it doesArguments
TRIGGER:A:EDGE:SOURCE <Channel>Trigger channel. Selects which channel is used as the trigger source.Text: CH1,CH2,CH3,CH4

Save (SAVE) (1)

CommandWhat it doesArguments
SAVe:IMAGe:INKSaver ON ; SAVe:IMAGe:FILEFormat PNG ; SAVe:IMAGe "imgx.png" ; wait(100) ; FILESystem:DELEte "imgx.png"Capture. Captures a PNG screenshot from the scope, transfers it, then deletes the temporary file.None

S subsystem (1)

CommandWhat it doesArguments
Set?Get settings. Queries the instrument for its current configuration or setup state.None

WAIT subsystem (1)

CommandWhat it doesArguments
wait(<ms>)Wait. Waits for number of millisecondsNumber

SAVE subsystem (1)

CommandWhat it doesArguments
save2var <Variable_name>Save2Variable. Saves last mearurment to a variableText

Where these commands come from

This reference is generated from TestFlow's instrument library, which is drafted from Tektronix's programming documentation for the MSO22 and MSO24 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.

Frequently asked questions

Does the Tektronix MSO22 support SCPI remote control?

Yes. The Tektronix MSO22 accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 71 SCPI commands for it: 7 queries that read values or state, and 64 settings and actions.

How do I control the Tektronix MSO22 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?, ACQuire:STOPAfter RUNSTop ;STATE RUN ;:DISplay:PERSistence Auto and Set?.

Which command reads a value from the Tektronix MSO22?

Set? (get settings). Queries the instrument for its current configuration or setup state. The full list of queries is in the command reference on this page, grouped by subsystem.

Can I automate the Tektronix MSO22 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 Tektronix MSO22 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.