Features

This section describes all features that are shipped with this package.

Scenario Features

class balderhub.powersupply.lib.scenario_features.DCPowerSupplyFeature(**kwargs)

Bases: Feature

Power Supply Feature that is independent of the device type. It even does not need to be a Programmable Power Supply, because you could use any device that can be controlled and provide the functionality below.

get_configured_current() Decimal

returns the current configured CURRENT

Returns:

the configured CURRENT

get_configured_voltage() Decimal

returns the current configured voltage

Returns:

the configured VOLTAGE

is_enabled() bool
Returns:

returns True if the output is activated, False otherwise

power_off()

disable the power supply output

power_on() None

enables the power supply output

set_configured_current(current: Decimal)

Sets the current configured CURRENT

Parameters:

current – the CURRENT in ampere that should be set

set_configured_voltage(voltage: Decimal)

Sets the current configured VOLTAGE

Parameters:

voltage – the VOLTAGE in volts that should be set to the channel

Instruments

class balderhub.powersupply.lib.scenario_features.DCPowerSupplyInstrument(**kwargs)

Bases: Feature

raw implementation of a programmable power supply instrument

class Channel(value)

Bases: Enum

enum holding all available channels of this instrument

change_channel_output(of_channel: Channel, value: bool) None

Sets the current channel output state (True means activated, False means deactivated)

Parameters:
  • of_channel – the channel to set the configuration for

  • value – True if the output should be enabled, False otherwise

property current_min_max: tuple[decimal.Decimal, decimal.Decimal]

limitations of instrument (min/max voltage)

property current_resolution: Decimal

limitations of instrument: resolution of CURRENT in ampere of the instrument

get_channel_output_state(of_channel: Channel) bool

Returns the current channel output state (True means activated, False means deactivated)

Parameters:

of_channel – the channel to get the configuration for

Returns:

True, when the channel output is activated, False otherwise

get_configured_channel_current(of_channel: Channel) Decimal

returns the current configured current for the given channel

Parameters:

of_channel – the channel to get the configuration for

Returns:

the configured CURRENT for the requested channel

get_configured_channel_voltage(of_channel: Channel) Decimal

returns the current configured voltage for the given channel

Parameters:

of_channel – the channel to get the configuration for

Returns:

the configured VOLTAGE for the requested channel

set_configured_channel_current(of_channel: Channel, current: Decimal) None

Sets the current configured CURRENT for the given channel

Parameters:
  • of_channel – the channel to set the configuration for

  • current – the CURRENT in ampere that should be set to the channel

set_configured_channel_voltage(of_channel: Channel, voltage: Decimal) None

Sets the current configured voltage for the given channel

Parameters:
  • of_channel – the channel to set the configuration for

  • voltage – the VOLTAGE in volts that should be set to the channel

property voltage_min_max: tuple[decimal.Decimal, decimal.Decimal]

limitations of instrument (min/max voltage)

property voltage_resolution: Decimal

limitations of instrument: resolution of VOLTAGE in volts of the instrument

class balderhub.powersupply.lib.scenario_features.DCPowerSupplyInstrumentChannel(**kwargs)

Bases: DCPowerSupplyFeature

Implementation of balderhub.powersupply.lib.scenario_features.DCPowerSupplyFeature and uses a channel of an balderhub.powersupply.lib.scenario_features.DCPowerSupplyInstrument

class Instrument

Bases: VDevice

vdevice representing the power supply instrument

property channel: Channel
Returns:

returns the channel identifier this feature represents

get_configured_current() Decimal

returns the current configured CURRENT

Returns:

the configured CURRENT

get_configured_voltage() Decimal

returns the current configured voltage

Returns:

the configured VOLTAGE

is_enabled() bool
Returns:

returns True if the output is activated, False otherwise

power_off()

disable the power supply output

power_on()

enables the power supply output

set_configured_current(current: Decimal)

Sets the current configured CURRENT

Parameters:

