Electronic Load¤
Interface¤
Bases: Instrument
Electronic-load instrument. Methods return Measurement/Command for publishing.
Parameters:
-
(name¤str) –Channel-name prefix for published data.
-
(driver¤ELoadDriverBase) –Concrete E-Load driver; owns its own transport::
eload = InstroELoad( "main", driver=BK85XXB("ASRL19::INSTR"), )
-
(publishers¤list[Publisher] | None, default:None) –Publishers that receive emitted Measurement/Command data.
-
–**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).
background_interval
property
writable
¤
background_interval
Seconds between background daemon iterations (0 = no wait).
background_enable
property
writable
¤
background_enable
Whether the background daemon is enabled (must still be start()-ed).
add_publisher
¤
add_publisher(publisher: Publisher)
Register a publisher to receive this instrument's Measurement/Command data.
publish
¤
publish(data: Measurement | Command, **kwargs)
Fan data out to every configured publisher; kwargs pass through.
add_background_daemon_function
¤
add_background_daemon_function(method: Callable, *args, **kwargs)
Append method to the daemon's call list. Use define_background_daemon to replace instead.
get_channel
¤
get_channel(
channel_name: str,
length: int = 1,
wait_for_latest: bool = False,
timeout: float = 10.0,
) -> Measurement
Return the most recent length samples for channel_name from the in-memory buffer.
Parameters:
-
(channel_name¤str) –Name of the channel to retrieve.
-
(length¤int, default:1) –Number of trailing samples to return.
-
(wait_for_latest¤bool, default:False) –Block until at least
lengthnew values arrive. -
(timeout¤float, default:10.0) –Seconds to wait when
wait_for_latest=True.
Raises:
-
RuntimeError–No background buffer;
start()was not called. -
ChannelNotFoundTimeoutError–wait_for_latest=Trueand channel did not appear withintimeout. -
ChannelValueTimeoutError–wait_for_latest=Trueand values did not arrive withintimeout.
define_background_daemon
¤
define_background_daemon(method: Callable, *args, **kwargs)
Replace all daemon functions with a single method (called with the given args).
set_mode
¤
Set the channel's operation mode: CC, CR, CP, or CV. Not all models support every mode.
set_level
¤
Set the operating level in the active mode's units (CC: A, CV: V, CP: W, CR: Ω).
curr_limit applies only in CV mode. Raises ValueError if no mode has been set.
short_output
¤
Enable or disable the channel short.
Warning
Takes effect IMMEDIATELY. enable=True shorts the channel output.
set_range
¤
Set the range from the expected maximum operating value in the active mode's units (CC: A, CV: V, CP: W, CR: Ω).
Raises ValueError if no mode has been set.
set_slewrate
¤
set_slewrate(
direction: SlewRateDirection,
rate: float,
channel: int = 1,
**kwargs,
) -> Command
Set the per-edge current slew rate (A/μs) for direction (RISE/FALL/BOTH).
output_enable
¤
Enable or disable the output on channel.
get_current
¤
get_current(channel: int = 1, **kwargs) -> Measurement | None
Measure the current (amperes) sensed on channel. Returns None if unavailable.
get_voltage
¤
get_voltage(channel: int = 1, **kwargs) -> Measurement | None
Measure the voltage (volts) sensed on channel. Returns None if unavailable.
Types & Configuration¤
E-Load shared types: LoadMode and SlewRateDirection.
LoadMode
¤
Driver Interface¤
Bases: ABC
Vendor E-Load driver contract. Concrete drivers own their transport and lifecycle.
short_output
abstractmethod
¤
Apply or release the load's short on channel. Takes effect immediately.
set_mode
abstractmethod
¤
Set the operating mode on channel: CC, CV, CP, or CR.
Not every model supports every mode; drivers should raise
NotImplementedError for unsupported combinations.
set_level
abstractmethod
¤
Set the operating level on channel in the units appropriate for mode.
Parameters:
-
(mode¤LoadMode) –Active load mode — caller passes it explicitly so the driver doesn't need to track state. Units: CC → amperes, CV → volts, CP → watts, CR → ohms.
-
(value¤float) –Operating level in
mode's units. -
(channel¤int) –Target channel (1-indexed).
-
(curr_limit¤float | None) –Optional current limit; only meaningful in CV mode. Drivers may ignore it in other modes.
set_range
abstractmethod
¤
Set the operating range on channel from the expected maximum.
value is the maximum operating value in mode's units (see
:meth:set_level). Drivers typically snap to the closest hardware
range that covers value.
set_slewrate
abstractmethod
¤
output_enable
abstractmethod
¤
Enable or disable load draw on channel.
get_current
abstractmethod
¤
Measure the current the load is sinking on channel (amperes).
Vendor Drivers¤
BK 85XXB¤
B&K Precision 8500B-series E-Load driver. Covers 8500B/8502B/8510B/8514B/8542B (shared SCPI surface).
Hardware-validated against the 8514B; other family members are expected to work but have not been bench-tested.