The Tektronix MSO24B and MSO26 oscilloscope is controlled remotely with SCPI commands. TestFlow's instrument library holds 73 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 MSO24B on a real bench.
Describe the test; TestFlow's agent uses this command set to drive your Tektronix MSO24B or MSO26 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 MSO24B's VISA address
# Paste the address of your Tektronix MSO24B (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 MSO24B or MSO26 and writes the report from the measured results.
Describe the test in a sentence, for example “run on the MSO24B, 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.
73 commands in 16 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values. The MSO24B and MSO26 share this command set in TestFlow's library.
| Command | What it does | Arguments |
|---|---|---|
| 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:TRIGger | AFG 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 ON | AFG Noise. Injects controlled noise into output signal. | Number |
| AFG:NOISEAdd:STATE OFF | AFG 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 ON | AFG turn On. Enables AFG output. | None |
| AFG:OUTPut:STATE OFF | AFG 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 |
| Command | What it does | Arguments |
|---|---|---|
| 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,AC,HFRej,LFRej,NOISErej |
| TRIGger:A:LEVel:CH<Channel> <Volt> | Trigger level. Sets the voltage threshold at which the trigger fires. | Text: CH1,CH2,CH3,CH4; Number |
| TRIGger:A:LOGIc:INPut1:SOUrce DCH<>_D<> | D trigger IN1. Assigns digital input 1 for logic triggering. | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
| TRIGger:A:LOGIc:INPut2:SOUrce DCH<>_D<> | D trigger IN2. Assigns digital input 2 for logic triggering. | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
| TRIGger:A:TYPE LOGIc ; TRIGger:A:LOGIc:WHEn <Condition> ; TRIGger:A:STATE ON | 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: HIGH,LOW |
| 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> <HIGH,LOW,X> | D trigger pattern. Defines a bit-level pattern required for triggering. | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text: HIGH,LOW,X |
| Command | What it does | Arguments |
|---|---|---|
| CURSor:SOUrce <Channel> | Cursor channel. Assigns cursors to operate on a specific channel waveform. | Text: CH1,CH2,CH3,CH4 |
| CURSor:MODe <Mode> | Cursor mode. Sets whether cursors move independently or track each other. | Text: INDependent,Dependent |
| CURSor:FUNCtion WAVEFORM | Cursers ON. Enables waveform cursors for manual measurement. | None |
| CURSor:FUNCtion OFF | Cursers OFF. Disables all cursors. | None |
| CURSor:DDT? | Cursers dV/dT. Returns slope (dV/dT) between cursor points. | None |
| CURSor:VBArs:DELTa? | Cursor dT. Returns time difference between vertical cursors. | 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 |
| Command | What it does | Arguments |
|---|---|---|
| DCH<Digital Channel>_D<Bit>:THReshold | Digital Threshold. Sets the logic threshold voltage for a digital input bit. | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
| DCH<Digital Channel>_D<Bit>:LABel:COLor <Color> | Digital label color. Changes the color of a digital channel label. | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text: RED,GREEN,BLUE,CYAN,MAGENTA,YELLOW,WHITE,BLACK |
| DCH<Digital Channel>_D<Bit>:LABel:FONT:<Font> | Digital label font. Sets digital label font style (bold/italic). | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text: BOLD,ITALic |
| DCH<Digital Channel>_D<Bit>:LABel:FONT:SIZE <Size> | Digital font size. Adjusts font size of the digital label. | Text: 1,2,3,4; 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,2,3,4; 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,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text |
| Command | What it does | Arguments |
|---|---|---|
| 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,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 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,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 result of the currently configured measurement. | None |
| MEASUrement:IMMed:DELay:EDGE<Edge> ;MEASUrement:IMMed:SOUrce1 <Source_1> ;MEASUrement:IMMed:SOUrce2 <Source_2> | Measure delay. Measures propagation delay between two signal edges. | Text: FALL,RISe; Text: CH1,CH2,CH3,CH4; Text: CH1,CH2,CH3,CH4 |
| Command | What it does | Arguments |
|---|---|---|
| DISplay:GLObal:DCH<Digital Channel>:STATE <ON/OFF> | D channel display. Enables or disables the entire digital channel group. | Text: 1,2,3,4; Text: ON,OFF |
| DISplay:WAVEView<WAVEView>:DCH<Digital Channel>_D<Bit>:STATE ON | WaveView display. Shows a digital bit in a specific WaveView pane. | Text: 1,2,3,4; Text: 1,2,3,4; 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 OFF | WaveView Hide. Hides a digital bit from a WaveView pane. | Text: 1,2,3,4; Text: 1,2,3,4; 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,2,3,4; Text: 1,2,3,4; 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,2,3,4; Text: 1,2,3,4; Text: 5,4,3,2,1,0,-1,-2,-3,-4,-5 |
| Command | What it does | Arguments |
|---|---|---|
| ACQuire:STOPAfter SEQuence ;STATE RUN | Single 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 Auto | RUN. Starts continuous acquisition with auto display persistence, updating waveforms in real time. | None |
| ACQuire:STOPAfter RUNSTop ;STATE Stop ;:DISplay:PERSistence Auto | STOP. Stops waveform acquisition while keeping display persistence behavior automatic. | None |
| ACQuire:STOPAfter RUNSTop ;STATE Stop ;:DISplay:PERSistence INFInite | INFInite. Stops acquisition and enables infinite persistence, keeping all past waveforms visible. | None |
| Command | What it does | Arguments |
|---|---|---|
| <Channel>:LABel <Text> | Chan label. Assigns a custom text label to an analog channel for clarity in the UI and screenshots. | Text: CH1,CH2,CH3,CH4; 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 |
| Command | What it does | Arguments |
|---|---|---|
| SELect:<Channel> ON | Show channel. Makes a channel visible on the display. | Text: CH1,CH2,CH3,CH4 |
| SELect:<Channel> OFF | Hide channel. Hides a channel from the display without disabling it. | Text: CH1,CH2,CH3,CH4 |
| SELect:DCH<Digital Channel>:DAll ON | Bits ON. Enables all digital bits in the group. | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
| SELect:DCH<Digital Channel>:DAll OFF | Bits OFF. Disables all digital bits in the group. | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
| Command | What it does | Arguments |
|---|---|---|
| SEARCH:SEARCH<Digital Channel>:LOGIc:PATtern <Binary/hex pattern> | Search pattern. Searches captured data for a specific digital pattern. | Text: 1,2,3,4; Text |
| SEARCH:SEARCH<Digital Channel>:LOGIc:WHEn <Condition> | Search condition. Defines how the pattern comparison is evaluated. | Text: 1,2,3,4; Text: EQual,NOTEqual |
| SEARCH:SEARCH<Digital Channel>:PULse:WIDth | Search puls width. Searches for pulses based on width criteria. | Text: 1,2,3,4 |
| SEARCH:SEARCH<Digital Channel>:TIMEOut | Search TIMEOUT. Defines timeout behavior for search operations. | Text: 1,2,3,4 |
| Command | What it does | Arguments |
|---|---|---|
| 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 |
| Command | What it does | Arguments |
|---|---|---|
| TRIGGER:A:EDGE:SOURCE <Channel> | Trigger channel. Selects which channel is used as the 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 from the scope, transfers it, then deletes the temporary file. | None |
| Command | What it does | Arguments |
|---|---|---|
| Set? | Get settings. Queries the instrument for its current configuration or setup state. | 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 MSO24B and MSO26 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 MSO24B accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 73 SCPI commands for it: 7 queries that read values or state, and 66 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 instrument for its current configuration or setup state. 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 MSO24B 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.