The Tektronix MSO54B oscilloscope is controlled remotely with SCPI commands. TestFlow's instrument library holds 70 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 MSO54B on a real bench.
Describe the test; TestFlow's agent uses this command set to drive your Tektronix MSO54B 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 MSO54B's VISA address
# Paste the address of your Tektronix MSO54B (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 MSO54B and writes the report from the measured results.
Describe the test in a sentence, for example “run on the MSO54B, 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.
70 commands in 17 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values.
| Command | What it does | Arguments |
|---|---|---|
| AFG:AMPLitude <Voltage> | AFG Amplitude. | Number |
| AFG:ARBitrary:SOUrce <Source_path> | AFG source. | Text |
| AFG:BURSt:CCOUnt <Cycles_count> | AFG cycles count. | Number |
| AFG:BURSt:TRIGger | AFG burst. | None |
| AFG:FUNCtion <Function> | AFG function. | Text: SINE,SQUare,PULSe,RAMP,NOISe,DC,SINC,GAUSsian,LORENtz,ERISe,EDECAy,HAVERSINe,CARDIac,ARBitrary |
| AFG:FREQuency <Frequency> | AFG frequency. | Number |
| AFG:HIGHLevel <Voltage> | AFG High LVL. | Number |
| AFG:LOWLevel <Voltage> | AFG Low LVL. | Number |
| AFG:NOISEAdd:PERCent <Percentage> ; AFG:NOISEAdd:STATE ON | AFG Noise. | Number |
| AFG:NOISEAdd:STATE OFF | AFG Noise off. | None |
| AFG:OFFSet <Offset> | AFG offset. | Number |
| AFG:OUTPut:MODe <Cont/Burst> | AFG mode. | Text: CONTinuous,BURSt,OFF |
| AFG:OUTPut:STATE ON | AFG turn On. | None |
| AFG:OUTPut:STATE OFF | AFG turn Off. | None |
| AFG:PERIod <Seconds> | AFG period. | Number |
| AFG:PULse:WIDth <Width> | AFG width. | Number |
| AFG:RAMP:SYMmetry <Percentage> | AFG symetry. | Number: 10,20,30,40,50,60,70,80,90 |
| Command | What it does | Arguments |
|---|---|---|
| DISplay:WAVEView1:CURSor:CURSOR1:MODe <Mode> | Cursor mode. | Text: INDEPENDENT,TRACK |
| DISplay:WAVEView1:CURSor:CURSOR1:VBArs:DELTa? | Cursor dT. | None |
| DISplay:WAVEView1:CH<Digital Channel>_DALL:STATE ON | Bits ON. | Text: 1,2,3,4 |
| DISplay:WAVEView1:CH<Digital Channel>_DALL:STATE OFF | Bits OFF. | Text: 1,2,3,4 |
| DISplay:GLObal:CH<Digital Channel>:STATE <State> | D channel display. | Text: 1,2,3,4; Text: ON,OFF |
| DISplay:WAVEView<WAVEView>:CH<Digital Channel>_D<Bit>:STATE ON | WaveView display. | Text: 1; 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>:CH<Digital Channel>_D<Bit>:STATE OFF | WaveView Hide. | Text: 1; 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>:CH<Digital Channel>_DALL:VERTical:POSition <Vertical_position> | D Vertical position. | Text: 1; Text: 1,2,3,4; Text: 5,4,3,2,1,0,-1,-2,-3,-4,-5 |
| Command | What it does | Arguments |
|---|---|---|
| TRIGger:A:EDGE:SLOpe <Slope> | Trigget slope. | Text: RISe,FALL,EITHer |
| TRIGger:A:EDGE:COUPling <Coupling> | Trigger coupling. | Text: DC,HFRej,LFRej,NOISErej |
| TRIGger:A:LEVel:<Channel> <Volt> | Trigger level. | Text: CH1,CH2,CH3,CH4; Number |
| TRIGger:A:TYPe LOGIc ; TRIGger:A:LOGIc:FUNCtion <Condition> | D trigger condition. | Text: AND,OR,NANd,NOR |
| TRIGger:A:LOGIc:POLarity <Polarity> | D trigger polarity. | Text: POSitive,NEGative,EITher |
| TRIGger:A:MODe <Mode> | D trigger mode. | Text: NORMal,AUTO |
| TRIGger:A:LOGICPattern:CH<Digital Channel>_D<Bit> <State> | D trigger pattern. | 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. | Text: CH1,CH2,CH3,CH4 |
| CURSor:FUNCtion WAVEFORM | Cursers ON. | None |
| CURSor:FUNCtion OFF | Cursers OFF. | None |
| CURSor:DDT? | Cursers dV/dT. | None |
| CURSor:HBArs:DELTa? | Cursor dV. | None |
| CURSor:HBArs:POSITION<Position>? | Cursor voltage. | None |
| Command | What it does | Arguments |
|---|---|---|
| MEASUrement:IMMed:SOUrce <Channel> ; MEASUrement:IMMed:TYPe <Measurement> ; MEASUrement:IMMed:VALue? | Measurement. | Text: CH1,CH2,CH3,CH4; 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. | Text: CH1,CH2,CH3,CH4 |
| MEASUrement:IMMed:TYPe <Measurement> | Measurement Type. | Text: AMPLITUDE,BASE,FALLTIME,FREQUENCY,MAXIMUM,MEAN,MINIMUM,NDUTY,NOVERSHOOT,NWIDTH,PDUTY,PERIOD,PK2Pk,POVERSHOOT,PWIDTH,RISETIME,RMS,TOP |
| MEASUrement:IMMed:VALue? | Measure. | None |
| MEASUrement:IMMed:DELay:EDGE1 <Edge> ; MEASUrement:IMMed:SOUrce1 <Source_1> ; MEASUrement:IMMed:SOUrce2 <Source_2> ; MEASUrement:IMMed:TYPe DELay | Measure delay. | Text: FALL,RISe; Text: CH1,CH2,CH3,CH4; Text: CH1,CH2,CH3,CH4 |
| Command | What it does | Arguments |
|---|---|---|
| CH<Digital Channel>_D<Bit>:LABel:COLor <Color> | Digital label color. | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text |
| CH<Digital Bit>:LABel:FONT:<Font> <State> | Digital label font. | Text; Text: BOLD,ITALic,UNDERline; Text: ON,OFF |
| CH<Digital Channel>_D<Bit>:LABel:FONT:SIZE <Size> | Digital font size. | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Number |
| CH<Digital Channel>_D<Bit>:LABel:FONT:TYPE "<FontName>" | Digital font type. | 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 |
| CH<Digital Channel>_D<Bit>:LABel:NAMe "<Label>" | Digital label name. | 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 |
|---|---|---|
| ACQuire:STOPAfter SEQuence ;STATE RUN | Single seq. | None |
| ACQuire:STOPAfter RUNSTop ;STATE RUN ;:DISplay:PERSistence Auto | RUN. | None |
| ACQuire:STOPAfter RUNSTop ;STATE Stop ;:DISplay:PERSistence Auto | STOP. | None |
| ACQuire:STOPAfter RUNSTop ;STATE Stop ;:DISplay:PERSistence INFInite | INFInite. | None |
| Command | What it does | Arguments |
|---|---|---|
| <Channel>:LABel:NAMe <Text> | Chan label. | Text: CH1,CH2,CH3,CH4; Text |
| <Channel>:POSition <Position> | Channel position. | Text: CH1,CH2,CH3,CH4; Number |
| <Channel>:SCALE <Scale> | Channel scale. | Text: CH1,CH2,CH3,CH4; Number |
| <Output Variable>=<Equation> | Math. | Number; Text |
| Command | What it does | Arguments |
|---|---|---|
| SEARCH:SEARCH<Search>:TRIGger:A:LOGIc:LOGICPattern:CH<Digital Bit> <State> | Search pattern. | Number; Text; Text: H,L,X |
| SEARCH:SEARCH<Search>:TRIGger:A:LOGIc:WHEn <Condition> | Search condition. | Number; Text: TRUe,FALSe,MOREThan,LESSThan,EQual,UNEQual |
| SEARCH:SEARCH<Search>:TRIGger:A:PULSEWidth:HIGHLimit <Width> | Search puls width. | Number; Number |
| SEARCH:SEARCH<Search>:TRIGger:A:TIMEOut:TIMe <Time> | Search TIMEOUT. | Number; Number |
| Command | What it does | Arguments |
|---|---|---|
| HORIZONTAL:POSITION <Position> | Time position. | Number |
| HORIZONTAL:SCALE <Scale> | Time scale. | Number |
| Command | What it does | Arguments |
|---|---|---|
| SELect:<Channel> ON | Show channel. | Text: CH1,CH2,CH3,CH4 |
| SELect:<Channel> OFF | Hide channel. | Text: CH1,CH2,CH3,CH4 |
| Command | What it does | Arguments |
|---|---|---|
| TRIGGER:A:EDGE:SOURCE <Channel> | Trigger channel. | Text: CH1,CH2,CH3,CH4 |
| Command | What it does | Arguments |
|---|---|---|
| SAVe:IMAGe:INKSaver ON ; SAVe:IMAGe:FILEFormat PNG ; SAVe:IMAGe "imgx.png" ; wait(100) ; FILESystem:DELEte "imgx.png" | Capture. | None |
| Command | What it does | Arguments |
|---|---|---|
| Set? | Get settings. | None |
| Command | What it does | Arguments |
|---|---|---|
| DIGGRP<Digital Channel>:D<Bit>:THReshold <Threshold> | Digital Threshold. | Text: 1,2,3,4; Text: 0,1,2,3,4,5,6,7; Number |
| Command | What it does | Arguments |
|---|---|---|
| save2var <Variable_namer> | Save2Variable. | Text |
| Command | What it does | Arguments |
|---|---|---|
| wait(<ms>) | Wait. | Number |
This reference is generated from TestFlow's instrument library, which is drafted from Tektronix's programming documentation for the MSO54B 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 MSO54B accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 70 SCPI commands for it: 7 queries that read values or state, and 63 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). 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 MSO54B 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.