Voltage Limit for PowerInverter_220 in PICube
What is happening? Which is the new feature/device?
The voltage_limit
is set depending on the PowerSetup
. The value for voltage_limit
is set but questioned. The value has to be confirmed and fixed.
Share screenshots if applicable
The code with the TODO
:
@operate.setter
def operate(self, state: bool) -> None:
"""
Set operate state. If the state is RED_READY, this will turn on the high
voltage and close the safety switches.
If the state is RED_OPERATE and a status change to RED_READY is queried - with
a measured output voltage above the voltage limit -- a warning is logged
:param state: set operate state
:raises CubeStatusChangeError: if `state=True` and cube is not in RED_READY or
if `state=False` and cube is not in RED_OPERATE
"""
if self.power_setup in constants.DC_POWER_SETUPS:
voltage_limit = self.measurement_ch_3.noise_level
elif self.power_setup in constants.AC_POWER_SETUPS:
voltage_limit = self.measurement_ch_1.noise_level
elif self.power_setup == constants.PowerSetup.POWER_INVERTER_220V:
# TODO voltage_limit for PowerInverter_220, what is the return of actual
# voltage?
# Which value is returned?
voltage_limit = 10
else:
voltage_limit = 0