frappy_psi.picontrol: add PIctrl

Change-Id: If212712b691ecabec1ff70d7040eb4e23924c01e
This commit is contained in:
2025-10-27 11:59:00 +01:00
parent 65e27e0913
commit 576723c650

View File

@@ -62,8 +62,8 @@ import time
import math
from frappy.core import Readable, Writable, Parameter, Attached, IDLE, Property
from frappy.lib import clamp, merge_status
from frappy.datatypes import LimitsType, EnumType, BoolType, FloatRange
from frappy.ctrlby import HasOutputModule
from frappy.datatypes import LimitsType, EnumType, FloatRange
from frappy.ctrlby import HasOutputModule, WrapControlledBy
from frappy_psi.convergence import HasConvergence
@@ -162,7 +162,6 @@ class PImixin(HasOutputModule, Writable):
if not self.control_active:
self.activate_control()
# unchecked!
class PI(HasConvergence, PImixin):
input_module = Attached(Readable, 'the input module')
@@ -186,3 +185,7 @@ class PI2(PI):
if not self.control_active:
self.output.write_target(target)
super().write_target(target)
class PIctrl(WrapControlledBy, PI):
"""a pi controller which is controlled by another loop"""