Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -r54da0840ade5bf0ec6c50232fe952cc98ca314f5 -r1efa1af5337b36f5022df5ce8cb7459352f13a8b --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 54da0840ade5bf0ec6c50232fe952cc98ca314f5) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 1efa1af5337b36f5022df5ce8cb7459352f13a8b) @@ -1214,7 +1214,8 @@ // Check blood pump current during running state BOOL const isRunningMCCurrentBad = ( ( BLOOD_PUMP_OFF_STATE != bloodPumpState ) && ( bpCurr > BP_MAX_CURR_WHEN_RUNNING_MA ) ? TRUE : FALSE ); - if ( ( TRUE == isPersistentAlarmTriggered( ALARM_ID_BLOOD_PUMP_MC_CURRENT_CHECK, isOffMCCurrentBad || isRunningMCCurrentBad ) ) ) + if ( ( TRUE == isPersistentAlarmTriggered( ALARM_ID_BLOOD_PUMP_MC_CURRENT_CHECK, isOffMCCurrentBad || isRunningMCCurrentBad ) ) && + ( FALSE == isAlarmActive( ALARM_ID_HD_AC_POWER_LOST ) ) ) { #ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -rb1492eff71eab83d55456ad3520ccfd6cda06a77 -r1efa1af5337b36f5022df5ce8cb7459352f13a8b --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision b1492eff71eab83d55456ad3520ccfd6cda06a77) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 1efa1af5337b36f5022df5ce8cb7459352f13a8b) @@ -1244,50 +1244,53 @@ static void checkDialInPumpMCCurrent( void ) { F32 dipCurr; - - // DialIn pump should be off - if ( DIAL_IN_PUMP_OFF_STATE == dialInPumpState ) + + if ( FALSE == isAlarmActive( ALARM_ID_HD_AC_POWER_LOST ) ) { - dipCurr = fabs( getMeasuredDialInPumpMCCurrent() ); - if ( dipCurr > DIP_MAX_CURR_WHEN_STOPPED_MA ) + // DialIn pump should be off + if ( DIAL_IN_PUMP_OFF_STATE == dialInPumpState ) { - dipCurrErrorDurationCtr += TASK_PRIORITY_INTERVAL; - if ( dipCurrErrorDurationCtr > DIP_MAX_CURR_ERROR_DURATION_MS ) - { -#ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) -#endif - { - SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_IN_PUMP_MC_CURRENT_CHECK, getMeasuredDialInPumpMCCurrent() ); + dipCurr = fabs( getMeasuredDialInPumpMCCurrent() ); + if ( dipCurr > DIP_MAX_CURR_WHEN_STOPPED_MA ) + { + dipCurrErrorDurationCtr += TASK_PRIORITY_INTERVAL; + if ( dipCurrErrorDurationCtr > DIP_MAX_CURR_ERROR_DURATION_MS ) + { + #ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) + #endif + { + SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_IN_PUMP_MC_CURRENT_CHECK, getMeasuredDialInPumpMCCurrent() ); + } } } + else + { + dipCurrErrorDurationCtr = 0; + } } + // DialIn pump should be running else { - dipCurrErrorDurationCtr = 0; - } - } - // DialIn pump should be running - else - { - dipCurr = fabs( getMeasuredDialInPumpMCCurrent() ); - if ( dipCurr > DIP_MAX_CURR_WHEN_RUNNING_MA ) - { - dipCurrErrorDurationCtr += TASK_PRIORITY_INTERVAL; - if ( dipCurrErrorDurationCtr > DIP_MAX_CURR_ERROR_DURATION_MS ) - { -#ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) -#endif - { - SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_IN_PUMP_MC_CURRENT_CHECK, getMeasuredDialInPumpMCCurrent() ); + dipCurr = fabs( getMeasuredDialInPumpMCCurrent() ); + if ( dipCurr > DIP_MAX_CURR_WHEN_RUNNING_MA ) + { + dipCurrErrorDurationCtr += TASK_PRIORITY_INTERVAL; + if ( dipCurrErrorDurationCtr > DIP_MAX_CURR_ERROR_DURATION_MS ) + { + #ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) + #endif + { + SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_IN_PUMP_MC_CURRENT_CHECK, getMeasuredDialInPumpMCCurrent() ); + } } } - } - else - { - dipCurrErrorDurationCtr = 0; - } + else + { + dipCurrErrorDurationCtr = 0; + } + } } } Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -rb1492eff71eab83d55456ad3520ccfd6cda06a77 -r1efa1af5337b36f5022df5ce8cb7459352f13a8b --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision b1492eff71eab83d55456ad3520ccfd6cda06a77) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 1efa1af5337b36f5022df5ce8cb7459352f13a8b) @@ -1104,49 +1104,52 @@ { F32 dopCurr; - // DialOut pump should be off - if ( DIAL_OUT_PUMP_OFF_STATE == dialOutPumpState ) + if ( FALSE == isAlarmActive( ALARM_ID_HD_AC_POWER_LOST ) ) { - dopCurr = fabs( getMeasuredDialOutPumpMCCurrent() ); - if ( dopCurr > DOP_MAX_CURR_WHEN_STOPPED_MA ) + // DialOut pump should be off + if ( DIAL_OUT_PUMP_OFF_STATE == dialOutPumpState ) { - dopCurrErrorDurationCtr += TASK_PRIORITY_INTERVAL; - if ( dopCurrErrorDurationCtr > DOP_MAX_CURR_ERROR_DURATION_MS ) + dopCurr = fabs( getMeasuredDialOutPumpMCCurrent() ); + if ( dopCurr > DOP_MAX_CURR_WHEN_STOPPED_MA ) { -#ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) -#endif + dopCurrErrorDurationCtr += TASK_PRIORITY_INTERVAL; + if ( dopCurrErrorDurationCtr > DOP_MAX_CURR_ERROR_DURATION_MS ) { - SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_OUT_PUMP_MC_CURRENT_CHECK, getMeasuredDialOutPumpMCCurrent() ); + #ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) + #endif + { + SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_OUT_PUMP_MC_CURRENT_CHECK, getMeasuredDialOutPumpMCCurrent() ); + } } } + else + { + dopCurrErrorDurationCtr = 0; + } } + // DialOut pump should be running else { - dopCurrErrorDurationCtr = 0; - } - } - // DialOut pump should be running - else - { - dopCurr = fabs( getMeasuredDialOutPumpMCCurrent() ); - if ( dopCurr > DOP_MAX_CURR_WHEN_RUNNING_MA ) - { - dopCurrErrorDurationCtr += TASK_PRIORITY_INTERVAL; - if ( dopCurrErrorDurationCtr > DOP_MAX_CURR_ERROR_DURATION_MS ) + dopCurr = fabs( getMeasuredDialOutPumpMCCurrent() ); + if ( dopCurr > DOP_MAX_CURR_WHEN_RUNNING_MA ) { -#ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) -#endif + dopCurrErrorDurationCtr += TASK_PRIORITY_INTERVAL; + if ( dopCurrErrorDurationCtr > DOP_MAX_CURR_ERROR_DURATION_MS ) { - SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_OUT_PUMP_MC_CURRENT_CHECK, getMeasuredDialOutPumpMCCurrent() ); + #ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) + #endif + { + SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_OUT_PUMP_MC_CURRENT_CHECK, getMeasuredDialOutPumpMCCurrent() ); + } } } + else + { + dopCurrErrorDurationCtr = 0; + } } - else - { - dopCurrErrorDurationCtr = 0; - } } } Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r254faac62b851c393c5df753eade2dc880b83247 -r1efa1af5337b36f5022df5ce8cb7459352f13a8b --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 254faac62b851c393c5df753eade2dc880b83247) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision 1efa1af5337b36f5022df5ce8cb7459352f13a8b) @@ -1184,7 +1184,7 @@ } if ( ( valvesStatus[ valve ].positionOutOfRangeCounter > MAX_POS_DEVIATION_TIME_INTERVAL_COUNTER ) && - ( TRUE == isAlarmActive( ALARM_ID_HD_AC_POWER_LOST ) ) ) + ( FALSE == isAlarmActive( ALARM_ID_HD_AC_POWER_LOST ) ) ) { SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_VALVE_POSITION_OUT_OF_RANGE, (U32)valve, currentPosition ); } Index: firmware/App/Controllers/Voltages.c =================================================================== diff -u -r254faac62b851c393c5df753eade2dc880b83247 -r1efa1af5337b36f5022df5ce8cb7459352f13a8b --- firmware/App/Controllers/Voltages.c (.../Voltages.c) (revision 254faac62b851c393c5df753eade2dc880b83247) +++ firmware/App/Controllers/Voltages.c (.../Voltages.c) (revision 1efa1af5337b36f5022df5ce8cb7459352f13a8b) @@ -222,15 +222,15 @@ } } - if ( ( getMonitoredLineLevel( MONITORED_LINE_24V ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) || - ( getMonitoredLineLevel( MONITORED_LINE_24V_REGEN ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) ) + if ( ( ( getMonitoredLineLevel( MONITORED_LINE_24V ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) || + ( getMonitoredLineLevel( MONITORED_LINE_24V_REGEN ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) ) && ( getCurrentOperationMode() != MODE_INIT ) ) { hasPowerBeenLost = TRUE; } if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_AC_POWER_LOST, hasPowerBeenLost ) ) { - //activateAlarmNoData( ALARM_ID_HD_AC_POWER_LOST ); + activateAlarmNoData( ALARM_ID_HD_AC_POWER_LOST ); } }