The Teledyne LeCroy HDO6054B oscilloscope is controlled remotely with SCPI commands. TestFlow's instrument library holds 78 commands for it, 38 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 HDO6054B on a real bench.
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 Teledyne LeCroy HDO6054B's VISA address
# Paste the address of your Teledyne LeCroy HDO6054B (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("VBS 'app.SaveRecall.Setup.DoRecallDefaultPanelWithTriggerModeAuto'") # Recall Default Setup
print(inst.query("CMR?")) # Read Command Error
inst.close()Describe the test in a sentence, for example “recall default setup on the HDO6054B, then read command error 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.
78 commands in 25 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values.
| Command | What it does | Arguments |
|---|---|---|
| <Channel>:AUTO_SETUP FIND | Auto Setup Channel. Auto-setup the gain and offset of this channel only (manual PDF p.218). | Text: C1,C2,C3,C4 |
| <Channel>:TRACE <State> | Set Channel Display. Show or hide a channel's trace; displaying more than four waveforms is an environment error (manual PDF p.290). | Text: C1,C2,C3,C4; Text: ON,OFF |
| <Channel>:TRACE? | Read Channel Display. Return ON or OFF (manual PDF p.290). | Text: C1,C2,C3,C4 |
| <Channel>:VOLT_DIV <Volts_Per_Div> | Set Volts Per Div. Vertical sensitivity in V/div, probe attenuation included; an out-of-range value sets the VAB bit (manual PDF p.243). Ranges from the HDO6000B datasheet. | Text: C1,C2,C3,C4; Number: V/div e.g. 0.5 (1 mV to 1 V/div at 50 ohm, 1 mV to 10 V/div at 1 Mohm) |
| <Channel>:VOLT_DIV? | Read Volts Per Div. Return the channel's sensitivity in V/div (manual PDF p.243). | Text: C1,C2,C3,C4 |
| <Channel>:OFFSET <Offset> | Set Offset. Vertical offset at the probe tip in volts, attenuation included; the maximum depends on the sensitivity (manual PDF p.226), e.g. +/-10 V from 20 mV to 1 V/div at 50 ohm (HDO6000B datasheet). | Text: C1,C2,C3,C4; Number: volts e.g. -0.3 (the range depends on the V/div) |
| <Channel>:OFFSET? | Read Offset. Return the channel's offset in volts (manual PDF p.226). | Text: C1,C2,C3,C4 |
| <Channel>:COUPLING <Coupling> | Set Coupling. Input coupling: D50 (DC 50 ohm), D1M (DC 1 Mohm), A1M (AC 1 Mohm) or GND (manual PDF p.222); AC is 1 Mohm only on the HDO6054B (HDO6000B datasheet). | Text: C1,C2,C3,C4; Text: D50,D1M,A1M,GND |
| <Channel>:COUPLING? | Read Coupling. Return A1M, D1M, D50 or GND, or OVL when an overload in DC 50 ohm has disconnected the input (manual PDF p.222). | Text: C1,C2,C3,C4 |
| <Channel>:ATTENUATION <Factor> | Set Attenuation. The probe's vertical attenuation factor (manual PDF p.219). | Text: C1,C2,C3,C4; Number: 1,2,5,10,20,25,50,100,200,500,1000,10000 |
| <Channel>:ATTENUATION? | Read Attenuation. Return the channel's attenuation factor (manual PDF p.219). | Text: C1,C2,C3,C4 |
| <Channel>:PROBE_NAME? | Read Probe Name. Return the connected probe's name; a passive probe is named by its attenuation factor (manual PDF p.317). | Text: C1,C2,C3,C4 |
| <Source>:TRIG_LEVEL <Level>V | Set Trigger Level. Trigger level of a source in volts; an out-of-range value is set to the closest legal one (manual PDF p.235). Level ranges from the HDO6000B datasheet. | Text: C1,C2,C3,C4,EX,EX10; Number: volts e.g. 0.5 (EX +/-0.4 V, EX10 +/-4 V, a channel +/-4.1 div from center) |
| <Source>:TRIG_LEVEL? | Read Trigger Level. Return the source's trigger level (manual PDF p.235). | Text: C1,C2,C3,C4,EX,EX10 |
| <Source>:TRIG_SLOPE <Slope> | Set Trigger Slope. Trigger slope of a source: POS (rising) or NEG (falling) (manual PDF p.242). | Text: C1,C2,C3,C4,EX,EX10; Text: POS,NEG |
| <Source>:TRIG_SLOPE? | Read Trigger Slope. Return POS or NEG (manual PDF p.242). | Text: C1,C2,C3,C4,EX,EX10 |
| <Source>:TRIG_COUPLING <Coupling> | Set Trigger Coupling. Coupling of the trigger path only (the input's is Set_Coupling): DC, AC, HFREJ (high-frequency reject) or LFREJ (low-frequency reject) (manual PDF p.232). | Text: C1,C2,C3,C4,EX,EX10; Text: DC,AC,HFREJ,LFREJ |
| <Source>:TRIG_COUPLING? | Read Trigger Coupling. Return DC, AC, HFREJ or LFREJ (manual PDF p.232). | Text: C1,C2,C3,C4,EX,EX10 |
| <Channel>:PAVA? <Parameter> | Measure Parameter. Return <parameter>,<value>,<state> for a measurement of the channel, e.g. RISE,3.6E-9S,OK; the trace need not be displayed. The parameter is a mnemonic of the manual's table: AMPL, AREA, BASE, DLY, DUTY, FALL, FALL82, FREQ, MAX, MEAN, MIN, OVSN, OVSP, PER, PKPK, RISE, RISE28, RMS, SDEV, TOP, WID or WIDN (manual PDF p.272, mnemonics p.262-263). | Text: C1,C2,C3,C4; Text |
| <Channel>:PAVA? ALL | Measure All Parameters. Return every standard voltage and time parameter of the channel, each with its value and state (manual PDF p.272). | Text: C1,C2,C3,C4 |
| <Trace>:CURSOR_SET <Cursor>,<Position> | Set Cursor Position. Place a cursor on a trace that is turned on (manual PDF p.255). | Text: C1,C2,C3,C4; Text: HABS,HREF,HDIF,VABS,VREF,VDIF; Number: DIV, 0 to 10 horizontal or -3.99 to 3.99 vertical |
| <Trace>:CURSOR_VALUE? <Mode> | Read Cursor Value. Return the cursor readings for one mode; the trace must be on and that cursor mode set with Set_Cursor_Measure, else UNDEF (manual PDF p.257). | Text: C1,C2,C3,C4; Text: HABS,HREL,VABS,VREL |
| <Function>:DEFINE EQN,'<Equation>' | Define Function. Set math function F1 or F2 to an equation, e.g. AVG(C1) or C1*C2; only operators the instrument has (manual PDF p.295). F1 and F2 are the math traces the HDO6000B operator's manual names. | Text: F1,F2; Text |
| <Function>:DEFINE? | Read Function Definition. Return the math function's equation and parameters (manual PDF p.295). | Text: F1,F2 |
| <Function>:FUNCTION_RESET | Reset Function. Reset a math function: its sweeps go to zero and it restarts (manual PDF p.303). | Text: F1,F2 |
| <Trace>:INSPECT? '<Item>' | Inspect Waveform. Read part of an acquired waveform as text: a logical block such as SIMPLE (the data values) or TRIGTIME, or a WAVEDESC variable such as VERTICAL_GAIN; limit the points with Set_Waveform_Points (manual PDF p.346, SIMPLE p.194). | Text: C1,C2,C3,C4; Text |
| Command | What it does | Arguments |
|---|---|---|
| TRIG_MODE <Mode> | Set Trigger Mode. Trigger mode: AUTO, NORM (normal), SINGLE or STOP (manual PDF p.236). | Text: AUTO,NORM,SINGLE,STOP |
| TRIG_MODE? | Read Trigger Mode. Return AUTO, NORM, SINGLE or STOP (manual PDF p.236). | None |
| TRIG_DELAY <Delay> | Set Trigger Delay. Horizontal (trigger) delay: 0 puts the trigger at the grid center; negative down to -10,000 x time/div, positive up to +10 x time/div, and a value outside is set to the nearest limit (manual PDF p.233). | Number: seconds e.g. -0.001 (from -10,000 to +10 times the time/div) |
| TRIG_DELAY? | Read Trigger Delay. Return the trigger time with respect to the first acquired data point (manual PDF p.233). | None |
| TRIG_SELECT EDGE,SR,<Source> | Set Edge Trigger. Edge trigger on a channel, the external input (EX), external divided by 10 (EX10) or the line (manual PDF p.238); sources from the HDO6000B datasheet. | Text: C1,C2,C3,C4,EX,EX10,LINE |
| TRIG_SELECT? | Read Trigger Select. Return the trigger type, its source and any hold-off settings (manual PDF p.238). | None |
| Command | What it does | Arguments |
|---|---|---|
| COMM_HEADER <Mode> | Set Comm Header. Query response format: SHORT (the default) starts with the short header, LONG with the long one, OFF drops headers and units (manual PDF p.248). | Text: OFF,SHORT,LONG |
| COMM_HEADER? | Read Comm Header. Return SHORT, LONG or OFF (manual PDF p.248). | None |
| COMM_FORMAT DEF9,<Data_Type>,BIN | Set Waveform Format. Waveform data as 8-bit (BYTE, high-order bits only) or 16-bit (WORD, the power-on default) signed integers in a DEF9 binary block (manual PDF p.246). | Text: BYTE,WORD |
| COMM_FORMAT? | Read Waveform Format. Return <block_format>,<data_type>,<encoding> (manual PDF p.246). | None |
| COMM_ORDER <Order> | Set Byte Order. Waveform byte order: HI sends the most significant byte first (the default), LO the least (manual PDF p.251). | Text: HI,LO |
| Command | What it does | Arguments |
|---|---|---|
| VBS 'app.SaveRecall.Setup.DoRecallDefaultPanelWithTriggerModeAuto' | Recall Default Setup. Recall the factory default panel with the trigger in AUTO, as the front panel's Recall Default button does (*RST leaves it in STOP) (manual PDF p.321). | None |
| VBS '<Command>' | Send Automation Command. Send a MAUI Automation command in single quotes, e.g. app.Acquisition.C1.VerScale = 0.5; MAUI Studio Browser shows the hierarchy (manual PDF p.245). | Text |
| VBS? 'Return=<Command>' | Read Automation Value. Read a MAUI Automation value, e.g. app.Acquisition.C1.VerScale (manual PDF p.245). | Text |
| Command | What it does | Arguments |
|---|---|---|
| PARAMETER_CUSTOM <Slot>,<Measurement>,<Source> | Set Custom Parameter. Set a My Measure slot to a measurement of a channel; the measurement is a mnemonic of the manual's table, e.g. PKPK, FREQ or RISE (manual PDF p.261, mnemonics p.262-263). | Number: slot 1 to n (P1 to Pn) e.g. 1; Text; Text: C1,C2,C3,C4 |
| PARAMETER_CLEAR | Clear Parameters. Clear every parameter in the My Measure and Pass/Fail sets (manual PDF p.260). | None |
| PARAMETER_DELETE <Slot> | Delete Parameter. Delete one parameter from the My Measure or Pass/Fail table (manual PDF p.268). | Number: slot 1 to x e.g. 1 |
| Command | What it does | Arguments |
|---|---|---|
| WAVEFORM_SETUP SP,<Sparsing>,NP,<Points>,FP,<First_Point> | Set Waveform Points. How much of a waveform is transferred: sparsing interval, number of points and first point; all 0 after power-on (manual PDF p.354). | Number: sparsing e.g. 4 (0 or 1 sends every point, 4 every 4th); Number: points e.g. 1000 (0 sends all); Number: first point address e.g. 0 (0 is the first) |
| WAVEFORM_SETUP SN,<Segment> | Set Waveform Segment. Which segment of a sequence-mode acquisition is transferred; ignored for a waveform that is not segmented (manual PDF p.354). | Number: segment e.g. 1 (0 sends all segments) |
| WAVEFORM_SETUP? | Read Waveform Setup. Return SP,<sparsing>,NP,<number>,FP,<first point>,SN,<segment> (manual PDF p.354). | None |
| Command | What it does | Arguments |
|---|---|---|
| TIME_DIV <Time_Per_Div> | Set Timebase. Timebase in seconds per division; an out-of-range value sets the VAB bit (bit 2) of the STB register (manual PDF p.231). | Number: s/div e.g. 0.002 (NS, US, MS, S or KS may be appended) |
| TIME_DIV? | Read Timebase. Return the timebase in s/div (manual PDF p.231). | None |
| Command | What it does | Arguments |
|---|---|---|
| SEQUENCE <Mode>,<Segments>,<Max_Size> | Set Sequence. Sequence (segmented) acquisition; ON enables SMART memory with that number of segments and maximum segment size, adapted to the closest valid value (manual PDF p.229). Up to 30,000 segments at the standard 50 Mpts/ch (HDO6000B datasheet). | Text: ON,OFF; Number: segments e.g. 100; Number: points per segment e.g. 10e+3 |
| SEQUENCE? | Read Sequence. Return <mode>,<number segments>,<max_size> (manual PDF p.229). | None |
| Command | What it does | Arguments |
|---|---|---|
| BANDWIDTH_LIMIT <Channel>,<Limit> | Set Bandwidth Limit. Bandwidth-limit filter per channel: OFF (full bandwidth), 20MHZ or 200MHZ (manual PDF p.220), the HDO6054B's two limiters (HDO6000B datasheet). | Text: C1,C2,C3,C4; Text: OFF,20MHZ,200MHZ |
| BANDWIDTH_LIMIT? | Read Bandwidth Limit. Return <channel>,<mode> for each channel (manual PDF p.220). | None |
| Command | What it does | Arguments |
|---|---|---|
| CURSOR_MEASURE <Mode> | Set Cursor Measure. What to display: CUST (My Measure), HPAR or VPAR (standard horizontal or vertical parameters), HABS, HREL, VABS or VREL cursors, PASS or FAIL results, or OFF (manual PDF p.252). | Text: CUST,HPAR,VPAR,HABS,HREL,VABS,VREL,PASS,FAIL,OFF |
| CURSOR_MEASURE? | Read Cursor Measure. Return the cursor or parameter display mode (manual PDF p.252). | None |
| Command | What it does | Arguments |
|---|---|---|
| CMR? | Read Command Error. Read and clear the Command Error Register: the last syntax error, a code from 0 to 13 (manual PDF p.326). | None |
| Command | What it does | Arguments |
|---|---|---|
| EXR? | Read Execution Error. Read and clear the Execution Error Register: the last execution error, a code from 21 to 64 (manual PDF p.331). | None |
| Command | What it does | Arguments |
|---|---|---|
| DDR? | Read Device Error. Read and clear the Device Dependent Error Register: hardware failures and channel overloads, 0 to 65535 (manual PDF p.327). | None |
| Command | What it does | Arguments |
|---|---|---|
| INR? | Read Internal State. Read and clear the Internal State Change Register, which records completed internal operations, 0 to 65535 (manual PDF p.334). | None |
| Command | What it does | Arguments |
|---|---|---|
| ARM_ACQUISITION | Arm Acquisition. Arm the scope; forces a single acquisition if it is already armed (manual PDF p.217). | None |
| Command | What it does | Arguments |
|---|---|---|
| STOP | Stop Acquisition. Stop acquiring at once; from AUTO or NORM the trigger mode becomes Stopped (manual PDF p.230). | None |
| Command | What it does | Arguments |
|---|---|---|
| FORCE_TRIGGER | Force Trigger. Make one acquisition when the trigger mode is active; no action in Stop mode (manual PDF p.223). | None |
| Command | What it does | Arguments |
|---|---|---|
| WAIT <Timeout> | Wait For Acquisition. Analyze no new command until the current acquisition completes, or until the timeout in seconds runs out (manual PDF p.244). | Number: seconds e.g. 5 (0 waits indefinitely) |
| Command | What it does | Arguments |
|---|---|---|
| AUTO_SETUP | Auto Setup. Adjust vertical, timebase and trigger to display the input signals; works on the channels that are on, or on all channels if none is (manual PDF p.218). | None |
| Command | What it does | Arguments |
|---|---|---|
| CLEAR_SWEEPS | Clear Sweeps. Restart the cumulative processing: averages, extrema, FFT power average, histograms, parameter statistics, Pass/Fail counters and persistence (manual PDF p.294). | None |
| Command | What it does | Arguments |
|---|---|---|
| MEMORY_SIZE <Points> | Set Memory Size. Maximum memory length per acquisition; the scope adapts to the closest valid size (manual PDF p.225). The HDO6054B has 50 Mpts/ch as standard and 100 or 250 Mpts/ch with a memory option (HDO6000B datasheet). | Number: points e.g. 1e+6 (the scope adapts to the closest valid size) |
| Command | What it does | Arguments |
|---|---|---|
| MSIZ? | Read Memory Size. Return the current maximum memory length (manual PDF p.225). | None |
| Command | What it does | Arguments |
|---|---|---|
| PACU? <Slot> | Read Custom Parameter. Return the slot's setup: <slot>,<measurement>,<qualifiers> (manual PDF p.261). | Number: slot 1 to n e.g. 1 |
| Command | What it does | Arguments |
|---|---|---|
| TEMPLATE? | Read Waveform Template. Return the waveform template that describes the descriptor's variables, the latest version when none is given (manual PDF p.351). | None |
| Command | What it does | Arguments |
|---|---|---|
| *IDN? | Identify. Return LECROY,<model>,<serial number>,<firmware level>, preceded by the *IDN header unless COMM_HEADER is OFF (manual PDF p.312). | None |
| *RST | Reset. Device reset: every trace to the GND line, the factory default panel setup recalled and the trigger in STOP mode (manual PDF p.321). | None |
| *CLS | Clear Status. Clear all status data registers (manual PDF p.325). | None |
| *OPT? | Read Options. Return the installed software and hardware options beyond the standard configuration, as a series of fields (manual PDF p.313). | None |
| *TST? | Self Test. Run the internal self-test of all channels, the timebase and the trigger circuits; 0 means no failure (manual PDF p.314). | None |
| *OPC? | Operation Complete. Return 1 once every previous command has finished executing; the manual's way to synchronize, e.g. ARM_ACQUISITION then WAIT then *OPC? (manual PDF p.337). | None |
| *STB? | Read Status Byte. Return the Status Byte Register (bits 0 to 5 and 7) with the Master Summary Status in bit 6 (manual PDF p.340). | None |
| *ESR? | Read Event Status. Read and clear the Event Status Register: the sum of its bits 0 to 7 (manual PDF p.329). | None |
| *SAV <Setup> | Save Setup. Store the current state in a non-volatile setup panel (manual PDF p.322). | Number: setup panel 1 to x (the highest panel on the instrument), e.g. 1 |
| *RCL <Setup> | Recall Setup. Recall a non-volatile setup panel; 0 is the factory default panel setup (manual PDF p.319). | Number: setup panel 0 to x, e.g. 1 (0 is the factory default) |
This reference is generated from TestFlow's instrument library, which is drafted from Teledyne LeCroy's programming documentation for the HDO6054B and checked when the agent runs it. The library marks this instrument as supporting *OPC? for operation-complete synchronisation. Ranges, timing, and option-dependent commands are defined by Teledyne LeCroy's programming manual: check it before you rely on an edge case. Last updated October 26, 2026.
Yes. The Teledyne LeCroy HDO6054B accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 78 SCPI commands for it: 38 queries that read values or state, and 40 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?, VBS 'app.SaveRecall.Setup.DoRecallDefaultPanelWithTriggerModeAuto' and CMR?.
CMR? (read command error). Read and clear the Command Error Register: the last syntax error, a code from 0 to 13 (manual PDF p.326). 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 Teledyne LeCroy HDO6054B 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.