PSU (Power Supply Unit)¤
Interface¤
Bases: Instrument
Power-supply instrument. Methods return Measurement/Command for publishing.
Parameters:
-
(name¤str) –Channel-name prefix for published data.
-
(driver¤PSUDriverBase) –Concrete PSU driver; owns its own transport::
psu = InstroPSU( name="main", driver=BK9115("USB0::0xFFFF::0x9115::SN::INSTR"), num_channels=1, )
-
(num_channels¤int) –Number of output channels on this PSU.
-
(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_voltage
¤
Set the output voltage (volts) on channel.
get_voltage
¤
get_voltage(channel: int = 1, **kwargs) -> Measurement | None
Measure the voltage (volts) sensed at channel terminals. Returns None if unavailable.
set_current_limit
¤
Set the current limit (amperes) on channel.
get_current
¤
get_current(channel: int = 1, **kwargs) -> Measurement | None
Measure the current (amperes) flowing through channel. Returns None if unavailable.
output_enable
¤
Enable or disable the output on channel.
get_output_status
¤
get_output_status(channel: int = 1, **kwargs) -> Measurement | None
Query whether the output on channel is enabled. Returns None if unavailable.
set_overvoltage_protection_level
¤
Set the overvoltage protection threshold (volts) on channel.
get_overvoltage_protection_level
¤
get_overvoltage_protection_level(
channel: int = 1, **kwargs
) -> Measurement | None
Query the overvoltage protection threshold (volts) on channel. Returns None if unavailable.
set_overvoltage_protection_enabled
¤
Enable or disable overvoltage protection on channel.
get_overvoltage_protection_enabled
¤
get_overvoltage_protection_enabled(
channel: int = 1, **kwargs
) -> Measurement | None
Query whether overvoltage protection is enabled on channel. Returns None if unavailable.
set_overvoltage_protection_delay
¤
Set the overvoltage protection trip delay (seconds) on channel.
get_overvoltage_protection_delay
¤
get_overvoltage_protection_delay(
channel: int = 1, **kwargs
) -> Measurement | None
Query the overvoltage protection trip delay (seconds) on channel. Returns None if unavailable.
set_overcurrent_protection_level
¤
Set the overcurrent protection threshold (amperes) on channel.
get_overcurrent_protection_level
¤
get_overcurrent_protection_level(
channel: int = 1, **kwargs
) -> Measurement | None
Query the overcurrent protection threshold (amperes) on channel. Returns None if unavailable.
set_overcurrent_protection_enabled
¤
Enable or disable overcurrent protection on channel.
get_overcurrent_protection_enabled
¤
get_overcurrent_protection_enabled(
channel: int = 1, **kwargs
) -> Measurement | None
Query whether overcurrent protection is enabled on channel. Returns None if unavailable.
set_remote_sense_enabled
¤
Enable or disable remote sense on channel.
get_remote_sense_enabled
¤
get_remote_sense_enabled(
channel: int = 1, **kwargs
) -> Measurement | None
Query whether remote sense is enabled on channel. Returns None if unavailable.
Driver Interface¤
Bases: ABC
Base class for PSU drivers.
set_voltage
abstractmethod
¤
Set the output voltage (volts) on channel.
get_voltage
abstractmethod
¤
Query the measured output voltage (volts) on channel.
set_current_limit
abstractmethod
¤
Set the current limit (amperes) on channel.
get_current
abstractmethod
¤
Query the measured output current (amperes) on channel.
output_enable
abstractmethod
¤
Enable or disable the output on channel.
get_output_status
abstractmethod
¤
Query whether the output on channel is enabled.
set_overvoltage_protection_level
¤
Set the overvoltage protection threshold (volts) on channel.
get_overvoltage_protection_level
¤
Query the overvoltage protection threshold (volts) on channel.
set_overvoltage_protection_enabled
¤
Enable or disable overvoltage protection on channel.
get_overvoltage_protection_enabled
¤
Query whether overvoltage protection is enabled on channel.
set_overvoltage_protection_delay
¤
Set the overvoltage protection trip delay (seconds) on channel.
get_overvoltage_protection_delay
¤
Query the overvoltage protection trip delay (seconds) on channel.
set_overcurrent_protection_level
¤
Set the overcurrent protection threshold (amperes) on channel.
get_overcurrent_protection_level
¤
Query the overcurrent protection threshold (amperes) on channel.
set_overcurrent_protection_enabled
¤
Enable or disable overcurrent protection on channel.
get_overcurrent_protection_enabled
¤
Query whether overcurrent protection is enabled on channel.
set_remote_sense_enabled
¤
Enable or disable remote sense on channel.
Vendor Drivers¤
BK Precision 9115 (Single Channel)¤
B&K Precision 9115-series PSU driver. SCPI surface is shared with other single-channel B&K models.
BK9115
¤
BK9115(visa_resource: str | VisaConfig)
Bases: PSUDriverBase
B&K Precision 9115-series single-channel PSU.
set_overcurrent_protection_level
¤
set_overcurrent_protection_enabled
¤
set_overvoltage_protection_level
¤
Set the overvoltage protection threshold (volts) on channel.
get_overvoltage_protection_level
¤
Query the overvoltage protection threshold (volts) on channel.
set_overvoltage_protection_enabled
¤
Enable or disable overvoltage protection on channel.
get_overvoltage_protection_enabled
¤
Query whether overvoltage protection is enabled on channel.
set_overvoltage_protection_delay
¤
Set the overvoltage protection trip delay (seconds) on channel.
BK Precision 9140 (Multi Channel)¤
B&K Precision 9140-series PSU driver. SCPI surface is shared with other multi-channel B&K models.
BK9140
¤
BK9140(visa_resource: str | VisaConfig)
Bases: PSUDriverBase
B&K Precision 9140-series multi-channel PSU.
set_overvoltage_protection_level
¤
Set the overvoltage protection threshold (volts) on channel.
get_overvoltage_protection_level
¤
Query the overvoltage protection threshold (volts) on channel.
set_overvoltage_protection_enabled
¤
Enable or disable overvoltage protection on channel.
get_overvoltage_protection_enabled
¤
Query whether overvoltage protection is enabled on channel.
set_overvoltage_protection_delay
¤
Set the overvoltage protection trip delay (seconds) on channel.
get_overvoltage_protection_delay
¤
Query the overvoltage protection trip delay (seconds) on channel.
set_overcurrent_protection_level
¤
Set the overcurrent protection threshold (amperes) on channel.
get_overcurrent_protection_level
¤
Query the overcurrent protection threshold (amperes) on channel.
set_overcurrent_protection_enabled
¤
Enable or disable overcurrent protection on channel.
get_overcurrent_protection_enabled
¤
Query whether overcurrent protection is enabled on channel.
set_remote_sense_enabled
¤
Enable or disable remote sense on channel.
Rigol DP800¤
Rigol DP800-series PSU driver. Covers DP811, DP821, DP831, DP832.
RigolDP800
¤
RigolDP800(visa_resource: str | VisaConfig)
Bases: PSUDriverBase
Rigol DP800-series multi-channel PSU (DP811/DP821/DP831/DP832).
query_status
¤
query_status() -> dict
Query the status of the PSU (output enable, regulation mode, OVP/OCP flags).
set_overvoltage_protection_level
¤
Set the overvoltage protection threshold (volts) on channel.
get_overvoltage_protection_level
¤
Query the overvoltage protection threshold (volts) on channel.
set_overvoltage_protection_enabled
¤
Enable or disable overvoltage protection on channel.
get_overvoltage_protection_enabled
¤
Query whether overvoltage protection is enabled on channel.
set_overvoltage_protection_delay
¤
Set the overvoltage protection trip delay (seconds) on channel.
get_overvoltage_protection_delay
¤
Query the overvoltage protection trip delay (seconds) on channel.
set_overcurrent_protection_level
¤
Set the overcurrent protection threshold (amperes) on channel.
get_overcurrent_protection_level
¤
Query the overcurrent protection threshold (amperes) on channel.
set_overcurrent_protection_enabled
¤
Enable or disable overcurrent protection on channel.
get_overcurrent_protection_enabled
¤
Query whether overcurrent protection is enabled on channel.
set_remote_sense_enabled
¤
Enable or disable remote sense on channel.
Siglent SPD3303¤
Siglent SPD3303-series PSU driver.
SiglentSPD3303
¤
SiglentSPD3303(visa_resource: str | VisaConfig)
Bases: PSUDriverBase
Siglent SPD3303-series PSU.
set_overvoltage_protection_level
¤
set_overcurrent_protection_level
¤
set_overcurrent_protection_enabled
¤
query_status
¤
query_status() -> dict
Query the status of the PSU (per-channel mode/enable + tracking mode).
set_overvoltage_protection_enabled
¤
Enable or disable overvoltage protection on channel.
get_overvoltage_protection_enabled
¤
Query whether overvoltage protection is enabled on channel.
set_overvoltage_protection_delay
¤
Set the overvoltage protection trip delay (seconds) on channel.
TDK Lambda Genesys¤
TDK Lambda Genesys-family PSU driver (single-channel).
TDKLambdaGenesys
¤
TDKLambdaGenesys(visa_resource: str | VisaConfig)
Bases: PSUDriverBase
TDK Lambda Genesys-family single-channel PSU.
set_overvoltage_protection_level
¤
Set the overvoltage protection threshold (volts) on channel.
get_overvoltage_protection_level
¤
Query the overvoltage protection threshold (volts) on channel.
set_overvoltage_protection_enabled
¤
Enable or disable overvoltage protection on channel.
get_overvoltage_protection_enabled
¤
Query whether overvoltage protection is enabled on channel.
set_overvoltage_protection_delay
¤
Set the overvoltage protection trip delay (seconds) on channel.
get_overvoltage_protection_delay
¤
Query the overvoltage protection trip delay (seconds) on channel.
set_overcurrent_protection_level
¤
Set the overcurrent protection threshold (amperes) on channel.
get_overcurrent_protection_level
¤
Query the overcurrent protection threshold (amperes) on channel.
set_overcurrent_protection_enabled
¤
Enable or disable overcurrent protection on channel.
get_overcurrent_protection_enabled
¤
Query whether overcurrent protection is enabled on channel.
set_remote_sense_enabled
¤
Enable or disable remote sense on channel.
Simulated¤
Simulated PSU driver. Client-side counterpart to :mod:instro.psu.scpi_sim_server.
Connect via a TCP socket VISA resource such as TCPIP0::127.0.0.1::5025::SOCKET.
SimulatedPSU
¤
SimulatedPSU(visa_resource: str | VisaConfig)
Bases: PSUDriverBase
Client for the in-process simulated PSU SCPI server.
set_overvoltage_protection_level
¤
set_overcurrent_protection_level
¤
set_overcurrent_protection_enabled
¤
set_overvoltage_protection_enabled
¤
Enable or disable overvoltage protection on channel.
get_overvoltage_protection_enabled
¤
Query whether overvoltage protection is enabled on channel.
set_overvoltage_protection_delay
¤
Set the overvoltage protection trip delay (seconds) on channel.