Index: firmware/App/Modes/Prime.c =================================================================== diff -u -rca238a4fc2400ffaf3c2a90c6e923a87b8dac4d2 -r53aac4a83db91120aaa4bcfc9b54c394f9e64e9a --- firmware/App/Modes/Prime.c (.../Prime.c) (revision ca238a4fc2400ffaf3c2a90c6e923a87b8dac4d2) +++ firmware/App/Modes/Prime.c (.../Prime.c) (revision 53aac4a83db91120aaa4bcfc9b54c394f9e64e9a) @@ -40,7 +40,6 @@ #define MAX_PRIME_TIME ( 30 * SEC_PER_MIN ) ///< Maximum prime time (in seconds). #define PRIME_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the prime data is published on the CAN bus. -#define BLOOD_PUMP_FAST_FLOW_RATE_PURGE_AIR_ML_MIN 300 ///< Blood pump fast flow rate to fill fluid. #define BLOOD_PUMP_SLOW_FLOW_RATE_PURGE_AIR_ML_MIN 150 ///< Blood pump slow flow rate after fluid reach lower level of air trap sensor. #define BLOOD_PUMP_SALINE_FLOW_RATE_PURGE_AIR_ML_MIN 200 ///< Blood pump very slow flow rate during prime saline dialyzer state #define BLOOD_PUMP_SLOW_FLOW_RATE_CIRC_BLOOD_CIRCUIT_ML_MIN 150 ///< Blood pump slow flow rate during prime recirculate blood circuit state. @@ -129,7 +128,6 @@ static BOOL primeStartRequested; ///< Flag indicates user requesting to start prime. static BOOL primeResumeRequested; ///< Flag indicates user requesting prime resume. -static BOOL primeFirstPurgePass; ///< Flag indicates to transition to a faster purge speed. static U32 noAirDetectedStartTime; ///< starting time when detecting no air. static U32 purgeAirTimeOutStartTime; ///< Starting time for purge air state time out. @@ -195,7 +193,6 @@ void transitionToPrime( void ) { primeStartTime = getMSTimerCount(); - primeFirstPurgePass = TRUE; setAlarmUserActionEnabled( ALARM_USER_ACTION_RESUME, TRUE ); setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, FALSE ); @@ -459,7 +456,7 @@ * @brief * The purgeAirValvesBloodPumpControl function controls valves and blood pump * to purge air. - * @details Inputs: primeFirstPurgePass + * @details Inputs: None * @details Outputs: run blood pump, close VDI, VDO, VBA and VBV valves, open VBT valve * @return current state (sub-mode) *************************************************************************/ @@ -473,14 +470,10 @@ signalDialOutPumpHardStop(); signalDialInPumpHardStop(); - if ( FALSE == primeFirstPurgePass ) - { - setBloodPumpTargetFlowRate( BLOOD_PUMP_FAST_FLOW_RATE_PURGE_AIR_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); - } - else - { - setBloodPumpTargetFlowRate( BLOOD_PUMP_SLOW_FLOW_RATE_PURGE_AIR_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); - } + + //Set the blood pump rate to 150 mL/min that helps to aviod entering saline bubbles in to PBo line + setBloodPumpTargetFlowRate( BLOOD_PUMP_SLOW_FLOW_RATE_PURGE_AIR_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); + } /*********************************************************************//** @@ -630,8 +623,8 @@ * @brief * The handlePrimePurgeAirState function checks for air trap level and moves * to blood circuit circulation state if fluid is detected at upper sensor. - * @details Inputs: air trap levels, primeFirstPurgePass, purgeAirTimeOutStartTime - * @details Outputs: runs blood pump, control valves to trap air, primeFirstPurgePass + * @details Inputs: air trap levels, purgeAirTimeOutStartTime + * @details Outputs: runs blood pump, control valves to trap air, * noAirDetectedStartTime * @return current state *************************************************************************/ @@ -656,9 +649,6 @@ setBloodPumpTargetFlowRate( BLOOD_PUMP_FAST_FLOW_RATE_CIRC_BLOOD_CIRCUIT_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); - // Once the dialyzer is no longer dry from the first pass of purge air, we can set flow to the fast rate - // until we are in a new priming state. - primeFirstPurgePass = FALSE; noAirDetectedStartTime = getMSTimerCount(); primeDialyzerBubbleClearState = PRIME_BUBBLE_CLEAR_COMPLETE_STATE; state = HD_PRIME_SALINE_CIRC_BLOOD_CIRCUIT_STATE;