Multimeter · SCPI command reference

Keysight 34401A SCPI commands

The Keysight 34401A multimeter is controlled remotely with SCPI commands. TestFlow's instrument library holds 94 commands for it, 27 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 34401A on a real bench.

Commands
94
Queries
27
Subsystems
17
Models covered
1

Control the Keysight 34401A 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 Keysight 34401A's VISA address

# Paste the address of your Keysight 34401A (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("CONFigure:CONTinuity")  # Conf Continuity
print(inst.query("MEASure:VOLTage:DC? AUTO,MIN"))  # Measure DCV

inst.close()

Run a 34401A test without writing code

Describe the test in a sentence, for example “conf continuity on the 34401A, then measure dcv 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

94 commands in 17 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values.

Sense (SENSe) (25)

CommandWhat it doesArguments
SENSe:FUNCtion "<Function>"Set Function. Selects the active measurement function using the SENSe function name.Text: VOLTage:DC,VOLTage:DC:RATio,VOLTage:AC,CURRent:DC,CURRent:AC,RESistance,FRESistance,FREQuency,PERiod,CONTinuity,DIODe
SENSe:FUNCtion?Read Function. Returns the present measurement function as a quoted string.None
SENSe:VOLTage:DC:RANGe <Range>Set DCV Range. Sets the manual range for DC voltage measurements.Text: MIN,MAX,DEF,100mV,1V,10V,100V,1000V
SENSe:VOLTage:AC:RANGe <Range>Set ACV Range. Sets the manual range for AC voltage measurements.Text: MIN,MAX,DEF,100mV,1V,10V,100V,750V
SENSe:CURRent:DC:RANGe <Range>Set DCI Range. Sets the manual range for DC current measurements.Text: MIN,MAX,DEF,0.01,0.1,1,3
SENSe:CURRent:AC:RANGe <Range>Set ACI Range. Sets the manual range for AC current measurements.Text: MIN,MAX,DEF,1,3
SENSe:RESistance:RANGe <Range>Set 2W Res Range. Sets the manual range for 2-wire resistance measurements.Text: MIN,MAX,DEF,100,1E3,10E3,100E3,1E6,10E6,100E6
SENSe:FRESistance:RANGe <Range>Set 4W Res Range. Sets the manual range for 4-wire resistance measurements.Text: MIN,MAX,DEF,100,1E3,10E3,100E3,1E6,10E6,100E6
SENSe:VOLTage:DC:RANGe:AUTO ONDCV Autorange On. Enables autoranging for DC voltage measurements.None
SENSe:VOLTage:DC:RANGe:AUTO OFFDCV Autorange Off. Disables autoranging for DC voltage measurements.None
SENSe:VOLTage:AC:RANGe:AUTO ONACV Autorange On. Enables autoranging for AC voltage measurements.None
SENSe:VOLTage:AC:RANGe:AUTO OFFACV Autorange Off. Disables autoranging for AC voltage measurements.None
SENSe:CURRent:DC:RANGe:AUTO ONDCI Autorange On. Enables autoranging for DC current measurements.None
SENSe:CURRent:DC:RANGe:AUTO OFFDCI Autorange Off. Disables autoranging for DC current measurements.None
SENSe:RESistance:RANGe:AUTO ONRes Autorange On. Enables autoranging for 2-wire resistance measurements.None
SENSe:RESistance:RANGe:AUTO OFFRes Autorange Off. Disables autoranging for 2-wire resistance measurements.None
SENSe:VOLTage:DC:NPLCycles <NPLC>Set DCV NPLC. Sets the integration time in number of power line cycles for DC voltage measurements.Text: 0.02,0.2,1,10,100,MIN,MAX
SENSe:CURRent:DC:NPLCycles <NPLC>Set DCI NPLC. Sets the integration time in number of power line cycles for DC current measurements.Text: 0.02,0.2,1,10,100,MIN,MAX
SENSe:RESistance:NPLCycles <NPLC>Set 2W Res NPLC. Sets the integration time in number of power line cycles for 2-wire resistance measurements.Text: 0.02,0.2,1,10,100,MIN,MAX
SENSe:FRESistance:NPLCycles <NPLC>Set 4W Res NPLC. Sets the integration time in number of power line cycles for 4-wire resistance measurements.Text: 0.02,0.2,1,10,100,MIN,MAX
SENSe:VOLTage:DC:RESolution <Resolution>Set DCV Resolution. Sets the measurement resolution for DC voltage measurements.Text: MIN,MAX,DEF
SENSe:DETector:BANDwidth 3ACV Filter 3Hz. Sets the AC voltage filter bandwidth to 3 Hz (slow).None
SENSe:DETector:BANDwidth 20ACV Filter 20Hz. Sets the AC voltage filter bandwidth to 20 Hz (medium).None
SENSe:DETector:BANDwidth 200ACV Filter 200Hz. Sets the AC voltage filter bandwidth to 200 Hz (fast).None
SENSe:ZERO:AUTO <State>Set AutoZero. Enables or disables the autozero mode for DC voltage measurements.Text: ON,OFF,ONCE

