devctrl.devices.voltmeter.impl.keithley2700.Keithley2700#
- class Keithley2700(instr, check_front_switch=True)[source]#
Bases:
VoltmeterWrapper class for the Keithley2700 SMU controlled via pyvisa
Methods
Manually add a specific device.
allow_only_dummy_devicesThe Keithley2700 cant beep on command :(
buffer_clearbuffer_get_sizebuffer_measureRead new values from the buffer.
buffer_set_sizeConnect to a Keithley 2700 device
Connect an instance of the device's dummy implementation
Return a flat dictionary of all base classes below this class :param recurse: If True, recursively search for base classes :return: dict of {class name: class}
Query the status of the device and return a string describing errors.
Check if the device is connected and responding
Get a list of all devices for this type.
Continuously measure voltage at regular intervals
Process a raw reading string into timestamp and voltage values
queryquery_intRead a single voltage measurement
Reset the device
Run SCPI code on the device by writing it
Load and execute a SCPI script file
- classmethod add_device(connect_info)#
Manually add a specific device. The device will show up when list_devices() is called for the device type. Call this from the device class implementation, e.g. use ModelXYZ9000.add_device(‘GPIB:1234:5678’) to add a specific device with a fixed GPIB address. This is useful when automatic discovery is undesired/impossible, either because it is not implemented or it disturbs other devices which can’t handle a identification request. :param cls: The device implementation class :param connect_info: A string argument that is passed to the connect() method of the device implementation, when the device is being connected.
- buffer_read_new_values() list[tuple[float, float]][source]#
Read new values from the buffer. :raises: RuntimeError if no buffer measurement was started :raises: ValueError if no new values have been measured yet :returns: List of (timestampe, voltage)
- classmethod connect(device_type_name: str, device_name: str | None, **kwargs) Device#
- Parameters:
device_type_name – The name of the device class
device_name – The name of the device class
- classmethod connect_device(device_name)[source]#
Connect to a Keithley 2700 device
Opens a VISA connection to the specified device and returns a configured instance.
- Parameters:
device_name – VISA resource name of the device
- Returns:
Configured Keithley2700 instance
- classmethod connect_dummy(**kwargs) Device#
Connect an instance of the device’s dummy implementation
- classmethod get_base_classes(recurse=True) dict[str, type[Device]]#
Return a flat dictionary of all base classes below this class :param recurse: If True, recursively search for base classes :return: dict of {class name: class}
- classmethod get_device_name() str#
- Returns:
The specific type name of the device, e.g., SR830 or Keithly2600
- classmethod get_device_type_name() str#
- Returns:
The general type name of the device, e.g., Lock-In Amplifier or Voltmeter
- get_status() str#
Query the status of the device and return a string describing errors. If everything is ok, empty string must be returned :return: String of device status
- is_connected() bool[source]#
Check if the device is connected and responding
Queries the device identification string to verify connection.
- Returns:
True if device responds to *IDN? query, False otherwise
- classmethod list_devices() list[tuple[str, str]]#
Get a list of all devices for this type. The list made up of: - Manually added devices - Available devices (those returned by _enumerate_devices) - A dummy device (if a dummy implementation exists) - List of all devices of child classes
- Returns:
list of available devices
- measure(interval: int, update_func: Callable[[int, float, float], None] | None = None, max_measurements: int | None = None)[source]#
Continuously measure voltage at regular intervals
Takes voltage readings at the specified interval, optionally calling an update function after each reading. Continues until max_measurements is reached or forever if None.
- Parameters:
interval – Milliseconds to wait between readings
update_func – Function called after each reading with (n_reading, time, voltage). None for no callback
max_measurements – Number of readings to perform. None for infinite measurements
- process_reading(reading: str) tuple[float, float][source]#
Process a raw reading string into timestamp and voltage values
Parses the Keithley 2700 format reading string and extracts the timestamp and voltage DC values.
- Parameters:
reading – Raw reading string from the device
- Returns:
Tuple of (timestamp, voltage) values
- Raises:
ValueError – If the reading format is invalid
- read_value() tuple[float, float][source]#
Read a single voltage measurement
Queries the device for a reading and processes it into timestamp and voltage values.
- Returns:
Tuple of (timestamp, voltage) values