rminstr.instruments.K2450

Classes

SMUSourceSweep

Implementation of a source sweeping smu on K2450.

DCSubPowerMeter

Control the K2450 behaving as a DC substituted power meter.

Package Contents

class rminstr.instruments.K2450.SMUSourceSweep(visa_address: str, resource_manager: pyvisa.ResourceManager = None, log_path: str = None)

Bases: rminstr.instruments.communications.TSPRunner, rminstr.instruments.measurement_functionalities.ABC_SMUSourceSweep

Implementation of a source sweeping smu on K2450.

This is the implementation of the sourcesweep measurement functionality of for the K2450 using tsp scripts. This class inherits from the TSPRunner and _abc_smu_sourcesweep classes. This class also inherits some default behaviours from the abstract class. Relevant to the user, these are:

  1. Methods must follow the state model, can not be called from the wrong state or a warning is raised and nothing happens

  2. Settings are automatically stored in a local dictionary when set

Attributes

panel_configurationslist

Possible panel connections for the SMU.

overvoltageslist

List of over voltage protection values that can be commanded to the SMU.

Initialize source sweep smu.

Parameters:
visa_addressstr

Visa address of instrument.

resource_managervisa.ResourceManager, optional

Pyvisa resource manager for opening visa resources. The default is None.

log_pathstr, optional

If provided, will log at the specified path. The default is None.

Returns:
None.
info_dict
panel_configurations = ['rear', 'front']
overvoltages
default_setup_settings
initial_setup(wiring: str = None, source_measure: str = None, panel: str = None, **kwargs)

Initialize K2450 as a source sweep smu.

Initialization method for the K2450. Passed key word arguments are stored in a local dictionary.

Parameters:
wiringstr, optional

Either ‘4W’ or ‘2W’. The default is None.

source_measurestr, optional

Sets up what is being sourced/measured using a naming convention. ‘SVMI’ set it to source volts and measure current; ‘SIMV’ sets it to source current and measure voltage. The default is None.

panelstr, optional

Either ‘rear’ or ‘front’. The default is None.

Returns:
None.
Raises:
InstrumentError

Instrument error if the instrument has errors or is in an error state.

setup(source: str = None, source_level: float = None, source_range: float = None, source_ilimit: float = None, measure_range: float = None, measure_autozero: bool = None, over_voltage_protection: float = None, measure_for_duration_or_count: str = None, duration_per_level: float = None, initial_level_duration: float = None, count_per_level: int = None, nplc: float = None, source_readback: bool = None, source_delay: float = None, source_trigger_levels: list = None, buffer_size: float = None, buffer_fill_mode: str = None, **kwargs)

Change the SMU settings.

Source and current values are in units of Volts or Amps, depending on the configuration of the SMU

Parameters:
sourcestr, optional

Whether or not the source is on. Either ‘off’ or ‘on’. The default is None.

source_levelfloat, optional

Value to set the source to. This will not turn on or off the source. The default is None.

source_rangefloat, str, optional

Range of the source, in units dependent on your source settings. If ‘auto’, smu will set range automatically. The default is None.

source_ilimitfloat, optional

Hardware current limiter setting on the source output. The default is None.

measure_rangefloat, optional

Measurment range in units dependent on the measure settings. If ‘auto’ smu will set range automatically. The default is None.

measure_autozerobool, optional

If True, measurements will autozero between each reading. If False, the SMU will only autozero once immediately after being triggered. The default is None.

over_voltage_protectionfloat, optional

Sets the voltage protector on the SMU. See overvoltages attribute for list of possible values. The method will round up to the nearest possible value. The default is None.

measure_for_duration_or_countstr, optional

Either ‘count’ or ‘duration’. Sets the source sweep to be given each source level as set number of measurements or measure for a set amount of time. The default is None.

duration_per_levelfloat, optional

How long to measure each sweep value for if measurements are set to duration. The default is None.

initial_level_durationfloat, optional

If set, will change the initial duration for source sweep value if measurements are set to duration. Set to negative value to turn off this setting, and use duration _per_level for every source value.

count_per_levelint, optional

How many measurements to take if measurements are set to count. The default is None.

nplcfloat, optional

How long to integrate measurements for in power line cycles (about 1/60 seconds). The default is None.

source_readbackbool, optional

