InstroELoad#

class InstroELoad(
name: str | None = None,
driver: ELoadDriverBase | None = None,
publishers: list[Publisher] | None = None,
config: ELoadConfig | dict | Path | str | None = None,
autostart: bool = False,
**kwargs,
)[source]#

Bases: Instrument

Electronic-load instrument. Methods return Measurement/Command for publishing.

Initialize an InstroELoad.

Provide either config or driver, not both.

Parameters:
  • name – Channel-name prefix for published data. Falls back to config.device.name when config is given.

  • driver –

    Concrete E-Load driver; owns its own transport:

    eload = InstroELoad(
        "main",
        driver=BK85XXB("ASRL19::INSTR"),
    )
    

  • publishers – Publishers that receive emitted Measurement/Command data. Combined with any publishers declared in config.

  • config – An ELoadConfig, a dict, or a path to a JSON config file. Its load block is applied through the public setters on open(); the input is never enabled from config.

  • autostart – When True, open the connection and start background polling.

  • **kwargs – Default tags applied to every emitted Measurement/Command. Pass dataset_rid="<rid>" to auto-create a NominalCorePublisher (uses the on-disk ‘default’ Nominal credential).

Attributes

background_interval

Seconds between background daemon iterations (0 = no wait).

channel_names

Return an insertion-ordered snapshot of all published channel names.

Methods

add_background_daemon_function

Append method to the daemon's call list.

add_publisher

Register a publisher to receive this instrument's Measurement/Command data.

close

Close the underlying driver and stop the daemon.

define_background_daemon

Replace all daemon functions with a single method (called with the given args).

get_channel

Return the most recent length samples for channel_name from the in-memory buffer.

get_current

Measure the current (amperes) sensed on channel.

get_single_channel_value

Return the most recent sample for channel_name from the in-memory buffer.

get_voltage

Measure the voltage (volts) sensed on channel.

open

Open the underlying driver and apply any configured load state.

output_enable

Enable or disable the output on channel.

publish

Fan data out to every configured publisher; kwargs pass through.

set_level

Set the operating level in the active mode's units (CC: A, CV: V, CP: W, CR: Ω).

set_mode

Set the channel's operation mode: CC, CR, CP, or CV.

set_range

Set the range from the expected maximum operating value in the active mode's units (CC: A, CV: V, CP: W, CR: Ω).

set_slewrate

Set the per-edge current slew rate (A/μs) for direction (RISE/FALL/BOTH).

short_output

Enable or disable the channel short.

start

Start the background daemon thread.

stop

Signal the background daemon to stop and join it.