hvl_ccb.dev.ka3000p.device

Inheritance diagram of hvl_ccb.dev.ka3000p.device

class KA3000P(com, dev_config=None)[source]

Bases: SingleCommDevice

Class to controll a KA3000P power supply

property beep: bool

State of the beep

property brand: str

Brand of the connected device

Returns:

Band

property comm_version: str

Version of the communication protocol

Returns:

Version number

static config_cls()[source]

Return the default configdataclass class.

Returns:

a reference to the default configdataclass class

property controlled_current: bool

If the power supply operates at current limiting mode. Opposite to controlled_voltage.

Returns:

Output is current limited

property controlled_voltage: bool

If the power supply operates at voltage limiting mode. Opposite to controlled_current.

Returns:

Output is voltage limited

property current: float

Return the measured output current in A

static default_com_cls()[source]

Get the class for the default communication protocol used with this device.

Returns:

the type of the standard communication protocol for this device

idenify_device() None[source]
property lock: bool

State of the button lock

property max_current: float

Maximal output current of the hardware in A, but user can reset to a lower value

property max_voltage: float

Maximal output voltage of the hardware in V, but user can reset to a lower value

property ocp: bool

State of the over current protection

property output: bool | None

State of the high voltage output

property ovp: bool

State of the over voltage protection

property recall: int

Recall a setting

property save: int

Save a setting

save_settings_to(slot: int) Generator[None, Any, None][source]

Method to save settings to a slot.

Use this method with a with-block. It will recall a slot and save the settings to it.

Example:

slot = 3
with ka3005p.save_settings_to(slot):
    ka3005p.voltage = 2.5
    ka3005p.current = 0.75
Parameters:

slot – Slot 1…5

property serial_number: str

Serial number of the connected device

Returns:

Serial number

property set_current: float

Return the set current (may differ from actual value) in A

property set_voltage: float

Return the set voltage (may differ from actual value) in V

start() None[source]

Open the associated communication protocol.

property status: KA3000PStatus
property voltage: float

Return the measured output voltage in V

class KA3000PConfig(time_to_wait_before_save_settings: float = 0.1)[source]

Bases: object

Device configuration class for a KA3000P power supply

clean_values()

Cleans and enforces configuration values. Does nothing by default, but may be overridden to add custom configuration value checks.

force_value(fieldname, value)

Forces a value to a dataclass field despite the class being frozen.

NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.

Parameters:
  • fieldname – name of the field

  • value – value to assign

is_configdataclass = True
classmethod keys() Sequence[str]

Returns a list of all configdataclass fields key-names.

Returns:

a list of strings containing all keys.

classmethod optional_defaults() dict[str, object]

Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.

Returns:

a list of strings containing all optional keys.

classmethod required_keys() Sequence[str]

Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.

Returns:

a list of strings containing all required keys.

time_to_wait_before_save_settings: float = 0.1