If true, the SMU will measure the source value it gives. This will approximatley double the measurement time per sample. Otherwise it will report the nominal setpoint value. The default is None.

source_delayfloat or str, optional

Time to wait before taking a measurement after changing source level. if ‘auto’ SMU will automatically set delay. The default is None.

source_trigger_levelsiter, optional

Source levels to sweep through on trigger. If ‘auto’ the SMU will measure at whatever the current source level is at. The default is None.

buffer_sizefloat, optional

Number of readings to allocate for in the memory buffer. The default is None.

buffer_fill_modestr, optional

Either ‘fill_once’ or ‘continuous’. Determines how the SMU handles taking more readings than allocated for by buffer_size. The default is ‘fill_once’. ‘fill_once’ will fill the buffer then stop, ‘continuous’ will overwrite previous readings.

Returns:
None.
Raises:
InstrumentError

Instrument error if the instrument has errors or is in an error state.

arm(delay: float = 0, trigger_source: str = 'bus', trigger_timeout: float = 100000.0, trigger_mode: str = None)

Arm the SMU.

Returns:
None.
trigger()

Trigger the SMU.

Returns:
None.
fetch_data(delete_buffer: bool = True, meas_start_time: float = None) dict

Fetch data from the buffer.

Parameters:
delete_bufferbool, optional

If True, deallocates the buffer from the SMU’s memory. The default is False.

meas_start_timefloat, optional

If provided, will be used as timestamp for time of trigger. The default is None.

Returns:
dict

Dictionary of measurements. Columns are automatically named based on how the instrument was initalized.

query_state()

Check the state of the machine according to state model.

Returns:
statestr

Current state of the instrument.

get_errors()

Not implemented.

Returns:
None.
get_machine_info()

Poll machine for serial and firmware version numbers.

Returns serial, firmware

Returns:
str

Serial of SMU.

str

Firmware version of SMU.

do_after_group_trigger()

Run post-trigger commands after an external trigger event.

Returns:
None.
class rminstr.instruments.K2450.DCSubPowerMeter(visa_address: str, resource_manager: pyvisa.ResourceManager = None, log_path: str = None)

Bases: rminstr.instruments.measurement_functionalities.ABC_DCSubPowerMeter, rminstr.instruments.communications.TSPRunner

Control the K2450 behaving as a DC substituted power meter.

Attributes

sensor_typesstr,

Type of sensors that are supported in the code (currently only “platinum_thinfilm”).

panel_configurationslist

Possible panel connections for the SMU (‘rear’ or ‘front’).

overvoltageslist

list of over voltage protection values that can be commanded to the SMU.

Initialize the DC substituted power meter.

Parameters:
visa_addressstr

Visa address of instrument.

resource_managervisa.ResourceManager, optional

Pyvisa resource manager for opening visa resources. The default is None.

log_pathstr, optional

If provided, will log at the specified path. The default is None.

Returns:
None.
meas_start_time = 0
sensor_types = ['platinum_thinfilm', 'thermistor']
panel_configurations = ['rear', 'front']
overvoltages
default_setup_settings
fetch_data

Take arguments and keyword arguments that definef fetching_data of the instrument.

Implemented in the child classes. Kwargs get passed as raw commands if they are not in the header of the function.

Parameters:
**kwargsdict

Any keyword arguments the fetch_data function should have.

Returns:
None.
initial_setup(sensor_type: str = None, panel: str = None, initial_source: float = 0, **kwargs)

Set initial setup of K2450 as a DC substituted power meter.

Passed key word arguments are stored in a local dictionary. Determines the sensor type, panel, and other commands that are setup before an experiment begins or to reset the instrument; it places the instrument into a known safe state.

Parameters:
sensor_type: str,optional

Type of sensor being controlled. Must be ‘platinum_thinfilm’ or ‘thermistor’.

panelstr, optional

Either ‘rear’ or ‘front’. The default is None.

initial_sourcefloat, optional

The feedback loop will be initialized to source this value (Volts for thinfilms and Amps for thermistors).

Returns:
None.
Raises:
InstrumentError

Instrument error if the instrument has errors or is in an error state.