current – the CURRENT in ampere that should be set

set_configured_voltage(voltage: Decimal)

Sets the current configured VOLTAGE

Parameters:

voltage – the VOLTAGE in volts that should be set to the channel

Setup Features

Siglent-Devices

class balderhub.powersupply.lib.setup_features.siglent.SiglentSPD3303DCPowerSupplyInstrument(**kwargs)

Bases: DCPowerSupplyInstrument

Feature implementation for the Siglent SPD3303X / X-E Power supply instrument

class Channel(value)

Bases: Channel

available channel for this instrument

change_channel_output(of_channel: Channel, value: bool) None

Sets the current channel output state (True means activated, False means deactivated)

Parameters:
  • of_channel – the channel to set the configuration for

  • value – True if the output should be enabled, False otherwise

property current_min_max: tuple[decimal.Decimal, decimal.Decimal]

limitations of instrument (min/max voltage)

property current_resolution: Decimal

limitations of instrument: resolution of CURRENT in ampere of the instrument

get_channel_output_state(of_channel: Channel) bool

Returns the current channel output state (True means activated, False means deactivated)

Parameters:

of_channel – the channel to get the configuration for

Returns:

True, when the channel output is activated, False otherwise

get_configured_channel_current(of_channel: Channel) Decimal

returns the current configured current for the given channel

Parameters:

of_channel – the channel to get the configuration for

Returns:

the configured CURRENT for the requested channel

get_configured_channel_voltage(of_channel: Channel) Decimal

returns the current configured voltage for the given channel

Parameters:

of_channel – the channel to get the configuration for

Returns:

the configured VOLTAGE for the requested channel

set_configured_channel_current(of_channel: Channel, current: Decimal) None

Sets the current configured CURRENT for the given channel

Parameters:
  • of_channel – the channel to set the configuration for

  • current – the CURRENT in ampere that should be set to the channel

set_configured_channel_voltage(of_channel: Channel, voltage: Decimal) None

Sets the current configured voltage for the given channel

Parameters:
  • of_channel – the channel to set the configuration for

  • voltage – the VOLTAGE in volts that should be set to the channel

property voltage_min_max: tuple[decimal.Decimal, decimal.Decimal]

limitations of instrument (min/max voltage)

property voltage_resolution: Decimal

limitations of instrument: resolution of VOLTAGE in volts of the instrument

Channel Selection Features

class balderhub.powersupply.lib.setup_features.DCPowerSupplyInstrumentChannel1(**kwargs)

Bases: DCPowerSupplyInstrumentChannel

Universal DC Power Supply Setup Feature representing the Channel 1 of a Power-Supply Instrument

property channel: Channel
Returns:

returns the channel identifier this feature represents

class balderhub.powersupply.lib.setup_features.DCPowerSupplyInstrumentChannel2(**kwargs)

Bases: DCPowerSupplyInstrumentChannel

Universal DC Power Supply Setup Feature representing the Channel 2 of a Power-Supply Instrument

property channel: Channel
Returns:

returns the channel identifier this feature represents

class balderhub.powersupply.lib.setup_features.DirtyDcPowerSupplyChannel(**kwargs)

Bases: DCPowerSupplyFeature

Dirty helper feature that can be assigned directly to the device

property channel: Channel
Returns:

returns the channel that should be used for the feature (defaults to 1)

get_configured_current() Decimal

returns the current configured CURRENT

Returns:

the configured CURRENT

get_configured_voltage() Decimal

returns the current configured voltage

Returns:

the configured VOLTAGE

is_enabled() bool
Returns:

returns True if the output is activated, False otherwise

power_off()

disable the power supply output

power_on()

enables the power supply output

set_configured_current(current: Decimal)

Sets the current configured CURRENT

Parameters:

current – the CURRENT in ampere that should be set

set_configured_voltage(voltage: Decimal)

Sets the current configured VOLTAGE

Parameters:

voltage – the VOLTAGE in volts that should be set to the channel