apply()#

InstroPSU.apply(
*,
current_limit: float,
voltage: float,
enable: bool = False,
channel: int,
**kwargs,
) → list[Command][source]#

Set the current limit, then the voltage, then the output state on channel.

The output stays off unless enable=True is passed, and on the default path it is disabled before the new setpoints are written, so setpoints are never applied to a live output. Every argument is keyword-only, so a value can’t land on the wrong setpoint and the output can’t be energized without enable=True spelled out at the call site.

Holds the resource lock across all steps so nothing observes a half-applied channel, and publishes only after releasing it so publisher I/O never blocks the background daemon or other threads waiting on the instrument.

Not atomic on the instrument: if a step raises, earlier steps have already been committed and the channel is left in an unknown state. Commands for the steps that did land are still published before the exception propagates.