Keithley Drivers

Classes:

Keithley2000(name, address[, reset])

Driver for the Keithley 2000 multimeter.

Keithley2400(name, address, **kwargs)

QCoDeS driver for the Keithley 2400 voltage source.

Keithley2450(name, address, **kwargs)

The QCoDeS driver for the Keithley 2450 SMU

Keithley2450Buffer(parent, name[, size, style])

Treat the reading buffer as a submodule, similar to Sense and Source

Keithley2450Sense(parent, name, proper_function)

The sense module of the Keithley 2450 SMU.

Keithley2450Source(parent, name, proper_function)

The source module of the Keithley 2450 SMU.

Keithley2600MeasurementStatus(value[, ...])

Keeps track of measurement status.

Keithley2600(name, address, **kwargs)

This is the base class for all qcodes driver for the Keithley 2600 Source-Meter series.

Keithley2600Channel(parent, name, channel)

Class to hold the two Keithley channels, i.e. SMUA and SMUB.

Keithley2601B(name, address, **kwargs)

QCoDeS driver for the Keithley 2601B Source-Meter

Keithley2602A(name, address, **kwargs)

QCoDeS driver for the Keithley 2602A Source-Meter

Keithley2602B(name, address, **kwargs)

QCoDeS driver for the Keithley 2602B Source-Meter

Keithley2604B(name, address, **kwargs)

QCoDeS driver for the Keithley 2604B Source-Meter

Keithley2611B(name, address, **kwargs)

QCoDeS driver for the Keithley 2611B Source-Meter

Keithley2612B(name, address, **kwargs)

QCoDeS driver for the Keithley 2612B Source-Meter

Keithley2614B(name, address, **kwargs)

QCoDeS driver for the Keithley 2614B Source-Meter

Keithley2634B(name, address, **kwargs)

QCoDeS driver for the Keithley 2634B Source-Meter

Keithley2635B(name, address, **kwargs)

QCoDeS driver for the Keithley 2635B Source-Meter

Keithley2636B(name, address, **kwargs)

QCoDeS driver for the Keithley 2636B Source-Meter

Keithley3706A(name, address, **kwargs)

This is the QCoDeS instrument driver for the Keithley 3706A-SNFP System Switch.

Keithley6500(name, address[, reset_device])

Driver for the Keithley 6500 multimeter.

Keithley7510(name, address, **kwargs)

The QCoDeS driver for the Keithley 7510 DMM

Keithley7510Buffer(parent, name[, size, style])

Treat the reading buffer as a submodule, similar to Sense.

Keithley7510DigitizeSense(parent, name, ...)

The Digitize sense module of the Keithley 7510 DMM.

Keithley7510Sense(parent, name, ...)

The sense module of the Keithley 7510 DMM, based on the sense module of Keithley 2450 SMU.

KeithleyS46(name, address, **kwargs)

KeithleyS46RelayLock(relay_name)

The S46 either has six pole or a four pole relays.

Data:

Keithley26xx

Type alias for all Keithley 26xx SMUs supported by QCoDeS.

Exceptions:

Keithley3706AInvalidValue

Keithley3706AUnknownOrEmptySlot

Keithley6500CommandSetError

KeithleyS46LockAcquisitionError

