Index: PIControllers.h =================================================================== diff -u -r5b4db16e34780cbbe85fbc3b994acbe0e68108e8 -r694a59d9ecea9fc73eb9b992bcf6aa72ddc258bd --- PIControllers.h (.../PIControllers.h) (revision 5b4db16e34780cbbe85fbc3b994acbe0e68108e8) +++ PIControllers.h (.../PIControllers.h) (revision 694a59d9ecea9fc73eb9b992bcf6aa72ddc258bd) @@ -51,6 +51,8 @@ PI_CONTROLLER_ID_RO_PUMP_PRES, ///< RO pump controller to maximum pressure PI_CONTROLLER_ID_BOOST_PUMP_FLOW, ///< Boost pump controller to flow PI_CONTROLLER_ID_BOOST_PUMP_PRES, ///< Boost pump controller to maximum pressure + PI_CONTROLLER_ID_BICARB_VOL, ///< Bicarb dose volume + PI_CONTROLLER_ID_ACID_VOL, ///< Acid dose volume #endif NUM_OF_PI_CONTROLLERS_IDS ///< Number of PI controllers } PI_CONTROLLER_ID_T; @@ -70,6 +72,20 @@ NUM_OF_CONTROLLER_SIGNAL ///< Number of PI controller signals } PI_CONTROLLER_SIGNALS_ID; +/// Data structure for debugging PI controller signals. +typedef struct DebugControllerSignals +{ + F32 controlSignalReference; ///< Reference value + F32 controlSignalMeasured; ///< Measured value + F32 controlSignalError; ///< Error value + F32 controlSignalErrorSum; ///< Error sum before anti-windup + F32 controlSignalErrorSumAfterWindup; ///< Error sum after anti-windup + F32 controlSignalProportionalOutput; ///< P portion of controller output signal + F32 controlSignalIntegralOutput; ///< I portion of controller output signal + F32 controlSignalFeedDorwardOutput; ///< Feed forward portion of controller output signal + F32 controlSingalControl; ///< Controller output signal + } PI_CONTROLLER_SIGNALS_DATA; + /// Data structure for PI control profiles. typedef struct { @@ -91,6 +107,7 @@ F32 getPIControllerSignals( PI_CONTROLLER_ID_T controllerID, PI_CONTROLLER_SIGNALS_ID signalID ); void setPIControllerStepLimit( PI_CONTROLLER_ID_T controllerID, F32 stepLimit ); void setPIControllerFeedForward( PI_CONTROLLER_ID_T controllerID, F32 feedforward ); +PI_CONTROLLER_SIGNALS_DATA getDebugPIControllerSignals( PI_CONTROLLER_ID_T controllerID ); /**@}*/