hvl_ccb.dev.ea_psi9000.ea_psi9000
Device class for controlling a Elektro Automatik PSI 9000 power supply over VISA.
It is necessary that a backend for pyvisa is installed. This can be NI-Visa oder pyvisa-py (up to now, all the testing was done with NI-Visa)
- class PSI9000(com: PSI9000VisaCommunication | PSI9000VisaCommunicationConfig | dict, dev_config: PSI9000Config | dict | None = None)[source]
Bases:
VisaDevice
Elektro Automatik PSI 9000 power supply.
- MS_NOMINAL_CURRENT = 2040
- MS_NOMINAL_VOLTAGE = 80
- SHUTDOWN_CURRENT_LIMIT = 0.1
- SHUTDOWN_VOLTAGE_LIMIT = 0.1
- check_master_slave_config() None [source]
Checks if the master / slave configuration and initializes if successful
- Raises:
PSI9000Error – if master-slave configuration failed
- static config_cls()[source]
Return the default configdataclass class.
- Returns:
a reference to the default configdataclass class
- static default_com_cls()[source]
Return the default communication protocol for this device type, which is VisaCommunication.
- Returns:
the VisaCommunication class
- get_output() bool [source]
Reads the current state of the DC output of the source. Returns True, if it is enabled, false otherwise.
- Returns:
the state of the DC output
- get_system_lock() bool [source]
Get the current lock state of the system. The lock state is true, if the remote control is active and false, if not.
- Returns:
the current lock state of the device
- get_ui_lower_limits() tuple[float, float] [source]
Get the lower voltage and current limits. A lower power limit does not exist.
- Returns:
Umin in V, Imin in A
- get_uip_upper_limits() tuple[float, float, float] [source]
Get the upper voltage, current and power limits.
- Returns:
Umax in V, Imax in A, Pmax in W
- get_voltage_current_setpoint() tuple[float, float] [source]
Get the voltage and current setpoint of the current source.
- Returns:
Uset in V, Iset in A
- measure_voltage_current() tuple[float, float] [source]
Measure the DC output voltage and current
- Returns:
Umeas in V, Imeas in A
- set_lower_limits(voltage_limit: float | None = None, current_limit: float | None = None) None [source]
Set the lower limits for voltage and current. After writing the values a check is performed if the values are set correctly.
- Parameters:
voltage_limit – is the lower voltage limit in V
current_limit – is the lower current limit in A
- Raises:
PSI9000Error – if the limits are out of range
- set_output(target_onstate: bool) None [source]
Enables / disables the DC output.
- Parameters:
target_onstate – enable or disable the output power
- Raises:
PSI9000Error – if operation was not successful
- set_system_lock(lock: bool) None [source]
Lock / unlock the device, after locking the control is limited to this class unlocking only possible when voltage and current are below the defined limits
- Parameters:
lock – True: locking, False: unlocking
- set_upper_limits(voltage_limit: float | None = None, current_limit: float | None = None, power_limit: float | None = None) None [source]
Set the upper limits for voltage, current and power. After writing the values a check is performed if the values are set. If a parameter is left blank, the maximum configurable limit is set.
- Parameters:
voltage_limit – is the voltage limit in V
current_limit – is the current limit in A
power_limit – is the power limit in W
- Raises:
PSI9000Error – if limits are out of range
- set_voltage_current(volt: float, current: float) None [source]
Set voltage and current setpoints.
After setting voltage and current, a check is performed if writing was successful.
- Parameters:
volt – is the setpoint voltage: 0..81.6 V (1.02 * 0-80 V) (absolute max, can be smaller if limits are set)
current – is the setpoint current: 0..2080.8 A (1.02 * 0 - 2040 A) (absolute max, can be smaller if limits are set)
- Raises:
PSI9000Error – if the desired setpoint is out of limits
- class PSI9000Config(spoll_interval: int | float = 0.5, spoll_start_delay: int | float = 2, power_limit: int | float = 43500, voltage_lower_limit: int | float = 0.0, voltage_upper_limit: int | float = 10.0, current_lower_limit: int | float = 0.0, current_upper_limit: int | float = 2040.0, wait_sec_system_lock: int | float = 0.5, wait_sec_settings_effect: int | float = 1, wait_sec_initialisation: int | float = 2)[source]
Bases:
VisaDeviceConfig
Elektro Automatik PSI 9000 power supply device class. The device is communicating over a VISA TCP socket.
Using this power supply, DC voltage and current can be supplied to a load with up to 2040 A and 80 V (using all four available units in parallel). The maximum power is limited by the grid, being at 43.5 kW available through the CEE63 power socket.
- clean_values() None [source]
Cleans and enforces configuration values. Does nothing by default, but may be overridden to add custom configuration value checks.
- current_lower_limit: int | float = 0.0
Lower current limit in A, depending on the experimental setup.
- current_upper_limit: int | float = 2040.0
Upper current limit in A, depending on the experimental setup.
- 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
- 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.
- power_limit: int | float = 43500
Power limit in W depending on the experimental setup. With 3x63A, this is 43.5kW. Do not change this value, if you do not know what you are doing. There is no lower power limit.
- 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.
- voltage_lower_limit: int | float = 0.0
Lower voltage limit in V, depending on the experimental setup.
- voltage_upper_limit: int | float = 10.0
Upper voltage limit in V, depending on the experimental setup.
- wait_sec_initialisation: int | float = 2
- wait_sec_settings_effect: int | float = 1
- wait_sec_system_lock: int | float = 0.5
- exception PSI9000Error[source]
Bases:
DeviceError
Base error class regarding problems with the PSI 9000 supply.
- class PSI9000VisaCommunication(configuration)[source]
Bases:
VisaCommunication
Communication protocol used with the PSI 9000 power supply.
- class PSI9000VisaCommunicationConfig(host: str | ~ipaddress.IPv4Address | ~ipaddress.IPv6Address, interface_type: str | ~hvl_ccb.comm.visa.VisaCommunicationConfig.InterfaceType = <InterfaceType.TCPIP_SOCKET: 1>, board: int = 0, port: int = 5025, timeout: int = 5000, chunk_size: int = 204800, open_timeout: int = 1000, write_termination: str = '\n', read_termination: str = '\n', visa_backend: str = '')[source]
Bases:
VisaCommunicationConfig
Visa communication protocol config dataclass with specification for the PSI 9000 power supply.
- 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
- interface_type: str | InterfaceType = 1
Interface type of the VISA connection, being one of
InterfaceType
.
- 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.