Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r90cbf13cf67e4d1ede545b867c83bfd14c6f77b3 -rb0a5452ec4b9be9be937095b1249079a2fce5ce5 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 90cbf13cf67e4d1ede545b867c83bfd14c6f77b3) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision b0a5452ec4b9be9be937095b1249079a2fce5ce5) @@ -165,6 +165,8 @@ initPersistentAlarm( ALARM_ID_DG_TRIMMER_HEATER_VOLTAGE_OUT_OF_RANGE, HEATERS_VOLTAGE_OUT_OF_RANGE_TIMEOUT_MS, HEATERS_VOLTAGE_OUT_OF_RANGE_TIMEOUT_MS ); + + initPersistentAlarm( ALARM_ID_DG_FLOW_TOO_LOW_WHILE_HEATER_ON, HEATERS_ON_NO_FLOW_TIMEOUT_MS, HEATERS_ON_NO_FLOW_TIMEOUT_MS ); } /*********************************************************************//** @@ -377,10 +379,12 @@ // TODO add the function that gets the flow of the new flow sensor for DG. For now it is assumed that trimmer heater flow sensor // is not 0 so the heater can run if needed F32 measFlow = ( DG_PRIMARY_HEATER == heater ? getMeasuredROFlowRateLPM() : 50.0 ); - // TODO get the minimum new flow sensor flow sensor F32 minFlow = ( DG_PRIMARY_HEATER == heater ? MIN_RO_FLOWRATE_LPM : MIN_RO_FLOWRATE_LPM ); BOOL isFlowLow = ( measFlow < minFlow ? TRUE : FALSE ); + checkPersistentAlarm( ALARM_ID_DG_FLOW_TOO_LOW_WHILE_HEATER_ON, isFlowLow, measFlow, minFlow ); + + /* TODO remove this code once the heaters fault is finalized if ( TRUE == isFlowLow ) { // Check if the flow of the heater is below minimum for the first time @@ -397,6 +401,7 @@ // The flow is below minimum for a certain period of time so set the heater's duty cycle to 0. The heaters is not // set to off and its duty cycle is set to 0 setHeaterDutyCycle( heater, HEATERS_MIN_DUTY_CYCLE ); + } } else @@ -406,8 +411,12 @@ // Flow is back on, set the heater to the duty cycle that was saved before zeroing the heater setHeaterDutyCycle( heater, heatersStatus[ heater ].dutyCyle4NonZeroFlow ); - } + }*/ } + else + { + checkPersistentAlarm( ALARM_ID_DG_FLOW_TOO_LOW_WHILE_HEATER_ON, FALSE, 0.0, 0.0 ); + } } #ifndef _RELEASE_ @@ -904,7 +913,7 @@ checkPersistentAlarm( ALARM_ID_DG_MAIN_PRIMARY_HEATER_VOLTAGE_OUT_OF_RANGE, isMainPriOut, mainPri, mainPriVoltageTol ); checkPersistentAlarm( ALARM_ID_DG_SMALL_PRIMARY_HEATER_VOLTAGE_OUT_OF_RANGE, isSmallPriOut, smallPri, smallPriVoltageTol ); - //checkPersistentAlarm( ALARM_ID_DG_TRIMMER_HEATER_VOLTAGE_OUT_OF_RANGE, isTrimmerOut, trimmer, trimmerVoltageTol ); + //checkPersistentAlarm( ALARM_ID_DG_TRIMMER_HEATER_VOLTAGE_OUT_OF_RANGE, isTrimmerOut, trimmer, trimmerVoltageTol ); // TODO check this voltage // TODO test code remove if ( TRUE == isAlarmActive(ALARM_ID_DG_TRIMMER_HEATER_VOLTAGE_OUT_OF_RANGE)) Index: firmware/App/Modes/ModeChemicalDisinfect.c =================================================================== diff -u -rab14e70c7bac24b0c3ebd02c6763285cdd3951ce -rb0a5452ec4b9be9be937095b1249079a2fce5ce5 --- firmware/App/Modes/ModeChemicalDisinfect.c (.../ModeChemicalDisinfect.c) (revision ab14e70c7bac24b0c3ebd02c6763285cdd3951ce) +++ firmware/App/Modes/ModeChemicalDisinfect.c (.../ModeChemicalDisinfect.c) (revision b0a5452ec4b9be9be937095b1249079a2fce5ce5) @@ -100,7 +100,7 @@ #define CHEM_DISINFECT_TARGET_TEMPERATURE_C 21.0F ///< Chemical disinfect target water temperature in C. // TODO this used to 30.0 // Post disinfect rinses -#define NUM_OF_POST_DISINFECT_RINSES 3 ///< Number of rinses after a chemical disinfect. +#define NUM_OF_POST_DISINFECT_RINSES 12 ///< Number of rinses after a chemical disinfect. static const F32 ACID_TO_WATER_MIXING_RATIO = ( 1.0F / 70.0F ); ///< Acid to water mixing ratio for chemical disinfect. Index: firmware/App/Modes/ModeHeatDisinfect.c =================================================================== diff -u -rab14e70c7bac24b0c3ebd02c6763285cdd3951ce -rb0a5452ec4b9be9be937095b1249079a2fce5ce5 --- firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision ab14e70c7bac24b0c3ebd02c6763285cdd3951ce) +++ firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision b0a5452ec4b9be9be937095b1249079a2fce5ce5) @@ -89,13 +89,13 @@ #define HEAT_DISINFECT_START_TEMPERATURE_C 81.0F ///< Heat disinfect minimum acceptable temperature in C. // R1 to R2 & R2 to R1 heat disinfect circulation -#define HEAT_DISINFECT_TARGET_RO_FLOW_LPM 1.5F // TODO this was 1.3 ///< Heat disinfect target RO flow rate in L/min. -#define HEAT_DISINFECT_MAX_RO_PRESSURE_PSI 45 // TODO this was 30 ///< Heat disinfect maximum RO pressure in psi. -#define HEAT_DISINFECT_TARGET_DRAIN_PRES_PSI 15.0F // TOD was 12 ///< Heat disinfect target drain outlet pressure in psi. +#define HEAT_DISINFECT_TARGET_RO_FLOW_LPM 1.3F // TODO this was 1.3 ///< Heat disinfect target RO flow rate in L/min. +#define HEAT_DISINFECT_MAX_RO_PRESSURE_PSI 30 // TODO this was 30 ///< Heat disinfect maximum RO pressure in psi. +#define HEAT_DISINFECT_TARGET_DRAIN_PRES_PSI 12.0F // TODO was 12 ///< Heat disinfect target drain outlet pressure in psi. #define HEAT_DISINFECT_TIME_MS ( 10 * SEC_PER_MIN * MS_PER_SECOND ) ///< Heat disinfect time for each section in milliseconds. #define HEAT_DISINFECT_START_TEMP_TIMOUT_MS ( 4 * MIN_PER_HOUR * SEC_PER_MIN * MS_PER_SECOND ) ///< Heat disinfect reaching to minimum temperature timeout in milliseconds. #define RSRVRS_TARGET_VOL_OUT_TIMEOUT_MS ( 0.5F * SEC_PER_MIN * MS_PER_SECOND ) ///< Reservoirs 1 & 2 maximum volume out of range timeout during heat disinfect. TODO change this to 5 seconds -#define RSRVRS_MAX_TARGET_VOL_CHANGE_ML 600.0F ///< Reservoirs 1 & 2 maximum allowed volume change when full during heat disinfect. TODO original value is 100 mL +#define RSRVRS_MAX_TARGET_VOL_CHANGE_ML 150.0F ///< Reservoirs 1 & 2 maximum allowed volume change when full during heat disinfect. #define POST_HEAT_DISINFECT_WAIT_TIME_MS ( 3 * SEC_PER_MIN * MS_PER_SECOND ) ///< Heat disinfect final wait time before flushing the system in milliseconds. // Cool down RO filter