Calculate (CALCulate) (14)

CommandWhat it doesArguments
CALCulate:STATe ONMath Null On. Enables the scaling (null/dB/dBm) math operation on measurements.None
CALCulate:STATe OFFMath Null Off. Disables the scaling math operation on measurements.None
CALCulate:FUNCtion <Function>Set Scale Function. Selects the scaling function applied to measurements.Text: NULL,DB,DBM,AVERage,LIMit
CALCulate:NULL:OFFSet <Reference>Set Null Reference. Sets the reference (null) value used by the scaling function.Text: MIN,MAX
CALCulate:DB:REFerence <Reference>Set dBm Reference. Sets the relative dB reference value in dBm.Text: MIN,MAX
CALCulate:DBM:REFerence <Resistance>Set dBm Resistance. Sets the reference resistance in ohms used for dBm calculations.Text: MIN,MAX
CALCulate:FUNCtion AVERage;:CALCulate:STATe ONStats On. Enables the statistics (min/max/average/standard deviation) math operation.None
CALCulate:AVERage:MINimum?Stat Min. Returns the minimum value of all readings since statistics were enabled.None
CALCulate:AVERage:MAXimum?Stat Max. Returns the maximum value of all readings since statistics were enabled.None
CALCulate:AVERage:AVERage?Stat Average. Returns the average of all readings since statistics were enabled.None
CALCulate:AVERage:COUNt?Stat Count. Returns the number of readings included in the statistics.None
CALCulate:FUNCtion LIMit;:CALCulate:STATe ONLimit On. Enables the limit (pass/fail) test math operation.None
CALCulate:LIMit:LOWer <Lower>Set Limit Lower. Sets the lower limit for the limit test.Text: MIN,MAX,DEF
CALCulate:LIMit:UPPer <Upper>Set Limit Upper. Sets the upper limit for the limit test.Text: MIN,MAX,DEF

Configure (CONFigure) (11)