class qcodes.instrument_drivers.Keithley.Keithley2000(name: str, address: str, reset: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

Driver for the Keithley 2000 multimeter.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

mode

Parameter mode

nplc

Parameter nplc

range

Parameter range

auto_range_enabled

Parameter auto_range_enabled

digits

Parameter digits

averaging_type

Parameter averaging_type

averaging_count

Parameter averaging_count

averaging_enabled

Parameter averaging_enabled

display_enabled

Parameter display_enabled

trigger_continuous

Parameter trigger_continuous

trigger_count

Parameter trigger_count

trigger_delay

Parameter trigger_delay

trigger_source

Parameter trigger_source

trigger_timer

Parameter trigger_timer

amplitude

Parameter amplitude

Methods:

trigger()

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

mode: Parameter = self.add_parameter( "mode", get_cmd="SENS:FUNC?", set_cmd="SENS:FUNC {}", val_mapping=self._mode_map, )

Parameter mode

nplc: Parameter = self.add_parameter( "nplc", get_cmd=partial(self._get_mode_param, "NPLC", float), set_cmd=partial(self._set_mode_param, "NPLC"), vals=Numbers(min_value=0.01, max_value=10), )

Parameter nplc

range: Parameter = self.add_parameter( "range", get_cmd=partial(self._get_mode_param, "RANG", float), set_cmd=partial(self._set_mode_param, "RANG"), vals=Numbers(), )

Parameter range

auto_range_enabled: Parameter = self.add_parameter( "auto_range_enabled", get_cmd=partial(self._get_mode_param, "RANG:AUTO", _parse_output_bool), set_cmd=partial(self._set_mode_param, "RANG:AUTO"), vals=Bool(), )

Parameter auto_range_enabled

digits: Parameter = self.add_parameter( "digits", get_cmd=partial(self._get_mode_param, "DIG", int), set_cmd=partial(self._set_mode_param, "DIG"), vals=Ints(min_value=4, max_value=7), )

Parameter digits

averaging_type: Parameter = self.add_parameter( "averaging_type", get_cmd=partial(self._get_mode_param, "AVER:TCON", _parse_output_string), set_cmd=partial(self._set_mode_param, "AVER:TCON"), vals=Enum("moving", "repeat"), )

Parameter averaging_type

averaging_count: Parameter = self.add_parameter( "averaging_count", get_cmd=partial(self._get_mode_param, "AVER:COUN", int), set_cmd=partial(self._set_mode_param, "AVER:COUN"), vals=Ints(min_value=1, max_value=100), )

Parameter averaging_count

averaging_enabled: Parameter = self.add_parameter( "averaging_enabled", get_cmd=partial(self._get_mode_param, "AVER:STAT", _parse_output_bool), set_cmd=partial(self._set_mode_param, "AVER:STAT"), vals=Bool(), )

Parameter averaging_enabled

display_enabled: Parameter = self.add_parameter( "display_enabled", get_cmd="DISP:ENAB?", get_parser=_parse_output_bool, set_cmd="DISP:ENAB {}", set_parser=int, vals=Bool(), )

Parameter display_enabled

trigger_continuous: Parameter = self.add_parameter( "trigger_continuous", get_cmd="INIT:CONT?", get_parser=_parse_output_bool, set_cmd="INIT:CONT {}", set_parser=int, vals=Bool(), )

Parameter trigger_continuous

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
trigger_count: Parameter = self.add_parameter( "trigger_count", get_cmd="TRIG:COUN?", get_parser=int, set_cmd="TRIG:COUN {}", vals=MultiType( Ints(min_value=1, max_value=9999), Enum("inf", "default", "minimum", "maximum"), ), )

Parameter trigger_count

trigger_delay: Parameter = self.add_parameter( "trigger_delay", get_cmd="TRIG:DEL?", get_parser=float, set_cmd="TRIG:DEL {}", unit="s", vals=Numbers(min_value=0, max_value=999999.999), )

Parameter trigger_delay

trigger_source: Parameter = self.add_parameter( "trigger_source", get_cmd="TRIG:SOUR?", set_cmd="TRIG:SOUR {}", val_mapping={ "immediate": "IMM", "timer": "TIM", "manual": "MAN", "bus": "BUS", "external": "EXT", }, )

Parameter trigger_source

trigger_timer: Parameter = self.add_parameter( "trigger_timer", get_cmd="TRIG:TIM?", get_parser=float, set_cmd="TRIG:TIM {}", unit="s", vals=Numbers(min_value=0.001, max_value=999999.999), )

Parameter trigger_timer

amplitude: Parameter = self.add_parameter( "amplitude", unit="arb.unit", get_cmd=self._read_next_value )

Parameter amplitude

trigger() None[source]
class qcodes.instrument_drivers.Keithley.Keithley2400(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

QCoDeS driver for the Keithley 2400 voltage source.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

rangev

Parameter rangev

rangei

Parameter rangei

compliancev

Parameter compliancev

compliancei

Parameter compliancei

volt

Sets voltage in 'VOLT' mode.

curr

Sets current in 'CURR' mode.

mode

Parameter mode

sense

Parameter sense

output

Parameter output

nplcv

Parameter nplcv

nplci

Parameter nplci

resistance

Measure resistance from current and voltage.

Methods:

reset()

Reset the instrument.

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

rangev: Parameter = self.add_parameter( "rangev", get_cmd="SENS:VOLT:RANG?", get_parser=float, set_cmd="SOUR:VOLT:RANG {:f}", label="Voltage range", )

Parameter rangev

rangei: Parameter = self.add_parameter( "rangei", get_cmd="SENS:CURR:RANG?", get_parser=float, set_cmd="SOUR:CURR:RANG {:f}", label="Current range", )

Parameter rangei

compliancev: Parameter = self.add_parameter( "compliancev", get_cmd="SENS:VOLT:PROT?", get_parser=float, set_cmd="SENS:VOLT:PROT {:f}", label="Voltage Compliance", )

Parameter compliancev

compliancei: Parameter = self.add_parameter( "compliancei", get_cmd="SENS:CURR:PROT?", get_parser=float, set_cmd="SENS:CURR:PROT {:f}", label="Current Compliance", )

Parameter compliancei

volt: Parameter = self.add_parameter( "volt", get_cmd=self._get_read_output_protected, get_parser=self._volt_parser, set_cmd=":SOUR:VOLT:LEV {:.8f}", label="Voltage", unit="V", docstring="Sets voltage in 'VOLT' mode. " "Get returns measured voltage if " "sensing 'VOLT' otherwise it returns " "setpoint value. " "Note that it is an error to read voltage with " "output off", )

Sets voltage in ‘VOLT’ mode. Get returns measured voltage if sensing ‘VOLT’ otherwise it returns setpoint value. Note that it is an error to read voltage with output off

curr: Parameter = self.add_parameter( "curr", get_cmd=self._get_read_output_protected, get_parser=self._curr_parser, set_cmd=":SOUR:CURR:LEV {:.8f}", label="Current", unit="A", docstring="Sets current in 'CURR' mode. " "Get returns measured current if " "sensing 'CURR' otherwise it returns " "setpoint value. " "Note that it is an error to read current with " "output off", )

Sets current in ‘CURR’ mode. Get returns measured current if sensing ‘CURR’ otherwise it returns setpoint value. Note that it is an error to read current with output off

mode: Parameter = self.add_parameter( "mode", vals=Enum("VOLT", "CURR"), get_cmd=":SOUR:FUNC?", set_cmd=self._set_mode_and_sense, label="Mode", )

Parameter mode

sense: Parameter = self.add_parameter( "sense", vals=Strings(), get_cmd=":SENS:FUNC?", set_cmd=':SENS:FUNC "{:s}"', label="Sense mode", )

Parameter sense

output: Parameter = self.add_parameter( "output", set_cmd=":OUTP:STAT {}", get_cmd=":OUTP:STAT?", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )

Parameter output

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
nplcv: Parameter = self.add_parameter( "nplcv", get_cmd="SENS:VOLT:NPLC?", get_parser=float, set_cmd="SENS:VOLT:NPLC {:f}", label="Voltage integration time", )

Parameter nplcv

nplci: Parameter = self.add_parameter( "nplci", get_cmd="SENS:CURR:NPLC?", get_parser=float, set_cmd="SENS:CURR:NPLC {:f}", label="Current integration time", )

Parameter nplci

resistance: Parameter = self.add_parameter( "resistance", get_cmd=self._get_read_output_protected, get_parser=self._resistance_parser, label="Resistance", unit="Ohm", docstring="Measure resistance from current and voltage. " "Note that it is an error to read current " "and voltage with output off", )

Measure resistance from current and voltage. Note that it is an error to read current and voltage with output off

reset() None[source]

Reset the instrument. When the instrument is reset, it performs the following actions.

Returns the SourceMeter to the GPIB default conditions.

Cancels all pending commands.

Cancels all previously send *OPC and *OPC?

class qcodes.instrument_drivers.Keithley.Keithley2450(name: str, address: str, **kwargs: Unpack)[source]

Bases: VisaInstrument

The QCoDeS driver for the Keithley 2450 SMU

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

source_function

Parameter source_function

sense_function

Parameter sense_function

terminals

Parameter terminals

output_enabled

Parameter output_enabled

line_frequency

returns the power line frequency setting that is used for NPLC calculations

buffer_name

name of the reading buffer in using

source

We have different source modules depending on the source function, which can be 'current' or 'voltage'

sense

We have different sense modules depending on the sense function, which can be 'current', 'voltage' or 'resistance'

Methods:

buffer(name[, size, style])

npts()

Get the number of points in the sweep axis

set_correct_language()

The correct communication protocol is SCPI, make sure this is set

abort()

This command stops all trigger model commands on the instrument.

initiate()

This command starts the trigger model.

wait()

This command postpones the execution of subsequent commands until all previous overlapped commands are finished.

clear_event_register()

This function clears event registers.

clear_event_log()

This command clears the event log.

reset()

Returns instrument to default settings, cancels all pending commands.

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

source_function: Parameter = self.add_parameter( "source_function", set_cmd=self._set_source_function, get_cmd=":SOUR:FUNC?", val_mapping={ key: value["name"] for key, value in Keithley2450Source.function_modes.items() }, )

Parameter source_function

sense_function: Parameter = self.add_parameter( "sense_function", set_cmd=self._set_sense_function, get_cmd=":SENS:FUNC?", val_mapping={ key: value["name"] for key, value in Keithley2450Sense.function_modes.items() }, )

Parameter sense_function

terminals: Parameter = self.add_parameter( "terminals", set_cmd="ROUTe:TERMinals {}", get_cmd="ROUTe:TERMinals?", vals=Enum("rear", "front"), )

Parameter terminals

output_enabled: Parameter = self.add_parameter( "output_enabled", set_cmd=":OUTP {}", get_cmd=":OUTP?", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )

Parameter output_enabled

line_frequency: Parameter = self.add_parameter( "line_frequency", get_cmd=":SYSTem:LFRequency?", unit="Hz", docstring="returns the power line frequency setting that is used " "for NPLC calculations", )

returns the power line frequency setting that is used for NPLC calculations

buffer_name: Parameter = self.add_parameter( "buffer_name", get_cmd=None, set_cmd=None, docstring="name of the reading buffer in using", )

name of the reading buffer in using

property source: Keithley2450Source

We have different source modules depending on the source function, which can be ‘current’ or ‘voltage’

Return the correct source module based on the source function

property sense: Keithley2450Sense

We have different sense modules depending on the sense function, which can be ‘current’, ‘voltage’ or ‘resistance’

Return the correct source module based on the sense function

buffer(name: str, size: int | None = None, style: str = '') Keithley2450Buffer[source]
npts() int[source]

Get the number of points in the sweep axis

set_correct_language() None[source]

The correct communication protocol is SCPI, make sure this is set

abort() None[source]

This command stops all trigger model commands on the instrument.

initiate() None[source]

This command starts the trigger model.

wait() None[source]

This command postpones the execution of subsequent commands until all previous overlapped commands are finished.

clear_event_register() None[source]

This function clears event registers.

clear_event_log() None[source]

This command clears the event log.

reset() None[source]

Returns instrument to default settings, cancels all pending commands.

class qcodes.instrument_drivers.Keithley.Keithley2450Buffer(parent: Keithley2450, name: str, size: int | None = None, style: str = '')[source]

Bases: InstrumentChannel

Treat the reading buffer as a submodule, similar to Sense and Source

Attributes:

default_buffer

buffer_elements

inverted_buffer_elements

size

The number of readings a buffer can store.

number_of_readings

To get the number of readings in the reading buffer.

elements

List of buffer elements to read.

available_elements

Methods:

from_name_to_scpi(element_names)

from_scpi_to_name(element_scpis)

get_last_reading()

This method requests the latest reading from a reading buffer.

get_data(start_idx, end_idx[, readings_only])

This command returns specified data elements from reading buffer.

clear_buffer()

Clear the data in the buffer

trigger_start()

This method makes readings using the active measure function and stores them in a reading buffer.

delete()

default_buffer: ClassVar[set[str]] = {'defbuffer1', 'defbuffer2'}
buffer_elements: ClassVar[dict[str, str]] = {'date': 'DATE', 'fractional_seconds': 'FRACtional', 'measurement': 'READing', 'measurement_formatted': 'FORMatted', 'measurement_status': 'STATus', 'measurement_unit': 'UNIT', 'relative_time': 'RELative', 'seconds': 'SEConds', 'source_value': 'SOURce', 'source_value_formatted': 'SOURFORMatted', 'source_value_status': 'SOURSTATus', 'source_value_unit': 'SOURUNIT', 'time': 'TIME', 'timestamp': 'TSTamp'}
inverted_buffer_elements = {'DATE': 'date', 'FORMatted': 'measurement_formatted', 'FRACtional': 'fractional_seconds', 'READing': 'measurement', 'RELative': 'relative_time', 'SEConds': 'seconds', 'SOURFORMatted': 'source_value_formatted', 'SOURSTATus': 'source_value_status', 'SOURUNIT': 'source_value_unit', 'SOURce': 'source_value', 'STATus': 'measurement_status', 'TIME': 'time', 'TSTamp': 'timestamp', 'UNIT': 'measurement_unit'}
size: Parameter = self.add_parameter( "size", get_cmd=f":TRACe:POINts? '{self.buffer_name}'", set_cmd=f":TRACe:POINts {{}}, '{self.buffer_name}'", get_parser=int, docstring="The number of readings a buffer can store.", )

The number of readings a buffer can store.

number_of_readings: Parameter = self.add_parameter( "number_of_readings", get_cmd=f":TRACe:ACTual? '{self.buffer_name}'", get_parser=int, docstring="To get the number of readings in the reading buffer.", )

To get the number of readings in the reading buffer.

elements: Parameter = self.add_parameter( "elements", get_cmd=None, get_parser=self.from_scpi_to_name, set_cmd=None, set_parser=self.from_name_to_scpi, vals=Lists(Enum(*list(self.buffer_elements.keys()))), docstring="List of buffer elements to read.", )

List of buffer elements to read.

from_name_to_scpi(element_names: list[str]) list[str][source]
from_scpi_to_name(element_scpis: list[str]) list[str][source]
property available_elements: set[str]
get_last_reading() str[source]

This method requests the latest reading from a reading buffer.

get_data(start_idx: int, end_idx: int, readings_only: bool = False) list[Any][source]

This command returns specified data elements from reading buffer.

Parameters:
  • start_idx – beginning index of the buffer to return

  • end_idx – ending index of the buffer to return

  • readings_only – a flag to temporarily disable the elements and output only the numerical readings

Returns:

data elements from the reading buffer

clear_buffer() None[source]

Clear the data in the buffer

trigger_start() None[source]

This method makes readings using the active measure function and stores them in a reading buffer.

delete() None[source]
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Keithley.Keithley2450Sense(parent: Keithley2450, name: str, proper_function: str)[source]

Bases: InstrumentChannel

The sense module of the Keithley 2450 SMU.

Parameters:
  • parent

  • name

  • proper_function – This can be one of either “current”, “voltage” or “resistance”. All parameters and methods in this submodule should only be accessible to the user if self.parent.sense_function.get() == self._proper_function. We ensure this through the ‘sense’ property on the main driver class which returns the proper submodule for any given function mode

Attributes:

function_modes

four_wire_measurement

Parameter four_wire_measurement

range

Parameter range

auto_range

Parameter auto_range

sweep

Parameter sweep

nplc

Parameter nplc

user_number

Parameter user_number

user_delay

Parameter user_delay

auto_zero_enabled

This command enables or disables automatic updates to the internal reference measurements (autozero) of the instrument.

count

The number of measurements to make when a measurement is requested.

Methods:

auto_zero_once()

This command causes the instrument to refresh the reference and zero measurements once.

clear_trace([buffer_name])

Clear the data buffer

function_modes: ClassVar[dict[str, _FunctionMode]] = {'current': {'name': '"CURR:DC"', 'range_vals': <Numbers 1e-08<=v<=1>, 'unit': 'A'}, 'resistance': {'name': '"RES"', 'range_vals': <Numbers 20<=v<=200000000.0>, 'unit': 'Ohm'}, 'voltage': {'name': '"VOLT:DC"', 'range_vals': <Numbers 0.02<=v<=200>, 'unit': 'V'}}
four_wire_measurement: Parameter = self.add_parameter( "four_wire_measurement", set_cmd=f":SENSe:{self._proper_function}:RSENse {{}}", get_cmd=f":SENSe:{self._proper_function}:RSENse?", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )

Parameter four_wire_measurement

range: Parameter = self.add_parameter( "range", set_cmd=f":SENSe:{self._proper_function}:RANGe {{}}", get_cmd=f":SENSe:{self._proper_function}:RANGe?", vals=range_vals, get_parser=float, unit=unit, )

Parameter range

auto_range: Parameter = self.add_parameter( "auto_range", set_cmd=f":SENSe:{self._proper_function}:RANGe:AUTO {{}}", get_cmd=f":SENSe:{self._proper_function}:RANGe:AUTO?", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )

Parameter auto_range

sweep: ParameterWithSetpointsCustomized = self.add_parameter( "sweep", label=self._proper_function, get_cmd=self._measure_sweep, unit=unit, vals=Arrays(shape=(self.parent.npts,)), parameter_class=ParameterWithSetpointsCustomized, )

Parameter sweep

nplc: Parameter = self.add_parameter( "nplc", get_cmd=f":SENSe:{self._proper_function}:NPLCycles?", set_cmd=f":SENSe:{self._proper_function}:NPLCycles {{}}", vals=Numbers(0.001, 10), )

Parameter nplc

user_number: Parameter = self.add_parameter( "user_number", get_cmd=None, set_cmd=None, vals=Ints(1, 5) )

Parameter user_number

user_delay: Parameter = self.add_parameter( "user_delay", get_cmd=self._get_user_delay, set_cmd=self._set_user_delay, get_parser=float, vals=Numbers(0, 1e4), )

Parameter user_delay

auto_zero_enabled: Parameter = self.add_parameter( "auto_zero_enabled", get_cmd=f":SENSe:{self._proper_function}:AZERo?", set_cmd=f":SENSe:{self._proper_function}:AZERo {{}}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), docstring="This command enables or disables automatic updates to " "the internal reference measurements (autozero) of the " "instrument.", )

This command enables or disables automatic updates to the internal reference measurements (autozero) of the instrument.

count: Parameter = self.add_parameter( "count", get_cmd=":SENSe:COUNt?", set_cmd=":SENSe:COUNt {}", docstring="The number of measurements to make when a measurement " "is requested.", )

The number of measurements to make when a measurement is requested.

auto_zero_once() None[source]

This command causes the instrument to refresh the reference and zero measurements once.

clear_trace(buffer_name: str = 'defbuffer1') None[source]

Clear the data buffer

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Keithley.Keithley2450Source(parent: Keithley2450, name: str, proper_function: str)[source]

Bases: InstrumentChannel

The source module of the Keithley 2450 SMU.

Parameters:
  • parent

  • name

  • proper_function – This can be one of either “current” or “voltage” All parameters and methods in this submodule should only be accessible to the user if self.parent.source_function.get() == self._proper_function. We ensure this through the ‘source’ property on the main driver class which returns the proper submodule for any given function mode

Attributes:

function_modes

range

Parameter range

auto_range

Parameter auto_range

limit

Parameter limit

limit_tripped

Parameter limit_tripped

sweep_axis

Parameter sweep_axis

delay

Parameter delay

user_number

Parameter user_number

user_delay

Parameter user_delay

auto_delay

Parameter auto_delay

read_back_enabled

This command determines if the instrument records the measured source value or the configured source value when making a measurement.

block_during_ramp

Setting the source output level alone cannot block the execution of subsequent code.

Methods:

get_sweep_axis()

sweep_setup(start, stop, step_count[, ...])

sweep_start()

Start a sweep and return when the sweep has finished.

sweep_reset()

function_modes: ClassVar[dict[str, _FunctionMode]] = {'current': {'name': 'CURR', 'range_vals': <Numbers -1<=v<=1>, 'unit': 'A'}, 'voltage': {'name': 'VOLT', 'range_vals': <Numbers -200<=v<=200>, 'unit': 'V'}}
range: Parameter = self.add_parameter( "range", set_cmd=f":SOUR:{self._proper_function}:RANGe {{}}", get_cmd=f":SOUR:{self._proper_function}:RANGe?", vals=range_vals, get_parser=float, unit=unit, )

Parameter range

auto_range: Parameter = self.add_parameter( "auto_range", set_cmd=f":SOURce:{self._proper_function}:RANGe:AUTO {{}}", get_cmd=f":SOURce:{self._proper_function}:RANGe:AUTO?", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )

Parameter auto_range

limit: Parameter = self.add_parameter( "limit", set_cmd=f"SOUR:{self._proper_function}:{limit_cmd} {{}}", get_cmd=f"SOUR:{self._proper_function}:{limit_cmd}?", get_parser=float, unit=unit, )

Parameter limit

limit_tripped: Parameter = self.add_parameter( "limit_tripped", get_cmd=f":SOUR:{self._proper_function}:{limit_cmd}:TRIPped?", val_mapping={True: 1, False: 0}, )

Parameter limit_tripped

sweep_axis: Parameter = self.add_parameter( "sweep_axis", label=self._proper_function, get_cmd=self.get_sweep_axis, vals=Arrays(shape=(self.parent.npts,)), unit=unit, )

Parameter sweep_axis

delay: Parameter = self.add_parameter( "delay", get_cmd=f":SOURce:{self._proper_function}:DELay?", set_cmd=f":SOURce:{self._proper_function}:DELay {{}}", vals=Numbers(0, 1e4), )

Parameter delay

user_number: Parameter = self.add_parameter( "user_number", get_cmd=None, set_cmd=None, vals=Ints(1, 5) )

Parameter user_number

user_delay: Parameter = self.add_parameter( "user_delay", get_cmd=self._get_user_delay, set_cmd=self._set_user_delay, vals=Numbers(0, 1e4), )

Parameter user_delay

auto_delay: Parameter = self.add_parameter( "auto_delay", get_cmd=f":SOURce:{self._proper_function}:DELay:AUTO?", set_cmd=f":SOURce:{self._proper_function}:DELay:AUTO {{}}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )

Parameter auto_delay

read_back_enabled: Parameter = self.add_parameter( "read_back_enabled", get_cmd=f":SOURce:{self._proper_function}:READ:BACK?", set_cmd=f":SOURce:{self._proper_function}:READ:BACK {{}}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), docstring="This command determines if the instrument records the " "measured source value or the configured source value " "when making a measurement.", )

This command determines if the instrument records the measured source value or the configured source value when making a measurement.

block_during_ramp: Parameter = self.add_parameter( "block_during_ramp", initial_value=False, get_cmd=None, set_cmd=None, vals=Bool(), docstring="Setting the source output level alone cannot block the " "execution of subsequent code. This parameter allows _proper_function" "to either block or not.", )

Setting the source output level alone cannot block the execution of subsequent code. This parameter allows _proper_functionto either block or not.

get_sweep_axis() ndarray[source]
sweep_setup(start: float, stop: float, step_count: int, delay: float = 0, sweep_count: int = 1, range_mode: str = 'AUTO', fail_abort: str = 'ON', dual: str = 'OFF', buffer_name: str = 'defbuffer1') None[source]
sweep_start() None[source]

Start a sweep and return when the sweep has finished. Note: This call is blocking

sweep_reset() None[source]
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Keithley.Keithley2600MeasurementStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

Keeps track of measurement status.

Attributes:

CURRENT_COMPLIANCE_ERROR

VOLTAGE_COMPLIANCE_ERROR

VOLTAGE_AND_CURRENT_COMPLIANCE_ERROR

NORMAL

COMPLIANCE_ERROR

CURRENT_COMPLIANCE_ERROR = 'Reached current compliance limit.'
VOLTAGE_COMPLIANCE_ERROR = 'Reached voltage compliance limit.'
VOLTAGE_AND_CURRENT_COMPLIANCE_ERROR = 'Reached both voltage and current compliance limits.'
NORMAL = 'No error occured.'
COMPLIANCE_ERROR = 'Reached compliance limit.'
class qcodes.instrument_drivers.Keithley.Keithley2600(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

This is the base class for all qcodes driver for the Keithley 2600 Source-Meter series. This class should not be instantiated directly. Rather one of the subclasses for a specific instrument should be used.

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

display_settext

Parameter display_settext

Methods:

get_idn()

Parse a standard VISA *IDN? response into an ID dict.

display_clear()

This function clears the display, but also leaves it in user mode

display_normal()

Set the display to the default mode

exit_key()

Get back the normal screen after an error: send an EXIT key press event

reset()

Reset instrument to factory defaults.

ask(cmd)

Override of normal ask.

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

channels: list[Keithley2600Channel] = []
display_settext: Parameter = self.add_parameter( "display_settext", set_cmd=self._display_settext, vals=vals.Strings() )

Parameter display_settext

get_idn() dict[str, str | None][source]

Parse a standard VISA *IDN? response into an ID dict.

Even though this is the VISA standard, it applies to various other types as well, such as IPInstruments, so it is included here in the Instrument base class.

Override this if your instrument does not support *IDN? or returns a nonstandard IDN string. This string is supposed to be a comma-separated list of vendor, model, serial, and firmware, but semicolon and colon are also common separators so we accept them here as well.

Returns:

A dict containing vendor, model, serial, and firmware.

display_clear() None[source]

This function clears the display, but also leaves it in user mode

display_normal() None[source]

Set the display to the default mode

exit_key() None[source]

Get back the normal screen after an error: send an EXIT key press event

reset() None[source]

Reset instrument to factory defaults. This resets both channels.

ask(cmd: str) str[source]

Override of normal ask. This is important, since queries to the instrument must be wrapped in ‘print()’

qcodes.instrument_drivers.Keithley.Keithley26xx = qcodes.instrument_drivers.Keithley.Keithley_2601B.Keithley2601B | qcodes.instrument_drivers.Keithley.Keithley_2602A.Keithley2602A | qcodes.instrument_drivers.Keithley.Keithley_2602B.Keithley2602B | qcodes.instrument_drivers.Keithley.Keithley_2604B.Keithley2604B | qcodes.instrument_drivers.Keithley.Keithley_2611B.Keithley2611B | qcodes.instrument_drivers.Keithley.Keithley_2612B.Keithley2612B | qcodes.instrument_drivers.Keithley.Keithley_2614B.Keithley2614B | qcodes.instrument_drivers.Keithley.Keithley_2634B.Keithley2634B | qcodes.instrument_drivers.Keithley.Keithley_2635B.Keithley2635B | qcodes.instrument_drivers.Keithley.Keithley_2636B.Keithley2636B

Type alias for all Keithley 26xx SMUs supported by QCoDeS.

class qcodes.instrument_drivers.Keithley.Keithley2600Channel(parent: Instrument, name: str, channel: str)[source]

Bases: InstrumentChannel

Class to hold the two Keithley channels, i.e. SMUA and SMUB.

Parameters:
  • parent – The Instrument instance to which the channel is to be attached.

  • name – The ‘colloquial’ name of the channel

  • channel – The name used by the Keithley, i.e. either ‘smua’ or ‘smub’

Attributes:

volt

Parameter volt

curr

Parameter curr

res

Parameter res

mode

Selects the output source type.

output

Parameter output

linefreq

Parameter linefreq

nplc

Number of power line cycles, used to perform measurements

sourcerange_v

The range used when sourcing voltage This affects the range and the precision of the source.

source_autorange_v_enabled

Set autorange on/off for source voltage.

measurerange_v

The range to perform voltage measurements in.

measure_autorange_v_enabled

Set autorange on/off for measure voltage.

sourcerange_i

The range used when sourcing current This affects the range and the precision of the source.

source_autorange_i_enabled

Set autorange on/off for source current.

measurerange_i

The range to perform current measurements in.

measure_autorange_i_enabled

Set autorange on/off for measure current.

limitv

Voltage limit e.g. the maximum voltage allowed in current mode.

limiti

Current limit e.g. the maximum current allowed in voltage mode.

fastsweep

Parameter fastsweep

timetrace_npts

Parameter timetrace_npts

timetrace_dt

Parameter timetrace_dt

time_axis

Parameter time_axis

timetrace

Parameter timetrace

timetrace_mode

Parameter timetrace_mode

Methods:

reset()

Reset instrument to factory defaults.

doFastSweep(start, stop, steps, mode)

Perform a fast sweep using a deployed lua script and return a QCoDeS DataSet with the sweep.

volt: _MeasurementVoltageParameter = self.add_parameter( "volt", parameter_class=_MeasurementVoltageParameter, label="Voltage", unit="V", snapshot_get=False, )

Parameter volt

curr: _MeasurementCurrentParameter = self.add_parameter( "curr", parameter_class=_MeasurementCurrentParameter, label="Current", unit="A", snapshot_get=False, )

Parameter curr

res: Parameter = self.add_parameter( "res", get_cmd=f"{channel}.measure.r()", get_parser=float, set_cmd=False, label="Resistance", unit="Ohm", )

Parameter res

mode: Parameter = self.add_parameter( "mode", get_cmd=f"{channel}.source.func", get_parser=float, set_cmd=f"{channel}.source.func={{:d}}", val_mapping={"current": 0, "voltage": 1}, docstring="Selects the output source type. " "Can be either voltage or current.", )

Selects the output source type. Can be either voltage or current.

output: Parameter = self.add_parameter( "output", get_cmd=f"{channel}.source.output", get_parser=float, set_cmd=f"{channel}.source.output={{:d}}", val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), )

Parameter output

linefreq: Parameter = self.add_parameter( "linefreq", label="Line frequency", get_cmd="localnode.linefreq", get_parser=float, set_cmd=False, unit="Hz", )

Parameter linefreq

nplc: Parameter = self.add_parameter( "nplc", label="Number of power line cycles", set_cmd=f"{channel}.measure.nplc={{}}", get_cmd=f"{channel}.measure.nplc", get_parser=float, docstring="Number of power line cycles, used to perform measurements", vals=vals.Numbers(0.001, 25), )

Number of power line cycles, used to perform measurements

sourcerange_v: Parameter = self.add_parameter( "sourcerange_v", label="voltage source range", get_cmd=f"{channel}.source.rangev", get_parser=float, set_cmd=self._set_sourcerange_v, unit="V", docstring="The range used when sourcing voltage " "This affects the range and the precision " "of the source.", vals=vals.Enum(*vranges[self.model]), )

The range used when sourcing voltage This affects the range and the precision of the source.

source_autorange_v_enabled: Parameter = self.add_parameter( "source_autorange_v_enabled", label="voltage source autorange", get_cmd=f"{channel}.source.autorangev", get_parser=float, set_cmd=f"{channel}.source.autorangev={{}}", docstring="Set autorange on/off for source voltage.", val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), )

Set autorange on/off for source voltage.

measurerange_v: Parameter = self.add_parameter( "measurerange_v", label="voltage measure range", get_cmd=f"{channel}.measure.rangev", get_parser=float, set_cmd=self._set_measurerange_v, unit="V", docstring="The range to perform voltage " "measurements in. This affects the range " "and the precision of the measurement. " "Note that if you both measure and " "source current this will have no effect, " "set `sourcerange_v` instead", vals=vals.Enum(*vranges[self.model]), )

The range to perform voltage measurements in. This affects the range and the precision of the measurement. Note that if you both measure and source current this will have no effect, set sourcerange_v instead

measure_autorange_v_enabled: Parameter = self.add_parameter( "measure_autorange_v_enabled", label="voltage measure autorange", get_cmd=f"{channel}.measure.autorangev", get_parser=float, set_cmd=f"{channel}.measure.autorangev={{}}", docstring="Set autorange on/off for measure voltage.", val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), )

Set autorange on/off for measure voltage.

sourcerange_i: Parameter = self.add_parameter( "sourcerange_i", label="current source range", get_cmd=f"{channel}.source.rangei", get_parser=float, set_cmd=self._set_sourcerange_i, unit="A", docstring="The range used when sourcing current " "This affects the range and the " "precision of the source.", vals=vals.Enum(*iranges[self.model]), )

The range used when sourcing current This affects the range and the precision of the source.

source_autorange_i_enabled: Parameter = self.add_parameter( "source_autorange_i_enabled", label="current source autorange", get_cmd=f"{channel}.source.autorangei", get_parser=float, set_cmd=f"{channel}.source.autorangei={{}}", docstring="Set autorange on/off for source current.", val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), )

Set autorange on/off for source current.

measurerange_i: Parameter = self.add_parameter( "measurerange_i", label="current measure range", get_cmd=f"{channel}.measure.rangei", get_parser=float, set_cmd=self._set_measurerange_i, unit="A", docstring="The range to perform current " "measurements in. This affects the range " "and the precision of the measurement. " "Note that if you both measure and source " "current this will have no effect, set " "`sourcerange_i` instead", vals=vals.Enum(*iranges[self.model]), )

The range to perform current measurements in. This affects the range and the precision of the measurement. Note that if you both measure and source current this will have no effect, set sourcerange_i instead

measure_autorange_i_enabled: Parameter = self.add_parameter( "measure_autorange_i_enabled", label="current autorange", get_cmd=f"{channel}.measure.autorangei", get_parser=float, set_cmd=f"{channel}.measure.autorangei={{}}", docstring="Set autorange on/off for measure current.", val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), )

Set autorange on/off for measure current.

limitv: Parameter = self.add_parameter( "limitv", get_cmd=f"{channel}.source.limitv", get_parser=float, set_cmd=f"{channel}.source.limitv={{}}", docstring="Voltage limit e.g. the maximum voltage " "allowed in current mode. If exceeded " "the current will be clipped.", vals=vals.Numbers( vlimit_minmax[self.model][0], vlimit_minmax[self.model][1] ), unit="V", )

Voltage limit e.g. the maximum voltage allowed in current mode. If exceeded the current will be clipped.

limiti: Parameter = self.add_parameter( "limiti", get_cmd=f"{channel}.source.limiti", get_parser=float, set_cmd=f"{channel}.source.limiti={{}}", docstring="Current limit e.g. the maximum current " "allowed in voltage mode. If exceeded " "the voltage will be clipped.", vals=vals.Numbers( ilimit_minmax[self.model][0], ilimit_minmax[self.model][1] ), unit="A", )

Current limit e.g. the maximum current allowed in voltage mode. If exceeded the voltage will be clipped.

fastsweep: LuaSweepParameter = self.add_parameter( "fastsweep", parameter_class=LuaSweepParameter )

Parameter fastsweep

timetrace_npts: Parameter = self.add_parameter( "timetrace_npts", initial_value=500, label="Number of points", get_cmd=None, set_cmd=None, )

Parameter timetrace_npts

timetrace_dt: Parameter = self.add_parameter( "timetrace_dt", initial_value=1e-3, label="Time resolution", unit="s", get_cmd=None, set_cmd=None, )

Parameter timetrace_dt

time_axis: TimeAxis = self.add_parameter( name="time_axis", label="Time", unit="s", snapshot_value=False, vals=vals.Arrays(shape=(self.timetrace_npts,)), parameter_class=TimeAxis, )

Parameter time_axis

timetrace: TimeTrace = self.add_parameter( "timetrace", vals=vals.Arrays(shape=(self.timetrace_npts,)), setpoints=(self.time_axis,), parameter_class=TimeTrace, )

Parameter timetrace

timetrace_mode: Parameter = self.add_parameter( "timetrace_mode", initial_value="current", get_cmd=None, set_cmd=self.timetrace._set_mode, vals=vals.Enum("current", "voltage"), )

Parameter timetrace_mode

reset() None[source]

Reset instrument to factory defaults. This resets only the relevant channel.

doFastSweep(start: float, stop: float, steps: int, mode: str) DataSet[source]

Perform a fast sweep using a deployed lua script and return a QCoDeS DataSet with the sweep.

Parameters:
  • start – starting sweep value (V or A)

  • stop – end sweep value (V or A)

  • steps – number of steps

  • mode – Type of sweep, either ‘IV’ (voltage sweep), ‘VI’ (current sweep two probe setup) or ‘VIfourprobe’ (current sweep four probe setup)

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Keithley.Keithley2601B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keithley2600

QCoDeS driver for the Keithley 2601B Source-Meter

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keithley.Keithley2602A(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keithley2600

QCoDeS driver for the Keithley 2602A Source-Meter

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keithley.Keithley2602B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keithley2600

QCoDeS driver for the Keithley 2602B Source-Meter

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keithley.Keithley2604B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keithley2600

QCoDeS driver for the Keithley 2604B Source-Meter

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keithley.Keithley2611B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keithley2600

QCoDeS driver for the Keithley 2611B Source-Meter

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keithley.Keithley2612B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keithley2600

QCoDeS driver for the Keithley 2612B Source-Meter

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keithley.Keithley2614B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keithley2600

QCoDeS driver for the Keithley 2614B Source-Meter

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keithley.Keithley2634B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keithley2600

QCoDeS driver for the Keithley 2634B Source-Meter

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keithley.Keithley2635B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keithley2600

QCoDeS driver for the Keithley 2635B Source-Meter

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keithley.Keithley2636B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keithley2600

QCoDeS driver for the Keithley 2636B Source-Meter

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keithley.Keithley3706A(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

This is the QCoDeS instrument driver for the Keithley 3706A-SNFP System Switch.

Parameters:
  • name – Name to use internally in QCoDeS

  • address – VISA resource address

  • **kwargs – kwargs are forwarded to base class.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

channel_connect_rule

Controls the connection rule for closing and opening channels when using exclusive_close and exclusive_slot_close parameters.

gpib_enabled

Enables or disables GPIB connection.

gpib_address

Sets and gets the GPIB address.

lan_enabled

Enables or disables LAN connection.

Methods:

reset_channel(val)

Resets the specified channels to factory default settings.

open_channel(val)

Opens the specified channels and backplane relays.

close_channel(val)

Closes the channels and backplane relays.

exclusive_close(val)

Closes the specified channels such that any presently closed channels opens if they are not in the specified by the parameter.

exclusive_slot_close(val)

Closes the specified channels on the associated slots abd opens any other channels if they are not specified by the parameter.

get_closed_channels(val)

Queries for the closed channels.

set_forbidden_channels(val)

Prevents the closing of specified channels and backplane relays.

get_forbidden_channels(val)

Returns a string that lists the channels and backplane relays that are forbidden to close.

clear_forbidden_channels(val)

Clears the list of channels that are forbidden to close.

set_delay(val, delay_time)

Sets an additional delay time for the specified channels.

get_delay(val)

Queries for the delay times.

set_backplane(val, backplane)

Sets the analog backplane relays to use with given channels when they are used in switching applications.

get_backplane(val)

Lists the backplane relays that are controlled in switching applications for specified channels.

get_channels()

This function returns the name of the matrix channels.

get_channels_by_slot(slot_no)

Returns the channel names of a given slot.

get_analog_backplane_specifiers()

Returns a list of comma separated strings representing available analog backplane relays.

connect_row_to_columns(slot_id, row_id, columns)

A convenient function that connects given columns to a row of a slot and opens the formed channels.

disconnect_row_from_columns(slot_id, row_id, ...)

A convenient function that disconnects given columns to a row of a slot and closes the formed channels.

connect_column_to_rows(slot_id, column_id, rows)

A convenient function that connects given rows to a column of a slot and opens the formed channels.

disconnect_column_from_rows(slot_id, ...)

A convenient function that disconnects given rows to a column of a slot and closes the formed channels.

get_idn()

Overwrites the generic QCoDeS get IDN method.

get_switch_cards()

Returns a list of dictionaries listing the properties of the installed switch cards including the slot number tha it is installed, model, firmware version and serial number.

get_available_memory()

Returns the amount of memory that is currently available for storing scripts, configurations and channel patterns.

get_interlock_state()

A function that collects the interlock status of the installed cards.

get_interlock_state_by_slot(slot)

get_ip_address()

Returns the current IP address of the instrument.

reset_local_network()

Resets the local network (LAN).

save_setup([val])

Saves the present setup.

load_setup(val)

Loads the settings from a saved setup.

connect_message([idn_param, begin_time])

Overwrites the generic QCoDeS instrument connect message.

ask(cmd)

Override of normal ask.

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

channel_connect_rule: Parameter = self.add_parameter( "channel_connect_rule", get_cmd=self._get_channel_connect_rule, set_cmd=self._set_channel_connect_rule, docstring=textwrap.dedent( """\ Controls the connection rule for closing and opening channels when using `exclusive_close` and `exclusive_slot_close` parameters. If it is set to break before make, it is ensured that all channels open before any channels close. If it is set to make before break, it is ensured that all channels close before any channels open. If it is off, channels open and close simultaneously.""" ), vals=vals.Enum("BREAK_BEFORE_MAKE", "MAKE_BEFORE_BREAK", "OFF"), )

Controls the connection rule for closing and opening channels when using exclusive_close and exclusive_slot_close parameters.

If it is set to break before make, it is ensured that all channels open before any channels close.

If it is set to make before break, it is ensured that all channels close before any channels open.

If it is off, channels open and close simultaneously.

gpib_enabled: Parameter = self.add_parameter( "gpib_enabled", get_cmd=self._get_gpib_status, set_cmd=self._set_gpib_status, docstring="Enables or disables GPIB connection.", val_mapping=create_on_off_val_mapping(on_val="true", off_val="false"), )

Enables or disables GPIB connection.

gpib_address: Parameter = self.add_parameter( "gpib_address", get_cmd=self._get_gpib_address, get_parser=int, set_cmd=self._set_gpib_address, docstring="Sets and gets the GPIB address.", vals=vals.Ints(1, 30), )

Sets and gets the GPIB address.

lan_enabled: Parameter = self.add_parameter( "lan_enabled", get_cmd=self._get_lan_status, set_cmd=self._set_lan_status, docstring="Enables or disables LAN connection.", val_mapping=create_on_off_val_mapping(on_val="true", off_val="false"), )

Enables or disables LAN connection.

reset_channel(val: str) None[source]

Resets the specified channels to factory default settings.

Parameters:

val – A string representing the channels, channel ranges, backplane relays, slots or channel patterns to be queried.

open_channel(val: str) None[source]

Opens the specified channels and backplane relays.

Parameters:

val – A string representing the channels, channel ranges, backplane relays, slots or channel patterns to be queried.

close_channel(val: str) None[source]

Closes the channels and backplane relays.

Parameters:

val – A string representing the channels, channel ranges, backplane relays to be queried.

exclusive_close(val: str) None[source]

Closes the specified channels such that any presently closed channels opens if they are not in the specified by the parameter.

Parameters:

val – A string representing the channels, channel ranges, backplane relays to be queried.

exclusive_slot_close(val: str) None[source]

Closes the specified channels on the associated slots abd opens any other channels if they are not specified by the parameter.

Parameters:

val – A string representing the channels, channel ranges, backplane relays to be queried.

get_closed_channels(val: str) list[str] | None[source]

Queries for the closed channels.

Parameters:

val – A string representing the channels, backplane relays or channel patterns to be queried.

set_forbidden_channels(val: str) None[source]

Prevents the closing of specified channels and backplane relays.

Parameters:

val – A string representing channels and backplane relays to make forbidden to close.

get_forbidden_channels(val: str) str[source]

Returns a string that lists the channels and backplane relays that are forbidden to close.

Parameters:

val – A string representing the channels, backplane relays or channel patterns to be queried to see if they are forbidden to close.

clear_forbidden_channels(val: str) None[source]

Clears the list of channels that are forbidden to close.

Parameters:

val – A string representing the channels that will no longer be listed as forbidden to close.

set_delay(val: str, delay_time: float) None[source]

Sets an additional delay time for the specified channels.

Parameters:
  • val – A string representing the channels for which there will be an additional delay time.

  • delay_time – Delay time for the specified channels in seconds.

get_delay(val: str) list[float][source]

Queries for the delay times.

Parameters:

val – A string representing the channels to query for additional delay times.

set_backplane(val: str, backplane: str) None[source]

Sets the analog backplane relays to use with given channels when they are used in switching applications.

Parameters:
  • val – A string representing the list of channels to change.

  • backplane – A string representing the list of analog backplane relays to set for the channels specified.

get_backplane(val: str) str[source]

Lists the backplane relays that are controlled in switching applications for specified channels.

Parameters:

val – A string representing the channels being queried.

get_channels() list[str][source]

This function returns the name of the matrix channels. User can call this function to see the names of the available channels, in case he/she is not familiar with the naming convention. However, note that, this is a standalone helper function and the usage of channel attributes of the instrument driver does not depend on the functionality of this method.

get_channels_by_slot(slot_no: int) list[str][source]

Returns the channel names of a given slot.

Parameters:

slot_no – An integer value specifying the slot number.

get_analog_backplane_specifiers() list[str][source]

Returns a list of comma separated strings representing available analog backplane relays. This function should not be mixed with the get_backplane method. The latter returns backplane relays which are associated with a channel by using set_backplane method.

connect_row_to_columns(slot_id: int, row_id: int, columns: list[int]) list[str][source]

A convenient function that connects given columns to a row of a slot and opens the formed channels.

Parameters:
  • slot_id – The specifier for the slot from which the row and columns will be selected.

  • row_id – The specifier for the row to which the provided columns will be connected.

  • columns – The specifiers of the columns will be connected to the provided row.

disconnect_row_from_columns(slot_id: int, row_id: int, columns: list[int]) list[str][source]

A convenient function that disconnects given columns to a row of a slot and closes the formed channels.

Parameters:
  • slot_id – The specifier for the slot from which the row and columns will be selected.

  • row_id – The specifier for the row to which the provided columns will be disconnected.

  • columns – The specifiers of the columns will be disconnected from the provided row.

connect_column_to_rows(slot_id: int, column_id: int, rows: list[int]) list[str][source]

A convenient function that connects given rows to a column of a slot and opens the formed channels.

Parameters:
  • slot_id – The specifier for the slot from which the row and columns will be selected.

  • column_id – The specifier for the column to which the provided rows will be connected.

  • rows – The specifiers of the rows will be connected to the provided column.

disconnect_column_from_rows(slot_id: int, column_id: int, rows: list[int]) list[str][source]

A convenient function that disconnects given rows to a column of a slot and closes the formed channels.

Parameters:
  • slot_id – The specifier for the slot from which the row and columns will be selected.

  • column_id – The specifier for the column to which the provided rows will be disconnected.

  • rows – The specifiers of the rows will be disconnected from the provided column.

get_idn() dict[str, str | None][source]

Overwrites the generic QCoDeS get IDN method. Returns a dictionary including the vendor, model, serial number and firmware version of the instrument.

get_switch_cards() tuple[dict[str, str], ...][source]

Returns a list of dictionaries listing the properties of the installed switch cards including the slot number tha it is installed, model, firmware version and serial number.

get_available_memory() dict[str, str | None][source]

Returns the amount of memory that is currently available for storing scripts, configurations and channel patterns.

get_interlock_state() tuple[dict[str, str], ...][source]

A function that collects the interlock status of the installed cards. The channel relays can continue to operate even if the interlock in the corresponding slot is disengaged, one cannot perform measurements through the switching card, as the analog backplanes cannot be energized.

get_interlock_state_by_slot(slot: str | int) int | None[source]
get_ip_address() str[source]

Returns the current IP address of the instrument.

reset_local_network() None[source]

Resets the local network (LAN).

save_setup(val: str | None = None) None[source]

Saves the present setup.

Parameters:

val – An optional string representing the path and the file name to which the setup shall be saved on a USB flash drive. If not provided, the setup will be saved to the nonvolatile memory of the instrument, any previous saves will be overwritten.

load_setup(val: int | str) None[source]

Loads the settings from a saved setup.

Parameters:

val – An integer or a string that specifies the location of saved setup. If it is 0, factory defaults load. If it is 1, the saved setup from the nonvolatile memory is recalled. Otherwise, a string specifying the relative path to the saved setup on a USB drive should be passed in.

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
connect_message(idn_param: str = 'IDN', begin_time: float | None = None) None[source]

Overwrites the generic QCoDeS instrument connect message. Here, additionally, we provide information about which slots of the system switch is occupied with what kind of matrix, as well.

ask(cmd: str) str[source]

Override of normal ask. This is important, since queries to the instrument must be wrapped in ‘print()’

exception qcodes.instrument_drivers.Keithley.Keithley3706AInvalidValue[source]

Bases: Exception

exception qcodes.instrument_drivers.Keithley.Keithley3706AUnknownOrEmptySlot[source]

Bases: Exception

class qcodes.instrument_drivers.Keithley.Keithley6500(name: str, address: str, reset_device: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

Driver for the Keithley 6500 multimeter. Based on the Keithley 2000 driver, commands have been adapted for the Keithley 6500. This driver does not contain all commands available, but only the ones most commonly used.

Status: beta-version.

Parameters:
  • name – The name used internally by QCoDeS in the DataSet.

  • address – The VISA device address.

  • reset_device – Reset the device on startup if true.

  • **kwargs – kwargs are forwarded to base class.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

mode

Parameter mode

nplc

Parameter nplc

range

Parameter range

auto_range_enabled

Parameter auto_range_enabled

digits

Parameter digits

averaging_type

Parameter averaging_type

averaging_count

Parameter averaging_count

averaging_enabled

Parameter averaging_enabled

display_backlight

Control the brightness of the display backligt.

trigger_count

Parameter trigger_count

trigger_timer

Parameter trigger_timer

amplitude

Parameter amplitude

Methods:

reset()

Reset the device

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

mode: Parameter = self.add_parameter( "mode", get_cmd="SENS:FUNC?", set_cmd="SENS:FUNC '{}'", val_mapping=self._mode_map, )

Parameter mode

nplc: Parameter = self.add_parameter( "nplc", get_cmd=partial(self._get_mode_param, "NPLC", float), set_cmd=partial(self._set_mode_param, "NPLC"), vals=Numbers(min_value=0.01, max_value=10), )

Parameter nplc

range: Parameter = self.add_parameter( "range", get_cmd=partial(self._get_mode_param, "RANG", float), set_cmd=partial(self._set_mode_param, "RANG"), vals=Numbers(), )

Parameter range

auto_range_enabled: Parameter = self.add_parameter( "auto_range_enabled", get_cmd=partial(self._get_mode_param, "RANG:AUTO", _parse_output_bool), set_cmd=partial(self._set_mode_param, "RANG:AUTO"), vals=Bool(), )

Parameter auto_range_enabled

digits: Parameter = self.add_parameter( "digits", get_cmd="DISP:VOLT:DC:DIG?", get_parser=int, set_cmd="DISP:VOLT:DC:DIG? {}", vals=Ints(min_value=4, max_value=7), )

Parameter digits

averaging_type: Parameter = self.add_parameter( "averaging_type", get_cmd=partial(self._get_mode_param, "AVER:TCON", _parse_output_string), set_cmd=partial(self._set_mode_param, "AVER:TCON"), vals=Enum("moving", "repeat"), )

Parameter averaging_type

averaging_count: Parameter = self.add_parameter( "averaging_count", get_cmd=partial(self._get_mode_param, "AVER:COUN", int), set_cmd=partial(self._set_mode_param, "AVER:COUN"), vals=Ints(min_value=1, max_value=100), )

Parameter averaging_count

averaging_enabled: Parameter = self.add_parameter( "averaging_enabled", get_cmd=partial(self._get_mode_param, "AVER:STAT", _parse_output_bool), set_cmd=partial(self._set_mode_param, "AVER:STAT"), vals=Bool(), )

Parameter averaging_enabled

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
display_backlight: Parameter = self.add_parameter( "display_backlight", docstring="Control the brightness of the display " "backligt. Off turns the display off and" "Blackout also turns off indicators and " "key lights on the device.", get_cmd="DISP:LIGH:STAT?", set_cmd="DISP:LIGH:STAT {}", val_mapping={ "On 100": "ON100", "On 75": "ON75", "On 50": "ON50", "On 25": "ON25", "Off": "OFF", "Blackout": "BLACkout", }, )

Control the brightness of the display backligt. Off turns the display off andBlackout also turns off indicators and key lights on the device.

trigger_count: Parameter = self.add_parameter( "trigger_count", get_parser=int, get_cmd="ROUT:SCAN:COUN:SCAN?", set_cmd="ROUT:SCAN:COUN:SCAN {}", vals=MultiType( Ints(min_value=1, max_value=9999), Enum("inf", "default", "minimum", "maximum"), ), )

Parameter trigger_count

trigger_timer: Parameter = self.add_parameter( "trigger_timer", get_parser=float, get_cmd="ROUT:SCAN:INT?", set_cmd="ROUT:SCAN:INT {}", unit="s", vals=Numbers(min_value=0, max_value=999999.999), )

Parameter trigger_timer

amplitude: Parameter = self.add_parameter( "amplitude", get_cmd=self._read_next_value, set_cmd=False, unit="a.u." )

Parameter amplitude

reset() None[source]

Reset the device

exception qcodes.instrument_drivers.Keithley.Keithley6500CommandSetError[source]

Bases: Exception

class qcodes.instrument_drivers.Keithley.Keithley7510(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

The QCoDeS driver for the Keithley 7510 DMM

Create an instance of the instrument.

Parameters:
  • name – Name of the instrument instance

  • address – Visa-resolvable instrument address

  • **kwargs – kwargs are forwarded to base class.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

sense_function

Add sense functions listed in the function modes.

digi_sense_function

Make readings using the active digitize function.

buffer_name

Name of the reading buffer in use.

trigger_block_list

Return the settings for all trigger model blocks.

trigger_in_ext_clear

Clear the trigger event on the external in line.

trigger_in_ext_edge

Type of edge that is detected as an input on the external trigger in line

overrun_status

Return the event detector overrun status.

digitize_trigger

Set the instrument to digitize a measurement the next time it detects the specified trigger event.

system_errors

Return the oldest unread error message from the event log and removes it from the log.

sense

We have different sense modules depending on the sense function.

digi_sense

We have different sense modules depending on the sense function.

Methods:

buffer(name[, size, style])

initiate()

This command starts the trigger model.

wait()

This command postpones the execution of subsequent commands until all previous overlapped commands are finished.

clear_status()

This command clears the event registers of the Questionable Event and Operation Event Register set.

reset()

Returns the instrument to default settings, cancels all pending commands.

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

sense_function: Parameter = self.add_parameter( "sense_function", set_cmd=":SENSe:FUNCtion {}", get_cmd=":SENSe:FUNCtion?", val_mapping={ key: value["name"] for key, value in Keithley7510Sense.function_modes.items() }, docstring="Add sense functions listed in the function modes.", )

Add sense functions listed in the function modes.

digi_sense_function: Parameter = self.add_parameter( "digi_sense_function", set_cmd=":DIGitize:FUNCtion {}", get_cmd=":DIGitize:FUNCtion?", val_mapping={ key: value["name"] for key, value in Keithley7510DigitizeSense.function_modes.items() }, docstring="Make readings using the active digitize function.", )

Make readings using the active digitize function.

buffer_name: Parameter = self.add_parameter( "buffer_name", get_cmd=None, set_cmd=None, docstring="Name of the reading buffer in use.", )

Name of the reading buffer in use.

trigger_block_list: Parameter = self.add_parameter( "trigger_block_list", get_cmd=":TRIGger:BLOCk:LIST?", docstring="Return the settings for all trigger model blocks.", )

Return the settings for all trigger model blocks.

trigger_in_ext_clear: Parameter = self.add_parameter( "trigger_in_ext_clear", set_cmd=":TRIGger:EXTernal:IN:CLEar", docstring="Clear the trigger event on the external in line.", )

Clear the trigger event on the external in line.

trigger_in_ext_edge: Parameter = self.add_parameter( "trigger_in_ext_edge", get_cmd=":TRIGger:EXTernal:IN:EDGE?", set_cmd=":TRIGger:EXTernal:IN:EDGE {}", vals=Enum("FALL", "RIS", "falling", "rising", "EITH", "either"), docstring="Type of edge that is detected as an input on the " "external trigger in line", )

Type of edge that is detected as an input on the external trigger in line

overrun_status: Parameter = self.add_parameter( "overrun_status", get_cmd=":TRIGger:EXTernal:IN:OVERrun?", docstring="Return the event detector overrun status.", )

Return the event detector overrun status.

digitize_trigger: Parameter = self.add_parameter( "digitize_trigger", get_cmd=":TRIGger:DIGitize:STIMulus?", set_cmd=":TRIGger:DIGitize:STIMulus {}", vals=Enum("EXT", "external", "NONE"), docstring="Set the instrument to digitize a measurement the next " "time it detects the specified trigger event.", )

Set the instrument to digitize a measurement the next time it detects the specified trigger event.

system_errors: Parameter = self.add_parameter( "system_errors", get_cmd=":SYSTem:ERRor?", docstring="Return the oldest unread error message from the event " "log and removes it from the log.", )

Return the oldest unread error message from the event log and removes it from the log.

property sense: Keithley7510Sense

We have different sense modules depending on the sense function.

Return the correct source module based on the sense function.

property digi_sense: Keithley7510DigitizeSense

We have different sense modules depending on the sense function.

Return the correct source module based on the sense function.

buffer(name: str, size: int | None = None, style: str = '') Keithley7510Buffer[source]
initiate() None[source]

This command starts the trigger model.

wait() None[source]

This command postpones the execution of subsequent commands until all previous overlapped commands are finished.

clear_status() None[source]

This command clears the event registers of the Questionable Event and Operation Event Register set. It does not affect the Questionable Event Enable or Operation Event Enable registers.

reset() None[source]

Returns the instrument to default settings, cancels all pending commands.

class qcodes.instrument_drivers.Keithley.Keithley7510Buffer(parent: Keithley7510, name: str, size: int | None = None, style: str = '')[source]

Bases: InstrumentChannel

Treat the reading buffer as a submodule, similar to Sense.

Attributes:

default_buffer

buffer_elements

inverted_buffer_elements

size

The number of readings a buffer can store.

number_of_readings

Get the number of readings in the reading buffer.

last_index

Get the last index of readings in the reading buffer.

first_index

Get the starting index of readings in the reading buffer.

data_start

First index of the data to be returned.

data_end

Last index of the data to be returned.

elements

List of buffer elements to read.

setpoints_start

Parameter setpoints_start

setpoints_stop

Parameter setpoints_stop

n_pts

Parameter n_pts

setpoints

Parameter setpoints

t_start

Parameter t_start

t_stop

Parameter t_stop

fill_mode

if a reading buffer is filled continuously or is filled once and stops

available_elements

n_elements

data

Methods:

set_setpoints(start, stop[, label])

get_last_reading()

This method requests the latest reading from a reading buffer.

clear_buffer()

Clear the data in the buffer

trigger_start()

This method makes readings using the active measure function and stores them in a reading buffer.

delete()

default_buffer: ClassVar[set[str]] = {'defbuffer1', 'defbuffer2'}
buffer_elements: ClassVar[dict[str, str]] = {'date': 'DATE', 'fractional_seconds': 'FRACtional', 'measurement': 'READing', 'measurement_formatted': 'FORMatted', 'measurement_status': 'STATus', 'measurement_unit': 'UNIT', 'relative_time': 'RELative', 'seconds': 'SEConds', 'time': 'TIME', 'timestamp': 'TSTamp'}
inverted_buffer_elements = {'DATE': 'date', 'FORMatted': 'measurement_formatted', 'FRACtional': 'fractional_seconds', 'READing': 'measurement', 'RELative': 'relative_time', 'SEConds': 'seconds', 'STATus': 'measurement_status', 'TIME': 'time', 'TSTamp': 'timestamp', 'UNIT': 'measurement_unit'}
size: Parameter = self.add_parameter( "size", get_cmd=f":TRACe:POINts? '{self.short_name}'", set_cmd=f":TRACe:POINts {{}}, '{self.short_name}'", get_parser=int, docstring="The number of readings a buffer can store.", )

The number of readings a buffer can store.

number_of_readings: Parameter = self.add_parameter( "number_of_readings", get_cmd=f":TRACe:ACTual? '{self.short_name}'", get_parser=int, docstring="Get the number of readings in the reading buffer.", )

Get the number of readings in the reading buffer.

last_index: Parameter = self.add_parameter( "last_index", get_cmd=f":TRACe:ACTual:END? '{self.short_name}'", get_parser=int, docstring="Get the last index of readings in the reading buffer.", )

Get the last index of readings in the reading buffer.

first_index: Parameter = self.add_parameter( "first_index", get_cmd=f":TRACe:ACTual:STARt? '{self.short_name}'", get_parser=int, docstring="Get the starting index of readings in the reading buffer.", )

Get the starting index of readings in the reading buffer.

data_start: Parameter = self.add_parameter( "data_start", initial_value=1, get_cmd=None, set_cmd=None, docstring="First index of the data to be returned.", )

First index of the data to be returned.

data_end: Parameter = self.add_parameter( "data_end", initial_value=1, get_cmd=None, set_cmd=None, docstring="Last index of the data to be returned.", )

Last index of the data to be returned.

elements: Parameter = self.add_parameter( "elements", get_cmd=None, get_parser=self._from_scpi_to_name, set_cmd=None, set_parser=self._from_name_to_scpi, vals=Lists(Enum(*list(self.buffer_elements.keys()))), docstring="List of buffer elements to read.", )

List of buffer elements to read.

setpoints_start: DelegateParameter = self.add_parameter( "setpoints_start", label="start value for the setpoints", source=None, parameter_class=DelegateParameter, )

Parameter setpoints_start

setpoints_stop: DelegateParameter = self.add_parameter( "setpoints_stop", label="stop value for the setpoints", source=None, parameter_class=DelegateParameter, )

Parameter setpoints_stop

n_pts: Parameter = self.add_parameter( "n_pts", label="total n for the setpoints", get_cmd=self._get_n_pts )

Parameter n_pts

setpoints: GeneratedSetPoints = self.add_parameter( "setpoints", parameter_class=GeneratedSetPoints, start=self.setpoints_start, stop=self.setpoints_stop, n_points=self.n_pts, vals=Arrays(shape=(self.n_pts.get_latest,)), )

Parameter setpoints

t_start: Parameter = self.add_parameter( "t_start", label="start time", unit="s", initial_value=0, get_cmd=None, set_cmd=None, set_parser=float, )

Parameter t_start

t_stop: Parameter = self.add_parameter( "t_stop", label="stop time", unit="s", initial_value=1, get_cmd=None, set_cmd=None, set_parser=float, )

Parameter t_stop

fill_mode: Parameter = self.add_parameter( "fill_mode", get_cmd=f":TRACe:FILL:MODE? '{self.short_name}'", set_cmd=f":TRACe:FILL:MODE {{}}, '{self.short_name}'", vals=Enum("CONT", "continuous", "ONCE", "once"), docstring="if a reading buffer is filled continuously or is filled" " once and stops", )

if a reading buffer is filled continuously or is filled once and stops

set_setpoints(start: Parameter, stop: Parameter, label: str | None = None) None[source]
property available_elements: set[str]
property n_elements: int
property data: DataArray7510
get_last_reading() str[source]

This method requests the latest reading from a reading buffer.

clear_buffer() None[source]

Clear the data in the buffer

trigger_start() None[source]

This method makes readings using the active measure function and stores them in a reading buffer.

delete() None[source]
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Keithley.Keithley7510DigitizeSense(parent: VisaInstrument, name: str, proper_function: str)[source]

Bases: InstrumentChannel

The Digitize sense module of the Keithley 7510 DMM.

Attributes:

function_modes

range

Determine the positive full-scale measure range.

input_impedance

Determine when the 10 MΩ input divider is enabled.

acq_rate

Define the precise acquisition rate at which the digitizing measurements are made.

aperture

Determine the aperture setting.

count

Set the number of measurements to digitize when a measurement is requested

function_modes: ClassVar[dict[str, _FunctionMode]] = {'None': {'name': '"NONE"', 'range_vals': None, 'unit': ''}, 'current': {'name': '"CURR"', 'range_vals': <Numbers 1e-05<=v<=10>, 'unit': 'V'}, 'voltage': {'name': '"VOLT"', 'range_vals': <Numbers 0.1<=v<=1000>, 'unit': 'V'}}
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
range: Parameter = self.add_parameter( "range", get_cmd=f":SENSe:DIGitize:{self._proper_function}:RANGe?", set_cmd=f":SENSe:DIGitize:{self._proper_function}:RANGe {{}}", vals=range_vals, get_parser=float, unit=unit, docstring="Determine the positive full-scale measure range.", )

Determine the positive full-scale measure range.

input_impedance: Parameter = self.add_parameter( "input_impedance", get_cmd=":SENSe:DIGitize:VOLTage:INPutimpedance?", set_cmd=":SENSe:DIGitize:VOLTage:INPutimpedance {}", vals=Enum("AUTO", "MOHM10"), docstring="Determine when the 10 input divider is enabled. " "'MOHM10' means 10 for all ranges.", )

Determine when the 10 MΩ input divider is enabled. ‘MOHM10’ means 10 MΩ for all ranges.

acq_rate: Parameter = self.add_parameter( "acq_rate", get_cmd=f":SENSe:DIGitize:{self._proper_function}:SRATE?", set_cmd=f":SENSe:DIGitize:{self._proper_function}:SRATE {{}}", vals=Ints(1000, 1000000), docstring="Define the precise acquisition rate at which the " "digitizing measurements are made.", )

Define the precise acquisition rate at which the digitizing measurements are made.

aperture: Parameter = self.add_parameter( "aperture", get_cmd=f":SENSe:DIGitize:{self._proper_function}:APERture?", set_cmd=f":SENSe:DIGitize:{self._proper_function}:APERture {{}}", unit="us", docstring="Determine the aperture setting.", )

Determine the aperture setting.

count: Parameter = self.add_parameter( "count", get_cmd="SENSe:DIGitize:COUNt?", set_cmd="SENSe:DIGitize:COUNt {}", vals=Ints(1, 55000000), docstring="Set the number of measurements to digitize when a " "measurement is requested", )

Set the number of measurements to digitize when a measurement is requested

class qcodes.instrument_drivers.Keithley.Keithley7510Sense(parent: VisaInstrument, name: str, proper_function: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

The sense module of the Keithley 7510 DMM, based on the sense module of Keithley 2450 SMU.

All parameters and methods in this submodule should only be accessible to the user if self.parent.sense_function.get() == self._proper_function. We ensure this through the ‘sense’ property on the main driver class which returns the proper submodule for any given function mode.

Parameters:
  • parent – Parent instrument.

  • name – Name of the channel.

  • proper_function – This can be one of modes listed in the dictionary “function_modes”, e.g., “current”, “voltage”, or “resistance”. “voltage”/”current” is for DC voltage/current. “Avoltage”/”Acurrent” is for AC voltage/current. “resistance” is for two-wire measurement of resistance. “Fresistance” is for Four-wire measurement of resistance.

  • **kwargs – Forwarded to base class.

Attributes:

function_modes

auto_range

Determine if the measurement range is set manually or automatically for the selected measure function.

range

Determine the positive full-scale measure range.

nplc

Set the time that the input signal is measured for the selected function.(NPLC = number of power line cycles)

auto_delay

Enable or disable the automatic delay that occurs before each measurement.

user_number

Set the user number for user-defined delay.

user_delay

Set a user-defined delay that you can use in the trigger model.

auto_zero

Enable or disable automatic updates to the internal reference measurements (autozero) of the instrument.

auto_zero_once

Cause the instrument to refresh the reference and zero measurements once

average

Enable or disable the averaging filter for measurements of the selected function.

average_count

Set the number of measurements that are averaged when filtering is enabled.

average_type

Set the type of averaging filter that is used for the selected measure function when the measurement filter is enabled.

Methods:

clear_trace([buffer_name])

Clear the data buffer

function_modes: ClassVar[dict[str, _FunctionMode]] = {'Acurrent': {'name': '"CURR:AC"', 'range_vals': <Numbers 0.001<=v<=10>, 'unit': 'A'}, 'Avoltage': {'name': '"VOLT:AC"', 'range_vals': <Numbers 0.1<=v<=700>, 'unit': 'V'}, 'Fresistance': {'name': '"FRES"', 'range_vals': <Numbers 1<=v<=1000000000.0>, 'unit': 'Ohm'}, 'current': {'name': '"CURR:DC"', 'range_vals': <Numbers 1e-05<=v<=10>, 'unit': 'V'}, 'resistance': {'name': '"RES"', 'range_vals': <Numbers 10<=v<=1000000000.0>, 'unit': 'Ohm'}, 'voltage': {'name': '"VOLT:DC"', 'range_vals': <Numbers 0.1<=v<=1000>, 'unit': 'V'}}
auto_range: Parameter = self.add_parameter( "auto_range", get_cmd=f":SENSe:{self._proper_function}:RANGe:AUTO?", set_cmd=f":SENSe:{self._proper_function}:RANGe:AUTO {{}}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), docstring="Determine if the measurement range is set manually or " "automatically for the selected measure function.", )

Determine if the measurement range is set manually or automatically for the selected measure function.

range: Parameter = self.add_parameter( "range", get_cmd=f":SENSe:{self._proper_function}:RANGe?", set_cmd=f":SENSe:{self._proper_function}:RANGe {{}}", vals=range_vals, get_parser=float, unit=unit, docstring="Determine the positive full-scale measure range.", )

Determine the positive full-scale measure range.

nplc: Parameter = self.add_parameter( "nplc", get_cmd=f":SENSe:{self._proper_function}:NPLCycles?", set_cmd=f":SENSe:{self._proper_function}:NPLCycles {{}}", vals=Numbers(0.01, 10), get_parser=float, docstring="Set the time that the input signal is measured for the " "selected function.(NPLC = number of power line cycles)", )

Set the time that the input signal is measured for the selected function.(NPLC = number of power line cycles)

auto_delay: Parameter = self.add_parameter( "auto_delay", get_cmd=f":SENSe:{self._proper_function}:DELay:AUTO?", set_cmd=f":SENSe:{self._proper_function}:DELay:AUTO {{}}", val_mapping=create_on_off_val_mapping(on_val="ON", off_val="OFF"), docstring="Enable or disable the automatic delay that occurs " "before each measurement.", )

Enable or disable the automatic delay that occurs before each measurement.

user_number: Parameter = self.add_parameter( "user_number", get_cmd=None, set_cmd=None, vals=Ints(1, 5), docstring="Set the user number for user-defined delay.", )

Set the user number for user-defined delay.

user_delay: Parameter = self.add_parameter( "user_delay", get_cmd=self._get_user_delay, set_cmd=self._set_user_delay, vals=Numbers(0, 1e4), unit="second", docstring="Set a user-defined delay that you can use in the " "trigger model.", )

Set a user-defined delay that you can use in the trigger model.

auto_zero: Parameter = self.add_parameter( "auto_zero", get_cmd=f":SENSe:{self._proper_function}:AZERo?", set_cmd=f":SENSe:{self._proper_function}:AZERo {{}}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), docstring="Enable or disable automatic updates to the internal " "reference measurements (autozero) of the instrument.", )

Enable or disable automatic updates to the internal reference measurements (autozero) of the instrument.

auto_zero_once: Parameter = self.add_parameter( "auto_zero_once", set_cmd=":SENSe:AZERo:ONCE", docstring="Cause the instrument to refresh the reference and " "zero measurements once", )

Cause the instrument to refresh the reference and zero measurements once

average: Parameter = self.add_parameter( "average", get_cmd=f":SENSe:{self._proper_function}:AVERage?", set_cmd=f":SENSe:{self._proper_function}:AVERage {{}}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), docstring="Enable or disable the averaging filter for measurements " "of the selected function.", )

Enable or disable the averaging filter for measurements of the selected function.

average_count: Parameter = self.add_parameter( "average_count", get_cmd=f":SENSe:{self._proper_function}:AVERage:COUNt?", set_cmd=f":SENSe:{self._proper_function}:AVERage:COUNt {{}}", vals=Numbers(1, 100), docstring="Set the number of measurements that are averaged when " "filtering is enabled.", )

Set the number of measurements that are averaged when filtering is enabled.

average_type: Parameter = self.add_parameter( "average_type", get_cmd=f":SENSe:{self._proper_function}:AVERage:TCONtrol?", set_cmd=f":SENSe:{self._proper_function}:AVERage:TCONtrol {{}}", vals=Enum("REP", "rep", "MOV", "mov"), docstring="Set the type of averaging filter that is used for the " "selected measure function when the measurement filter " "is enabled.", )

Set the type of averaging filter that is used for the selected measure function when the measurement filter is enabled.

clear_trace(buffer_name: str = 'defbuffer1') None[source]

Clear the data buffer

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Keithley.KeithleyS46(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

Attributes:

relay_names

channel_numbers

aliases

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

closed_channels

Parameter closed_channels

relay_layout

The relay layout tells us how many channels we have per relay.

available_channels

Methods:

open_all_channels()

relay_names: list[str] = ['A', 'B', 'C', 'D', 'R1', 'R2', 'R3', 'R4', 'R5', 'R6', 'R7', 'R8']
channel_numbers: ClassVar[dict[str, int]] = {'A1': 1, 'A2': 2, 'A3': 3, 'A4': 4, 'A5': 5, 'A6': 6, 'B1': 7, 'B2': 8, 'B3': 9, 'B4': 10, 'B5': 11, 'B6': 12, 'C1': 13, 'C2': 14, 'C3': 15, 'C4': 16, 'C5': 17, 'C6': 18, 'D1': 19, 'D2': 20, 'D3': 21, 'D4': 22, 'D5': 23, 'D6': 24, 'R1': 25, 'R2': 26, 'R3': 27, 'R4': 28, 'R5': 29, 'R6': 30, 'R7': 31, 'R8': 32}
aliases: ClassVar[dict[int, str]] = {1: 'A1', 2: 'A2', 3: 'A3', 4: 'A4', 5: 'A5', 6: 'A6', 7: 'B1', 8: 'B2', 9: 'B3', 10: 'B4', 11: 'B5', 12: 'B6', 13: 'C1', 14: 'C2', 15: 'C3', 16: 'C4', 17: 'C5', 18: 'C6', 19: 'D1', 20: 'D2', 21: 'D3', 22: 'D4', 23: 'D5', 24: 'D6', 25: 'R1', 26: 'R2', 27: 'R3', 28: 'R4', 29: 'R5', 30: 'R6', 31: 'R7', 32: 'R8'}
default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

closed_channels: Parameter

Parameter closed_channels

open_all_channels() None[source]
property relay_layout: list[int]

The relay layout tells us how many channels we have per relay. Note that we can have zero channels per relay.

property available_channels: list[str]
visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
exception qcodes.instrument_drivers.Keithley.KeithleyS46LockAcquisitionError[source]

Bases: Exception

class qcodes.instrument_drivers.Keithley.KeithleyS46RelayLock(relay_name: str)[source]

Bases: object

The S46 either has six pole or a four pole relays. For example, channels ‘A1’ to ‘A6’ are all on relay ‘A’. However, channels ‘R1’ to ‘R8’ are all on individual relays.

Only one channel per relay may be closed at any given time to prevent degradation of RF performance and even switch damage. See page 2-11 of the manual. To enforce this, a lock mechanism has been implemented.

Methods:

acquire(channel_number)

Request a lock acquisition

release(channel_number)

Release a lock.

acquire(channel_number: int) None[source]

Request a lock acquisition

release(channel_number: int) None[source]

Release a lock.