Index: firmware/App/Modes/Prime.c =================================================================== diff -u -re408267b7e73d664051a46e65ac248749af8e5be -r0339d8357ff90e6540ec4420b536336e8c2bc6ea --- firmware/App/Modes/Prime.c (.../Prime.c) (revision e408267b7e73d664051a46e65ac248749af8e5be) +++ firmware/App/Modes/Prime.c (.../Prime.c) (revision 0339d8357ff90e6540ec4420b536336e8c2bc6ea) @@ -7,8 +7,8 @@ * * @file Prime.c * -* @author (last) Dara Navaei -* @date (last) 07-Nov-2022 +* @author (last) Sean Nash +* @date (last) 02-Dec-2022 * * @author (original) Quang Nguyen * @date (original) 08-Dec-2020 @@ -46,6 +46,7 @@ #define BLOOD_PUMP_FAST_FLOW_RATE_CIRC_BLOOD_CIRCUIT_ML_MIN 300 ///< Blood pump fast flow rate during prime recirculate blood circuit state. #define BLOOD_PUMP_FLOW_RATE_SALINE_DIALYZER_ML_MIN 300 ///< Blood pump flow rate during prime the saline dialyzer dialysate state. #define DIALYSATE_PUMP_PRIME_FLOW_RATE_ML_MIN 300 ///< Dialysate pump flow rate during priming fluid path. +#define DPO_PUMP_PRIME_FLOW_RATE_ML_MIN 225 ///< Dialysate outlet pump flow rate needed to match PWM with dialysate inlet pump @ 300 mL/min in open loop mode. #define DIALYSATE_DIALYZER_TUBE_VOLUME_ML 115 ///< This total tube volume is used to calculate the Dpi & Dpo time out in the dialysate dialyzer state. #define DIALYSATE_DIALYZER_BYPASS_TUBE_VOLUME_ML 75 ///< This volume is used to calculate the DPi pump time out in the dialyzer bypass state. @@ -609,7 +610,7 @@ signalBloodPumpHardStop(); setDialInPumpTargetFlowRate( DIALYSATE_PUMP_PRIME_FLOW_RATE_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); - setDialOutPumpTargetRate( 225, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); // 225 target flow rate matches PWM duty cycle for DPi pump @ 300. + setDialOutPumpTargetRate( DPO_PUMP_PRIME_FLOW_RATE_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); // Calculate the time out value that must passed prior to checking for the steady state volume in the reservoir primeDialysateDialyzerTimeLimit = (U32)( ( ( DIALYSATE_DIALYZER_TUBE_VOLUME_ML + dialyzerDialysateVolume ) * SEC_PER_MIN * MS_PER_SECOND ) / DIALYSATE_PUMP_PRIME_FLOW_RATE_ML_MIN );