The Keysight MSOS104A and MSOS254A oscilloscope is controlled remotely with SCPI commands. TestFlow's instrument library holds 159 commands for it, 60 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 MSOS104A on a real bench.
Describe the test; TestFlow's agent uses this command set to drive your Keysight MSOS104A or MSOS254A 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 Keysight MSOS104A's VISA address
# Paste the address of your Keysight MSOS104A (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(":AUToscale") # Auto Scale
print(inst.query(":MEASure:RESults?")) # Get Measure Results
inst.close()Describe the test; TestFlow's agent uses this command set to drive your Keysight MSOS104A or MSOS254A and writes the report from the measured results.
Describe the test in a sentence, for example “auto scale on the MSOS104A, then get measure results 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.
159 commands in 25 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values. The MSOS104A and MSOS254A share this command set in TestFlow's library.
| Command | What it does | Arguments |
|---|---|---|
| :MEASure:SOURce <Source> | Measure Source. Selects the source used by subsequent measurement commands. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:SOURce? | Get Measure Source. Queries the source currently selected for measurements. | None |
| :MEASure:VPP? <Source> | Measure Vpp. Measures the peak-to-peak voltage of the selected source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:VMAX? <Source> | Measure Vmax. Measures the maximum voltage of the selected source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:VMIN? <Source> | Measure Vmin. Measures the minimum voltage of the selected source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:VAMPlitude? <Source> | Measure Vamplitude. Measures the amplitude (top minus base) of the selected source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:VTOP? <Source> | Measure Vtop. Measures the top (logic high) voltage level of the selected source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:VBASe? <Source> | Measure Vbase. Measures the base (logic low) voltage level of the selected source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:VMIDdle? <Source> | Measure Vmiddle. Measures the middle voltage level (midpoint of top and base) of the selected source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:VAVerage? <Interval>,<Source> | Measure Vaverage. Measures the average voltage of the selected source. | Text: CYCLe,DISPlay; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:FREQuency? <Source> | Measure Frequency. Measures the frequency in hertz of the first complete cycle on screen. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:PERiod? <Source> | Measure Period. Measures the period in seconds of the first complete cycle on screen. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:PWIDth? <Source> | Measure Pos Width. Measures the width in seconds of the first positive pulse on screen. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:NWIDth? <Source> | Measure Neg Width. Measures the width in seconds of the first negative pulse on screen. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:DUTYcycle? <Source> | Measure Duty Cycle. Measures the duty cycle of the first complete cycle as a percentage. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:RISetime? <Source> | Measure Rise Time. Measures the rise time in seconds of the first rising edge on screen. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:FALLtime? <Source> | Measure Fall Time. Measures the fall time in seconds of the first falling edge on screen. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:OVERshoot? <Source> | Measure Overshoot. Measures the overshoot of the first edge on screen as a percentage. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:PREShoot? <Source> | Measure Preshoot. Measures the preshoot of the first edge on screen as a percentage. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:VRMS? <Interval>,<Type>,<Source> | Measure Vrms. Measures the AC or DC RMS voltage over one cycle or over the whole display. | Text: CYCLe,DISPlay; Text: AC,DC; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:PHASe? <Source_1>,<Source_2> | Measure Phase. Measures the phase shift in degrees between the two specified sources. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:DELTatime? <Source_1>,<Source_2> | Measure Delta Time. Measures the delta time in seconds between the selected edges of the two specified sources. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :MEASure:RESults? | Get Measure Results. Returns the results of the continuously displayed measurements as a comma-separated list. | None |
| :MEASure:STATistics <Type> | Statistics Type. Selects which statistics the measurement results query returns. | Text: ON,CURRent,MINimum,MAXimum,MEAN,STDDev,COUNt |
| :MEASure:SENDvalid ON | Send Valid On. Appends a result state code to every measurement query response. | None |
| :MEASure:SENDvalid OFF | Send Valid Off. Returns measurement values without the result state code. | None |
| :MEASure:CLEar | Clear Measurements. Clears the measurement results from the screen and disables all enabled measurements. | None |
| Command | What it does | Arguments |
|---|---|---|
| :CHANnel<Channel>:DISPlay ON | Channel On. Turns on the display of the specified analog channel. | Text: 1,2,3,4 |
| :CHANnel<Channel>:DISPlay OFF | Channel Off. Turns off the display of the specified analog channel. | Text: 1,2,3,4 |
| :CHANnel<Channel>:DISPlay? | Get Channel State. Queries whether the specified analog channel is displayed (1) or not (0). | Text: 1,2,3,4 |
| :CHANnel<Channel>:INPut <Input> | Channel Input. Selects the input coupling and impedance of the specified analog channel. | Text: 1,2,3,4; Text: DC,DC50,AC,LFR1,LFR2 |
| :CHANnel<Channel>:INPut? | Get Channel Input. Queries the input coupling and impedance of the specified analog channel. | Text: 1,2,3,4 |
| :CHANnel<Channel>:SCALe <Scale> | Channel Scale. Sets the vertical scale of the specified channel in units per division. | Text: 1,2,3,4; Number |
| :CHANnel<Channel>:SCALe? | Get Channel Scale. Queries the vertical scale of the specified channel in units per division. | Text: 1,2,3,4 |
| :CHANnel<Channel>:RANGe <Range> | Channel Range. Sets the full-scale vertical range of the specified channel (8 divisions). | Text: 1,2,3,4; Number |
| :CHANnel<Channel>:RANGe? | Get Channel Range. Queries the full-scale vertical range of the specified channel. | Text: 1,2,3,4 |
| :CHANnel<Channel>:OFFSet <Offset> | Channel Offset. Sets the vertical value represented at the centre of the screen for the specified channel. | Text: 1,2,3,4; Number |
| :CHANnel<Channel>:OFFSet? | Get Channel Offset. Queries the vertical offset of the specified channel. | Text: 1,2,3,4 |
| :CHANnel<Channel>:PROBe <Ratio>,RATio | Channel Probe Ratio. Sets the probe attenuation factor of the specified channel as a ratio. | Text: 1,2,3,4; Number |
| :CHANnel<Channel>:PROBe? | Get Channel Probe Ratio. Queries the probe attenuation factor of the specified channel. | Text: 1,2,3,4 |
| :CHANnel<Channel>:UNITs <Unit> | Channel Units. Sets the vertical measurement units of the specified channel. | Text: 1,2,3,4; Text: VOLT,AMPere,WATT,UNKNown |
| :CHANnel<Channel>:LABel "<Label>" | Channel Label. Sets the label string shown on screen for the specified analog channel. | Text: 1,2,3,4; Text |
| :CHANnel<Channel>:INVert ON | Channel Invert On. Inverts the displayed waveform of the specified channel about the 0 V reference. | Text: 1,2,3,4 |
| :CHANnel<Channel>:INVert OFF | Channel Invert Off. Removes the waveform inversion of the specified channel. | Text: 1,2,3,4 |
| :CHANnel<Channel>:BWLimit ON | Bandwidth Limit On. Enables the low-pass bandwidth limit filter on the specified channel. | Text: 1,2,3,4 |
| :CHANnel<Channel>:BWLimit OFF | Bandwidth Limit Off. Disables the bandwidth limit filter so the channel runs at full bandwidth. | Text: 1,2,3,4 |
| Command | What it does | Arguments |
|---|---|---|
| :ACQuire:AVERage ON | Averaging On. Enables waveform averaging over multiple acquisitions. | None |
| :ACQuire:AVERage OFF | Averaging Off. Disables waveform averaging. | None |
| :ACQuire:AVERage:COUNt <Count> | Average Count. Sets the number of acquisitions averaged together when averaging is enabled. | Number |
| :ACQuire:AVERage:COUNt? | Get Average Count. Queries the number of averages currently configured. | None |
| :ACQuire:MODE <Mode> | Acquire Mode. Sets the sampling and acquisition mode of the oscilloscope. | Text: ETIMe,RTIMe,PDETect,HRESolution,SEGMented,SEGPdetect,SEGHres |
| :ACQuire:MODE? | Get Acquire Mode. Queries the current sampling and acquisition mode. | None |
| :ACQuire:POINts:ANALog <Points> | Memory Depth. Sets the requested analog memory depth in points for an acquisition. | Number |
| :ACQuire:POINts:ANALog? | Get Memory Depth. Queries the analog memory depth in points. | None |
| :ACQuire:POINts:AUTO ON | Memory Depth Auto On. Lets the oscilloscope choose the optimum memory depth automatically. | None |
| :ACQuire:POINts:AUTO OFF | Memory Depth Auto Off. Uses the manually set memory depth instead of the automatic value. | None |
| :ACQuire:SRATe:ANALog <Rate> | Sample Rate. Sets the analog acquisition sample rate in samples per second. | Number |
| :ACQuire:SRATe:ANALog? | Get Sample Rate. Queries the analog acquisition sample rate in samples per second. | None |
| :ACQuire:SRATe:ANALog:AUTO ON | Sample Rate Auto On. Lets the oscilloscope choose the optimum sample rate automatically. | None |
| :ACQuire:SRATe:ANALog:AUTO OFF | Sample Rate Auto Off. Uses the manually set sample rate instead of the automatic value. | None |
| :ACQuire:BANDwidth <Bandwidth> | Acquire Bandwidth. Sets the acquisition bandwidth filter to AUTO, MAX or an explicit bandwidth in hertz. | Text |
| :ACQuire:COMPlete <Percent> | Acquire Complete. Sets the percentage of time buckets that must be full before an acquisition is considered complete. | Number |
| :ACQuire:SEGMented:COUNt <Count> | Segmented Count. Sets the number of memory segments to acquire in segmented memory mode. | Number |
| :ACQuire:SEGMented:INDex <Index> | Segmented Index. Selects the segmented memory segment displayed and measured. | Number |
| Command | What it does | Arguments |
|---|---|---|
| :WAVeform:SOURce <Source> | Waveform Source. Selects the source of the waveform data read back over the bus. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :WAVeform:FORMat <Format> | Waveform Format. Sets the data transmission format of the waveform data. | Text: ASCii,BINary,BYTE,WORD,FLOat |
| :WAVeform:BYTeorder <Order> | Waveform Byte Order. Sets whether the least or most significant byte is transmitted first for multi-byte data. | Text: LSBFirst,MSBFirst |
| :WAVeform:VIEW <View> | Waveform View. Selects how much of the acquisition record is returned by the waveform data query. | Text: MAIN,WINDow,ALL |
| :WAVeform:DATA? | Get Waveform Data. Reads the waveform data of the selected source in the selected format. | None |
| :WAVeform:PREamble? | Get Waveform Preamble. Queries the waveform preamble (format, type, points, count, X/Y increments, origins and references). | None |
| :WAVeform:POINts? | Get Waveform Points. Queries the number of points available in the selected waveform record. | None |
| :WAVeform:XINCrement? | Get X Increment. Queries the time in seconds between consecutive waveform data points. | None |
| :WAVeform:XORigin? | Get X Origin. Queries the time value in seconds of the first waveform data point. | None |
| :WAVeform:XREFerence? | Get X Reference. Queries the data point index that corresponds to the X origin. | None |
| :WAVeform:YINCrement? | Get Y Increment. Queries the voltage change per least significant bit of the waveform data. | None |
| :WAVeform:YORigin? | Get Y Origin. Queries the voltage value at the vertical reference position of the waveform data. | None |
| :WAVeform:YREFerence? | Get Y Reference. Queries the data value that corresponds to the Y origin. | None |
| Command | What it does | Arguments |
|---|---|---|
| :TRIGger:SWEep <Sweep> | Trigger Sweep. Selects auto or triggered sweep mode. | Text: AUTO,TRIGgered,SINGle |
| :TRIGger:SWEep? | Get Trigger Sweep. Queries the current trigger sweep mode. | None |
| :TRIGger:MODE <Mode> | Trigger Mode. Selects the trigger type used by the oscilloscope. | Text: EDGE,GLITch,PATTern,STATe,DELay,TIMeout,TV,COMM,RUNT,SHOLd,TRANsition,WINDow,PWIDth,ADVanced |
| :TRIGger:MODE? | Get Trigger Mode. Queries the currently selected trigger type. | None |
| :TRIGger:EDGE:SOURce <Source> | Trigger Source. Selects the source used for edge triggering. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4,AUX,LINE |
| :TRIGger:EDGE:SOURce? | Get Trigger Source. Queries the current edge trigger source. | None |
| :TRIGger:EDGE:SLOPe <Slope> | Trigger Slope. Sets the edge direction that produces a trigger. | Text: POSitive,NEGative,EITHer |
| :TRIGger:EDGE:SLOPe? | Get Trigger Slope. Queries the current edge trigger slope. | None |
| :TRIGger:LEVel <Source>,<Level> | Trigger Level. Sets the trigger threshold voltage on the specified source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4,AUX; Number |
| :TRIGger:LEVel? <Source> | Get Trigger Level. Queries the trigger threshold voltage of the specified source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4,AUX |
| :TRIGger:HOLDoff <Holdoff> | Trigger Holdoff. Sets the trigger holdoff time in seconds. | Number |
| :TRIGger:HOLDoff? | Get Trigger Holdoff. Queries the trigger holdoff time in seconds. | None |
| Command | What it does | Arguments |
|---|---|---|
| :FUNCtion<Math>:DISPlay ON | Math Display On. Turns on the display of the specified math function waveform. | Text: 1,2,3,4 |
| :FUNCtion<Math>:DISPlay OFF | Math Display Off. Turns off the display of the specified math function waveform. | Text: 1,2,3,4 |
| :FUNCtion<Math>:ADD <Source_1>,<Source_2> | Math Add. Defines the math function as the algebraic sum of the two operands. | Text: 1,2,3,4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :FUNCtion<Math>:SUBTract <Source_1>,<Source_2> | Math Subtract. Defines the math function as the algebraic difference of the two operands. | Text: 1,2,3,4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :FUNCtion<Math>:MULTiply <Source_1>,<Source_2> | Math Multiply. Defines the math function as the product of the two operands. | Text: 1,2,3,4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :FUNCtion<Math>:DIVide <Source_1>,<Source_2> | Math Divide. Defines the math function as the ratio of the two operands. | Text: 1,2,3,4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :FUNCtion<Math>:FFTMagnitude <Source> | Math FFT Magnitude. Defines the math function as the FFT magnitude spectrum of the operand. | Text: 1,2,3,4; Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| :FUNCtion<Math>:VERTical:RANGe <Range> | Math Vertical Range. Sets the full-scale vertical range of the math function waveform. | Text: 1,2,3,4; Number |
| :FUNCtion<Math>:VERTical:OFFSet <Offset> | Math Vertical Offset. Sets the vertical offset of the math function waveform. | Text: 1,2,3,4; Number |
| :FUNCtion<Math>:FFT:FREQuency <Frequency> | FFT Center. Sets the centre frequency in hertz of the FFT math function display. | Text: 1,2,3,4; Number |
| :FUNCtion<Math>:FFT:SPAN <Span> | FFT Span. Sets the frequency span in hertz of the FFT math function display. | Text: 1,2,3,4; Number |
| :FUNCtion<Math>:FFT:WINDow <Window> | FFT Window. Selects the FFT window function used to control spectral leakage. | Text: 1,2,3,4; Text: RECTangular,HANNing,FLATtop,BHARris,HAMMing |
| Command | What it does | Arguments |
|---|---|---|
| :TIMebase:SCALe <Scale> | Timebase Scale. Sets the main timebase in seconds per division. | Number |
| :TIMebase:SCALe? | Get Timebase Scale. Queries the main timebase in seconds per division. | None |
| :TIMebase:RANGe <Range> | Timebase Range. Sets the full-scale horizontal time in seconds for 10 divisions. | Number |
| :TIMebase:POSition <Position> | Timebase Position. Sets the time in seconds between the trigger event and the horizontal reference point. | Number |
| :TIMebase:POSition? | Get Timebase Position. Queries the horizontal position of the trigger event relative to the reference point. | None |
| :TIMebase:REFerence <Reference> | Timebase Reference. Sets the horizontal reference point on the screen. | Text: LEFT,CENTer,RIGHt |
| :TIMebase:ROLL:ENABLE ON | Roll Mode On. Enables roll mode for continuous slow-sweep display. | None |
| :TIMebase:ROLL:ENABLE OFF | Roll Mode Off. Disables roll mode. | None |
| :TIMebase:WINDow:SCALe <Scale> | Zoom Scale. Sets the zoomed (delayed) window timebase in seconds per division. | Number |
| :TIMebase:WINDow:POSition <Position> | Zoom Position. Sets the horizontal position in the zoomed window relative to the trigger event. | Number |
| Command | What it does | Arguments |
|---|---|---|
| :SYSTem:HEADer OFF | Header Off. Turns off command headers in query responses so replies contain the value only. | None |
| :SYSTem:HEADer ON | Header On. Turns on command headers in query responses. | None |
| :SYSTem:ERRor? | Get Error. Reads and clears the next entry in the error queue. | None |
| :SYSTem:DSP "<Message>" | Display Message. Writes a quoted text message to the oscilloscope display. | Text |
| :SYSTem:LOCK ON | Key Lock On. Locks the front panel so the oscilloscope can only be controlled remotely. | None |
| :SYSTem:LOCK OFF | Key Lock Off. Unlocks the front panel keys and knobs. | None |
| :SYSTem:LONGform ON | Long Form On. Returns query response headers and alpha arguments in their long form. | None |
| :SYSTem:LONGform OFF | Long Form Off. Returns query response headers and alpha arguments in their abbreviated short form. | None |
| :SYSTem:SETup? | Get Setup. Reads the complete oscilloscope setup back as a binary block for later restore. | None |
| Command | What it does | Arguments |
|---|---|---|
| :DIGitize | Digitize. Acquires the specified channels according to the current settings and stops the acquisition. | None |
| :DIGital<Digital>:DISPlay ON | Digital On. Turns on the display of the specified digital channel. | Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
| :DIGital<Digital>:DISPlay OFF | Digital Off. Turns off the display of the specified digital channel. | Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
| :DIGital<Digital>:THReshold <Threshold> | Digital Threshold. Sets the logic threshold voltage for the specified digital channel. | Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Number |
| :DIGital<Digital>:LABel "<Label>" | Digital Label. Sets the label string shown on screen for the specified digital channel. | Text: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; Text |
| Command | What it does | Arguments |
|---|---|---|
| :DISPlay:PERSistence MINimum | Persistence Minimum. Sets waveform persistence to minimum so old acquisitions are erased immediately. | None |
| :DISPlay:PERSistence INFinite | Persistence Infinite. Sets infinite persistence so acquisitions accumulate on screen without fading. | None |
| :DISPlay:PERSistence <Seconds> | Persistence Time. Sets variable persistence in seconds (100 ms to 200 s). | Number |
| :DISPlay:CGRade ON | Color Grade On. Turns on the colour grade (density) display of the waveform. | None |
| :DISPlay:CGRade OFF | Color Grade Off. Turns off the colour grade display of the waveform. | None |
| Command | What it does | Arguments |
|---|---|---|
| [PNG:DISPlay:DATA? PNG,SCReen,OFF] | Capture. Reads an uncompressed PNG screenshot of the current display back to the controller. | None |
| <Output Variable>=<Equation> | Math. Variable equals an equation like (${Var_name}= ${Var_name}/2) | Number; Text |
| Command | What it does | Arguments |
|---|---|---|
| :DISK:SAVE:IMAGe "<Filename>",PNG | Save Screen Image. Saves a PNG screen image to the specified file on the oscilloscope disk. | Text |
| :DISK:SAVE:WAVeform <Source>,"<Filename>",CSV | Save Waveform File. Saves the specified waveform to a CSV file on the oscilloscope disk. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4; Text |
| Command | What it does | Arguments |
|---|---|---|
| :POD<Pod>:DISPlay ON | Pod Display On. Turns on the display of all digital channels in the specified pod. | Text: 1,2 |
| :POD<Pod>:DISPlay OFF | Pod Display Off. Turns off the display of all digital channels in the specified pod. | Text: 1,2 |
| Command | What it does | Arguments |
|---|---|---|
| :AUToscale | Auto Scale. Evaluates all input signals and sets the correct vertical, horizontal and trigger settings to display the signals. | None |
| Command | What it does | Arguments |
|---|---|---|
| :RUN | Run. Starts repetitive acquisitions (same as pressing Run on the front panel). | None |
| Command | What it does | Arguments |
|---|---|---|
| :STOP | Stop. Stops the acquisition system and freezes the last acquired waveform on screen. | None |
| Command | What it does | Arguments |
|---|---|---|
| :SINGle | Single Trigger. Arms the oscilloscope for a single acquisition and stops after the trigger occurs. | None |
| Command | What it does | Arguments |
|---|---|---|
| :CDISplay | Clear Display. Clears the display and resets all associated measurements. | None |
| Command | What it does | Arguments |
|---|---|---|
| :ASTate? | Get Acquisition State. Returns the acquisition state (ARM, TRIG, ATRIG or ADONE). | None |
| Command | What it does | Arguments |
|---|---|---|
| :RSTate? | Get Run State. Returns the run state of the oscilloscope (RUN, STOP or SING). | None |
| Command | What it does | Arguments |
|---|---|---|
| :VIEW <Source> | Show Channel. Turns on the display of the specified waveform source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| Command | What it does | Arguments |
|---|---|---|
| :BLANk <Source> | Hide Channel. Turns off the display of the specified waveform source. | Text: CHANnel1,CHANnel2,CHANnel3,CHANnel4 |
| 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 measurement to a variable | Text |
| Command | What it does | Arguments |
|---|---|---|
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial number, firmware version). | None |
| *RST | Reset. Restores the oscilloscope to its factory default state. | None |
| *CLS | Clear Status. Clears all event registers and the error queue. | None |
| *TST? | Self Test. Runs the internal self-test and returns 0 for pass or a non-zero code for failure. | None |
| *OPC? | Operation Complete. Returns 1 when all pending operations are complete. | None |
| *WAI | Wait To Continue. Waits until all pending operations are complete before executing the next command. | None |
| *TRG | Trigger Bus. Generates a bus trigger, equivalent to sending the :DIGitize command. | None |
| *ESR? | Get Event Status. Reads and clears the standard event status register. | None |
| *STB? | Get Status Byte. Reads the status byte register. | None |
| *OPT? | Get Options. Returns a comma-separated list of the licences and options installed in the oscilloscope. | None |
| *SAV <Register> | Save Setup. Stores the current oscilloscope setup in the specified save/recall register. | Number |
| *RCL <Register> | Recall Setup. Recalls a previously stored oscilloscope setup from the specified register. | Number |
This reference is generated from TestFlow's instrument library, which is drafted from Keysight's programming documentation for the MSOS104A and MSOS254A and checked when the agent runs it. Ranges, timing, and option-dependent commands are defined by Keysight's programming manual: check it before you rely on an edge case. Last updated November 12, 2026.
Yes. The Keysight MSOS104A accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 159 SCPI commands for it: 60 queries that read values or state, and 99 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?, :AUToscale and :MEASure:RESults?.
:MEASure:RESults? (get measure results). Returns the results of the continuously displayed measurements as a comma-separated list. 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 Keysight MSOS104A 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.