CommandWhat it doesArguments
CONFigure:VOLTage:DC <Range>,<Resolution>Conf DCV. Configures the instrument for DC voltage measurement with the given range and resolution.Text: AUTO,MIN,MAX,DEF,100mV,1V,10V,100V,1000V; Text: MIN,MAX,DEF
CONFigure:VOLTage:AC <Range>,<Resolution>Conf ACV. Configures the instrument for AC voltage measurement with the given range and resolution.Text: AUTO,MIN,MAX,DEF,100mV,1V,10V,100V,750V; Text: MIN,MAX,DEF
CONFigure:CURRent:DC <Range>,<Resolution>Conf DCI. Configures the instrument for DC current measurement with the given range and resolution.Text: MIN,MAX,DEF,0.01,0.1,1,3; Text: MIN,MAX,DEF
CONFigure:CURRent:AC <Range>,<Resolution>Conf ACI. Configures the instrument for AC current measurement with the given range and resolution.Text: MIN,MAX,DEF,1,3; Text: MIN,MAX,DEF
CONFigure:RESistance <Range>,<Resolution>Conf 2W Resistance. Configures the instrument for 2-wire resistance measurement with the given range and resolution.Text: MIN,MAX,DEF,100,1E3,10E3,100E3,1E6,10E6,100E6; Text: MIN,MAX,DEF
CONFigure:FRESistance <Range>,<Resolution>Conf 4W Resistance. Configures the instrument for 4-wire resistance measurement with the given range and resolution.Text: MIN,MAX,DEF,100,1E3,10E3,100E3,1E6,10E6,100E6; Text: MIN,MAX,DEF
CONFigure:FREQuency <Range>,<Resolution>Conf Frequency. Configures the instrument for frequency measurement with the given range and resolution.Text: AUTO,MIN,MAX,DEF; Text: MIN,MAX,DEF
CONFigure:PERiod <Range>,<Resolution>Conf Period. Configures the instrument for period measurement with the given range and resolution.Text: AUTO,MIN,MAX,DEF; Text: MIN,MAX,DEF
CONFigure:CONTinuityConf Continuity. Configures the instrument for continuity measurement.None
CONFigure:DIODeConf Diode. Configures the instrument for diode test measurement.None
CONFigure?Read Conf. Returns the present function and configuration as a quoted string.None

Measurement (MEASure) (10)

CommandWhat it doesArguments
MEASure:VOLTage:DC? <Range>,<Resolution>Measure DCV. Configures and returns a one-shot DC voltage measurement in volts.Text: AUTO,MIN,MAX,DEF; Text: MIN,MAX,DEF
MEASure:VOLTage:AC? <Range>,<Resolution>Measure ACV. Configures and returns a one-shot AC voltage measurement in volts.Text: AUTO,MIN,MAX,DEF; Text: MIN,MAX,DEF
MEASure:CURRent:DC? <Range>,<Resolution>Measure DCI. Configures and returns a one-shot DC current measurement in amps.Text: AUTO,MIN,MAX,DEF; Text: MIN,MAX,DEF
MEASure:CURRent:AC? <Range>,<Resolution>Measure ACI. Configures and returns a one-shot AC current measurement in amps.Text: AUTO,MIN,MAX,DEF; Text: MIN,MAX,DEF
MEASure:RESistance? <Range>,<Resolution>Measure 2W Resistance. Configures and returns a one-shot 2-wire resistance measurement in ohms.Text: AUTO,MIN,MAX,DEF; Text: MIN,MAX,DEF
MEASure:FRESistance? <Range>,<Resolution>Measure 4W Resistance. Configures and returns a one-shot 4-wire resistance measurement in ohms.Text: AUTO,MIN,MAX,DEF; Text: MIN,MAX,DEF
MEASure:FREQuency? <Range>,<Resolution>Measure Frequency. Configures and returns a one-shot frequency measurement in Hz.Text: AUTO,MIN,MAX,DEF; Text: MIN,MAX,DEF
MEASure:PERiod? <Range>,<Resolution>Measure Period. Configures and returns a one-shot period measurement in seconds.Text: AUTO,MIN,MAX,DEF; Text: MIN,MAX,DEF
MEASure:CONTinuity?Measure Continuity. Configures and returns a one-shot continuity measurement in ohms.None
MEASure:DIODe?Measure Diode. Configures and returns a one-shot diode test measurement in volts.None

System (SYSTem) (7)

CommandWhat it doesArguments
SYSTem:BEEPer:STATe ONBeeper On. Enables the beeper for continuity and other audible alerts.None
SYSTem:BEEPer:STATe OFFBeeper Off. Disables the beeper.None
SYSTem:BEEPerBeep. Issues a single beep from the instrument.None
SYSTem:ERRor?Read Error. Reads and clears one error from the error queue (returns 0,"No error" if empty).None
SYSTem:VERSion?Read SCPI Version. Returns the SCPI version to which the instrument complies.None
SYSTem:LOCalLocal. Returns the instrument to local (front-panel) control.None
SYSTem:REMoteRemote. Places the instrument in remote control and disables front-panel keys except Local.None

