regul force hw controllers to start ramping from current input value
We observed on Lakeshore and Nanodac that when asking the controller to start ramping to a new setpoint, it actually computes the ramp (working setpoints) from actual setpoint to new setpoint.
So if you start from a situation where the input value is not stabilized around the current setpoint (and potentially far from it), then a new setpoint command could produce unwanted behavior (like moving toward a working setpoint somewhere between last setpoint and new setpoint).
Instead it would be better and safer to force the controller to computes the working setpoints between actual input value and new setpoint.
I see 2 ways for this:
-
Loop.setpoint = newval => calls
hw.setpoint = Loop.input.value
and immediately afterhw.setpoint = newval
-
Same as 1) but only for the first time the user sets a setpoint on the Loop.
Notice that the SoftRamp already behaves like 1) (always starting the ramp from current input value).
The SoftRamp
is used by the Loop
if the associated hardware doesn't have the ramping feature.
The SoftRamp
is always used by the SoftLoop