pub fn opc_write_values(
pid: PidParameters,
controller_type: ControllerType,
integral_type: IntegralType,
) -> OpcWriteValuesExpand description
The literal integral/derivative values to write back to the DCS/PLC for one
PidParameters, given the controller type the run was configured for. Pure port of the
controller-type-conditional part of WritePIDparametersToOPCtags — proportional is always
pid.proportional, so this only exists to decide integral/derivative, which
ControllerType::P/ControllerType::Pi algorithms don’t use:
- Integral: a
ControllerType::P-only run never writespid.integral(it was computed but is meaningless for an algorithm with no integral term). Instead it writes a sentinel that disables integral action in whatever representation the template uses —9999forIntegralType::ResetTime(an effectively-infinite reset time), or0forIntegralType::ResetRate/IntegralType::ResetGain(a zero rate/gain has the same disabling effect).ControllerType::Pi/ControllerType::Pidalways write the real calculated value. - Derivative: only a
ControllerType::Pidrun writespid.derivative;P/Pialways write0.