setup(resistance_setpoint: float = None, k_p: float = None, k_i: float = None, n_filter: float = None, duration: float = None, source_ubound: float = None, source_lbound: float = None, source: str | bool = None, source_level: float = None, source_range: float = None, source_ilimit: float = None, measure_range: float = None, measure_autozero: bool = None, over_voltage_protection: float = None, nplc: float = None, source_readback: bool = None, source_delay: float = None, buffer_size: float = None, buffer_fill_mode: str = None, v0_cal: float = None, vm_cal: float = None, i0_cal: float = None, im_cal: float = None, trigger_var: float = None, max_source_diff: float = None, **kwargs)

Change the settings of the K2450.

Source and current values are in units of Volts or Amps, depending on the configuration of the SMU

Parameters:
resistance_setpointfloat, optional

The setpoint resistance.

k_pfloat, optional

The proportional gain on linear controller.

k_ifloat, optional

The intergral gain on linear controller.

n_filterint, optional

The window sample size for the rolling average filtering. 0 Turns filter off, window size can be 1-100 samples.

durationfloat, optional

How long to hold control loop for.

source_uboundfloat, optional

Software upper limit on sourced value.

source_lboundfloat, optional

Software lower limit on sourced value.

sourceUnion[str, bool], optional

Whether or not to turn the source on or off. Either ‘off’/’on’ or True/False.

source_levelfloat, optional

Value to set the source to.

source_rangeUnion[float, str], optional

If ‘auto’, smu will set range automatically.

source_ilimitfloat, optional

Current limiter setting on the source output.

measure_rangefloat, optional

Measurment range. If ‘auto’ smu will set range automatically.

measure_autozerobool, optional

If true, measurements will autozero between each reading. If false, the SMU will only autozero once immediatley after being triggered.

over_voltage_protectionfloat, optional

Sets the voltage protector on the SMU. See overvoltages attribute for list of possible values. The method will round up to the neares possible value.

nplcfloat, optional

How long to integrate measurements for in power line cycles (about 1/60 seconds).

source_readbackbool, optional

If true, the SMU will measure the source value it gives, Otherwise it will return the nominal value. This will approximatley double the measurement time per sample.

source_delayUnion[float, str], optional

Time to wait before taking a measurement after changing source level. if ‘auto’ SMU will automatically set delay.

buffer_sizefloat, optional

Number of readings to allocated memory for the buffer.

buffer_fill_modestr, optional

Either ‘fill_once’ or ‘continuous’. Determines how the SMU handles taking more readings than allocated for by buffer_size. The default is ‘fill_once’. ‘fill_once’ will fill the buffer then stop, ‘continuous’ will overwrite previous readings.

v0_calfloat, optional

Calibrated Voltage offset (V). The default is None.

vm_calfloat, optional

Calibrated voltage slope correction (V/V). The default is None.

i0_calfloat, optional

Calibrated current offset correction (A). The default is None.

im_calfloat, optional

Calibrated current slope correction (A/A). The default is None.

trigger_varfloat, optional

Threshhold for source value to send trigger pulses when compared against square of finite difference of the source. Set to zero to turn off output trigger pulses. The default is None.

max_source_difffloat

Maximum change in source value during the feedback loop. Doesn’t apply to thinfilms. Only used for thermistors to handle noe-linearity on the IV curve.

other_commandslist[str]

any other commands are passed through to the SMU automatically.

**kwargs

Catches any commands that aren’t recognized.

Returns:
None.
Raises:
InstrumentError

Instrument error if the instrument has errors or is in an error state.

arm(delay: float = 0, trigger_source: str = 'bus', trigger_timeout: float = 100000.0, trigger_out: bool = False)

Arm the SMU.

trigger_source: str, optional

Either ‘bus’ or ‘ext’. Bus will trigger by GPIB bus (either through self.trigger() or a GPIB GET command through a GPIB interface). Ext will trigger externally by digital i/o pin 1.

trigger_timeout: float,

How long to wait for a trigger signal before continuing the feedback loop. The default is 1e5s.

trigger_out; bool,

If True, asserts a trigger pulse over digital i/o pin 6 when triggered. The default is False.

delay: float,

How long to wait after a trigger before starting the feedback loop. The default is 0.

Returns:
None.
trigger(*instruments)

Trigger a DC susbtituted power measurement.

Returns:
None.
query_state()

Check the state of the machine according to state model.

Returns:
str

Current state of the instrument.

get_machine_info()

Poll machine for serial and firmware version numbers.

Returns:
str

Serial of SMU.

str

Firmware version of SMU.

close()

Close out the instrument safely.

Returns:
None.