stoner_measurement.plugins.state_scan.keithley_2400.Keithley2400PointScanPlugin

class stoner_measurement.plugins.state_scan.keithley_2400.Keithley2400PointScanPlugin(parent=None)[source]

Bases: StateScanPlugin

Step a Keithley 2400 through source points and capture per-point readings.

Use this plugin when the Keithley 2400 should behave like a discrete scan axis rather than executing an internal list sweep. The sequence scan generator defines the source values. For each point, the plugin sets the SMU source level directly and can use the instrument trigger model to wait for an immediate, bus, external, trigger-link, or timer-based trigger before taking a reading.

The plugin exposes the measured current, voltage, resistance, power, and timestamp through reported_values(), so they can be collected into the state scan’s TraceData table or consumed by nested sub-steps in the sequence.

In voltage-source mode, the scan variable is the programmed source voltage and compliance is expressed as a current limit unless resistance-derived mode is selected. In current-source mode, the scan variable is the programmed source current and compliance is expressed as a voltage limit, or derived from a maximum allowed resistance. Unlike the buffered trace-sweep plugin, this state-scan variant does not program an internal LIST sweep or return a trace object. Instead, it applies one source value at a time so other sequence steps can run between points.

The Scan tab defines the point sequence through the normal state-scan generator. The Settings tab mirrors the richer buffered trace-plugin layout, with nested Basic and Advanced pages. The Basic page contains the model (2400, 2410 or 2450), GPIB resource, source mode, compliance mode, fixed or resistance-derived compliance limit, integration time, source and trigger delays, output-enable behaviour during each point, and source/measurement range options. The Advanced page contains terminal selection, 2-wire or 4-wire wiring, trigger routing and trigger I/O options, and digital or median filtering.

Because this is a state-scan plugin, the measured values are exposed through reported_values() rather than returned as a trace object. This allows the current point’s source value, measured voltage, measured current, resistance, power, and timestamp to be collected into the state scan’s TraceData table or used by nested sequence steps.

Variables:
  • _smu (Keithley2400 | None) – Connected driver for the selected SourceMeter, if any.

  • _model (str) – SourceMeter model: "2400" (default), "2410" or "2450".

  • _resource (str) – VISA/GPIB resource string identifying the selected SourceMeter.

  • _source_mode (SweepSourceMode) – Whether the plugin sources voltage or current.

  • _compliance_mode (ComplianceMode) – Whether compliance is fixed directly or derived from resistance.

  • _target_value (float) – Most recently programmed source set-point.

  • _compliance (float) – Fixed current or voltage compliance limit, depending on source mode.

  • _compliance_resistance (float) – Resistance threshold used when resistance-derived compliance is selected.

  • _nplc (float) – Integration time in power-line cycles.

  • _source_delay (float) – Delay after each source update.

  • _trigger_delay (float) – Delay between trigger reception and measurement.

  • _enable_output_during_measurement (bool) – Whether the SMU output is enabled while a point measurement runs.

  • _trigger_routing (TriggerRouting) – Selected point-trigger routing mode.

  • _trigger_count_override (int) – Optional manual trigger count override.

  • _arm_count (int) – Arm-layer count passed to the instrument trigger model.

  • _timer_interval (float) – Timer interval used in timer-trigger mode.

  • _enable_trigger_out (bool) – Whether trigger output signalling is enabled.

  • _trigger_out_line (int) – Trigger-link output line number.

  • _trigger_in_line (int) – Trigger-link input line number.

  • _source_range_mode (RangeMode) – Whether the source range is automatic or fixed.

  • _source_range (float) – Fixed source range value when enabled.

  • _sense_range_mode (RangeMode) – Whether the sense range is automatic or fixed.

  • _sense_range (float) – Fixed sense range value when enabled.

  • _connection_mode (ConnectionMode) – Whether measurements use 2-wire or 4-wire wiring.

  • _terminal_mode (TerminalMode) – Whether the front or rear terminals are used.

  • _filter_enabled (bool) – Whether the digital filter is enabled.

  • _filter_count (int) – Number of readings used by the digital filter.

  • _filter_type (FilterType) – Digital filter mode used by the instrument.

  • _median_filter_enabled (bool) – Whether the median filter is enabled.

  • instance_name (str) – Inherited Python identifier for this instance in the Script tab and QtConsole.

  • comment (str) – Inherited optional note displayed beside this step.

  • sequence_engine (SequenceEngine | None) – Inherited owning engine and its live namespace; None while detached.

  • scan_generator (BaseScanGenerator) – Inherited generator defining successive sequence points.

  • value (float) – Inherited current sequence control value.

  • ix (int) – Inherited zero-based iteration index.

  • meas_flag (bool) – Inherited flag indicating a measurement point.

  • collect_data (bool) – Inherited switch enabling collection of selected sequence outputs.

  • data (TraceData) – Inherited accumulated table; inspect data.df after collection.

Keyword Parameters:

parent (QObject | None) – Optional Qt parent object.

Examples

With an instance named k2400_point_scan in the sequence, use the QtConsole to inspect or edit it before running. Substitute your instance name if different; result data reflects completed steps:

k2400_point_scan._compliance = 5.0
k2400_point_scan._model = "2410"
k2400_point_scan.collect_data = True
k2400_point_scan.data.df.head()
configure() → None[source]

Program source mode, reading format, trigger model, and compliance.

Raises:
  • RuntimeError – If the plugin is not connected to an instrument.

  • Exception – Propagates instrument communication or configuration errors raised by the underlying driver.

connect() → None[source]

Open the SMU connection and verify its identity.

Raises:

Exception – Propagates connection or identity-verification failures after attempting to close any partially opened transport.

declared_outputs() → PluginOutputs[source]

Declare configured outputs and their physical units together.

disconnect() → None[source]

Return the SMU to a safe state and release resources.

The plugin attempts best-effort cleanup by aborting activity, disabling output, and disconnecting the transport even if some of those operations fail.

get_state() → float[source]

Return the current programmed source value.

Returns:

The most recently requested source set-point.

Return type:

(float)

is_at_target() → bool[source]

Return True because each point acquisition completes in set_state().

Returns:

Always True once set_state() returns.

Return type:

(bool)

property name: str

Unique identifier for this plugin.

Returns:

Always "Keithley2400PointScan".

Return type:

(str)

set_state(value: float) → None[source]

Set the next source level and acquire a single reading at that point.

Parameters:

value (float) – Source set-point to program for this measurement point.

Raises:
  • RuntimeError – If the plugin is not connected to an instrument.

  • ValueError – If resistance-derived compliance is selected with invalid settings, such as non-positive resistance or zero voltage in voltage-source mode.

property settle_timeout: float

Return a practical timeout for externally triggered point acquisition.

Returns:

A timeout in seconds based on configured delays, with a conservative minimum.

Return type:

(float)

property state_name: str

Human-readable name of the controlled quantity.

Returns:

"Voltage" in voltage-source mode, otherwise "Current".

Return type:

(str)

to_json() → dict[str, Any][source]

Serialise plugin state.

Returns:

JSON-serialisable dictionary describing the current plugin configuration.

Return type:

(dict[str, Any])

property units: str

Physical units of the controlled quantity.

Returns:

"V" in voltage-source mode, otherwise "A".

Return type:

(str)