Trigger (TRIGger) (6)

CommandWhat it doesArguments
TRIGger:SOURce <Source>Set Trigger Source. Selects the trigger source for measurements.Text: IMMediate,EXTernal,BUS
TRIGger:SOURce?Read Trigger Source. Returns the present trigger source.None
TRIGger:COUNt <Count>Set Trigger Count. Sets the number of triggers accepted before returning to the idle state.Text: MIN,MAX,DEF,INF
TRIGger:DELay <Seconds>Set Trigger Delay. Sets the delay between the trigger signal and the first measurement.Text: MIN,MAX,DEF
TRIGger:DELay:AUTO ONTrigger Delay Auto On. Enables automatic trigger delay based on function and range.None
TRIGger:DELay:AUTO OFFTrigger Delay Auto Off. Disables automatic trigger delay.None

Display (DISPlay) (4)

CommandWhat it doesArguments
DISPlay:STATe ONDisplay On. Turns the front-panel display on.None
DISPlay:STATe OFFDisplay Off. Turns the front-panel display off.None
DISPlay:TEXT "<Message>"Set Display Text. Displays the specified text message on the front-panel display.Text
DISPlay:TEXT:CLEarClear Display Text. Clears the text message shown on the front-panel display.None

INP subsystem (2)

CommandWhat it doesArguments
INPut:IMPedance:AUTO <State>Set DCV Impedance. Enables or disables automatic input impedance selection for DC voltage (OFF gives fixed 10 MOhm).Text: ON,OFF
INPut:IMPedance:AUTO?Read DCV Impedance. Returns the automatic input impedance state for DC voltage measurements.None

SAMP subsystem (2)

CommandWhat it doesArguments
SAMPle:COUNt <Count>Set Sample Count. Sets the number of measurements taken per trigger.Text: MIN,MAX,DEF
SAMPle:COUNt?Read Sample Count. Returns the number of measurements taken per trigger.None

Initiate (INITiate) (1)

CommandWhat it doesArguments
INITiateInit. Places the instrument in the wait-for-trigger state and stores readings in memory when triggered.None

Read (READ) (1)

CommandWhat it doesArguments
READ?Read. Starts a new measurement and returns the reading directly without storing it in reading memory.None

Fetch (FETCh) (1)

CommandWhat it doesArguments
FETCh?Fetch. Returns measurements stored in reading memory by the INITiate command.None

DATA subsystem (1)

CommandWhat it doesArguments
DATA:POINts?Data Points. Returns the total number of measurements currently stored in reading memory.None

Other subsystem (1)

CommandWhat it doesArguments
<Output Variable>=<Equation>Math. Variable equals an equation like (${Var_name}= ${Var_name}/2)Number; Text

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 measurement to a variableText

IEEE 488.2 common commands (6)

CommandWhat it doesArguments
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).None
*RSTReset. Resets the instrument to its factory default state.None
*CLSClear Status. Clears all event registers and the error queue.None
*TST?Self Test. Runs the self-test and returns 0 for pass or 1 for failure.None
*OPC?Operation Complete. Returns 1 when all pending operations are complete.None
*TRGTrigger Bus. Generates a bus trigger when the instrument is in the wait-for-trigger state with BUS source.None

Where these commands come from

This reference is generated from TestFlow's instrument library, which is drafted from Keysight's programming documentation for the 34401A 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 17, 2026.

Frequently asked questions

Does the Keysight 34401A support SCPI remote control?

Yes. The Keysight 34401A accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 94 SCPI commands for it: 27 queries that read values or state, and 67 settings and actions.

How do I control the Keysight 34401A 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?, CONFigure:CONTinuity and MEASure:VOLTage:DC? AUTO,MIN.

Which command reads a value from the Keysight 34401A?

MEASure:VOLTage:DC? AUTO,MIN (measure dcv). Configures and returns a one-shot DC voltage measurement in volts. The full list of queries is in the command reference on this page, grouped by subsystem.

Can I automate the Keysight 34401A 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 Keysight 34401A 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.