Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -r7f97b34440ff591f75dbedb9ae3284ced36e73b7 -r5bc2cbda7e16937366aeae9f2b55995314120781 --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision 7f97b34440ff591f75dbedb9ae3284ced36e73b7) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision 5bc2cbda7e16937366aeae9f2b55995314120781) @@ -59,7 +59,7 @@ static U32 balChamberValveClosePeriod; ///< Close balancing chamber valves with the defined time prior switching state. static U32 currentBalChamberSwitchingCounter; ///< Counter (in task interval) to monitor the timing spent during balancing chamber fill/drain operation. static BOOL isBalChamberFillInProgress; ///< Flag indicating balancing chamber fill/drain is in progress. -static BOOL isPressureStabilizedDuringFill; ///< Flag indicating that the pressure is stabilized due to fill complete. +static BOOL isPressureStalbilizedDuringFill; ///< Flag indicating that the pressure is stablized due to fill complete. static BAL_CHAMBER_SW_STATE_T balChamberSWState; ///< Current balancing chamber switching state ( state 1 or state 2). static U32 balChamberDataPublicationTimerCounter; ///< Used to schedule balancing chamber data publication to CAN bus. static U32 balChamberFillPressureDropCounter; ///< Counter to check balancing chamber valves opened and there by pressure drop is seen. @@ -121,7 +121,7 @@ balChamberValveClosePeriod = 0; isBalChamberFillInProgress = FALSE; currentBalChamberSwitchingCounter = 0; - isPressureStabilizedDuringFill = FALSE; + isPressureStalbilizedDuringFill = FALSE; lastTdDialysateFlowrate = 0.0F; balChamberDataPublicationTimerCounter = 0; balChamberFillPressureDropCounter = 0; @@ -517,7 +517,7 @@ BAL_CHAMBER_EXEC_STATE_T state = BAL_CHAMBER_STATE1_FILL_START; currentBalChamberSwitchingCounter = 0; isBalChamberFillInProgress = FALSE; - isPressureStabilizedDuringFill = FALSE; + isPressureStalbilizedDuringFill = FALSE; isPressureDroppedDuringFill = FALSE; balChamberSWState = BAL_CHAMBER_SW_STATE1; @@ -526,9 +526,6 @@ freshDialPressure = getFilteredPressure( D18_PRES ); spentDialPressure = getFilteredPressure( D51_PRES ); - //Set Trimmer heater Target temp every BC cycle to catch up fresh dialysate temp - setHeaterTargetTemperature( D45_HEAT, getD4AverageTemperature() ); - BOOL isFreshDialysatePressureInRange = ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ); BOOL isSpentDialysatePressureInRange = ( spentDialPressure >= SPENT_DIAL_PRESSURE_MIN_PSIG ) && ( spentDialPressure <= SPENT_DIAL_PRESSURE_MAX_PSIG ); BOOL isBCSwitchOnlyStatus = ( TRUE == getBalChamberSwitchingOnlyStatus() ); @@ -622,7 +619,7 @@ * The handleBalChamberState1ValvesClose function check for the balancing chamber * fill complete and close the currently opened valves. * @details \b Inputs: currentBalChamberSwitchingCounter, spent and fresh dialysate pressure - * @details \b Outputs: isPressureStabilizedDuringFill,isBalChamberFillInProgress + * @details \b Outputs: isPressureStalbilizedDuringFill,isBalChamberFillInProgress * @return next balancing chamber state. *************************************************************************/ static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState1ValvesClose( void ) @@ -635,18 +632,25 @@ spentDialPressure = getFilteredPressure( D51_PRES ); // Check fresh and spent dialysate pressure back in range to indicate fill complete. - if ( TRUE == isFreshDialysatePressureInRange && TRUE == isSpentDialysatePressureInRange ) + if ( getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) != TRUE ) { - if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) + if ( TRUE == isFreshDialysatePressureInRange && TRUE == isSpentDialysatePressureInRange ) { - // stabilized pressure indicating fill is complete - isPressureStabilizedDuringFill = TRUE; + if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) + { + // stabilized pressure indicating fill is complete + isPressureStalbilizedDuringFill = TRUE; + } } } + else + { + isPressureStalbilizedDuringFill = FALSE; + } // Switching time met or pressure in range, close valves if ( ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) || - ( TRUE == isPressureStabilizedDuringFill ) ) + ( TRUE == isPressureStalbilizedDuringFill ) ) { // close the state 1 opened valves valveControlForBCState1FillEnd(); @@ -690,7 +694,7 @@ // When fill initiated, pressure is not dropped to the expected range, possible valve failures. SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DD_BC_STATE1_FILL_PRESSURE_DROP_OUT_OF_RANGE, freshDialPressure, spentDialPressure ); } - else if ( TRUE != isPressureStabilizedDuringFill ) + else if ( TRUE != isPressureStalbilizedDuringFill ) { // Alarm when switching time expired, but still pressure not in range which indicates fill is not yet completed. SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DD_BC_STATE1_FILL_END_PRESSURE_OUT_OF_RANGE, freshDialPressure, spentDialPressure ); @@ -731,7 +735,7 @@ BAL_CHAMBER_EXEC_STATE_T state = BAL_CHAMBER_STATE2_FILL_START; currentBalChamberSwitchingCounter = 0; isBalChamberFillInProgress = FALSE; - isPressureStabilizedDuringFill = FALSE; + isPressureStalbilizedDuringFill = FALSE; isPressureDroppedDuringFill = FALSE; balChamberSWState = BAL_CHAMBER_SW_STATE2; @@ -740,9 +744,6 @@ freshDialPressure = getFilteredPressure( D18_PRES ); spentDialPressure = getFilteredPressure( D51_PRES ); - //Set Trimmer heater Target temp every BC cycle to catch up fresh dialysate temp - setHeaterTargetTemperature( D45_HEAT, getD4AverageTemperature() ); - BOOL isFreshDialysatePressureInRange = ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ); BOOL isSpentDialysatePressureInRange = ( spentDialPressure >= SPENT_DIAL_PRESSURE_MIN_PSIG ) && ( spentDialPressure <= SPENT_DIAL_PRESSURE_MAX_PSIG ); BOOL isBCSwitchOnlyStatus = ( TRUE == getBalChamberSwitchingOnlyStatus() ); @@ -785,7 +786,7 @@ * The handleBalChamberState2ValvesClose function check for the balancing chamber * fill complete and close the currently opened valves. * @details \b Inputs: currentBalChamberSwitchingCounter, spent and fresh dialysate pressure - * @details \b Outputs: isPressureStabilizedDuringFill,isBalChamberFillInProgress + * @details \b Outputs: isPressureStalbilizedDuringFill,isBalChamberFillInProgress * @return next balancing chamber state. *************************************************************************/ static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState2ValvesClose( void ) @@ -798,18 +799,25 @@ spentDialPressure = getFilteredPressure( D51_PRES ); // Check fresh and spent dialysate pressure back in range to indicate fill complete. - if ( ( TRUE == isFreshDialysatePressureInRange ) && ( TRUE == isSpentDialysatePressureInRange ) ) + if ( getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) != TRUE ) { - if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) + if ( ( TRUE == isFreshDialysatePressureInRange ) && ( TRUE == isSpentDialysatePressureInRange ) ) { - // stabilized pressure indicating fill is complete - isPressureStabilizedDuringFill = TRUE; + if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) + { + // stabilized pressure indicating fill is complete + isPressureStalbilizedDuringFill = TRUE; + } } } + else + { + isPressureStalbilizedDuringFill = FALSE; + } // Check switching cycle time or pressure check for valve closure if ( ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) || - ( TRUE == isPressureStabilizedDuringFill ) ) + ( TRUE == isPressureStalbilizedDuringFill ) ) { // close the valves valveControlForBCState2FillEnd(); @@ -827,7 +835,7 @@ * The handleBalChamberState2FillEnd function check for the balancing chamber * switching period complete and transition to next state. * @details \b Inputs: currentBalChamberSwitchingCounter, balChamberSwitchingPeriod - * @details \b Outputs: isPressureStabilizedDuringFill,isBalChamberFillInProgress + * @details \b Outputs: isPressureStalbilizedDuringFill,isBalChamberFillInProgress * @details \b Alarm: ALARM_ID_DD_BC_STATE2_FILL_PRESSURE_DROP_OUT_OF_RANGE * when pressure is not in range during balacing chamber state 2 fill in progress. * @details \b Alarm: ALARM_ID_DD_BC_STATE2_FILL_END_PRESSURE_OUT_OF_RANGE @@ -854,7 +862,7 @@ // When fill initiated, pressure is not dropped to the expected range, possible valve failures. SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DD_BC_STATE2_FILL_PRESSURE_DROP_OUT_OF_RANGE, freshDialPressure, spentDialPressure ); } - else if ( TRUE != isPressureStabilizedDuringFill ) + else if ( TRUE != isPressureStalbilizedDuringFill ) { // Alarm when switching time expired, but still pressure not in range which indicates fill is not completed. SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DD_BC_STATE2_FILL_END_PRESSURE_OUT_OF_RANGE, freshDialPressure, spentDialPressure ); @@ -928,7 +936,7 @@ data.balChamberSwPeriod = balChamberSwitchingPeriod; data.isBalChamberFillInProgress = isBalChamberFillInProgress; data.currentBalChamberSwitchingCounter = currentBalChamberSwitchingCounter; - data.isPressureStabilizedDuringFill = isPressureStabilizedDuringFill; + data.isPressureStalbilizedDuringFill = isPressureStalbilizedDuringFill; data.balChamberSWOnlyState = balanceChamberSwitchingOnly; broadcastData( MSG_ID_DD_BAL_CHAMBER_DATA, COMM_BUFFER_OUT_CAN_DD_BROADCAST, (U08*)&data, sizeof( BAL_CHAMBER_DATA_T ) ); Index: firmware/App/Controllers/BalancingChamber.h =================================================================== diff -u -r93774c1a907fb9ce8e5c784e77ed3483c04a525b -r5bc2cbda7e16937366aeae9f2b55995314120781 --- firmware/App/Controllers/BalancingChamber.h (.../BalancingChamber.h) (revision 93774c1a907fb9ce8e5c784e77ed3483c04a525b) +++ firmware/App/Controllers/BalancingChamber.h (.../BalancingChamber.h) (revision 5bc2cbda7e16937366aeae9f2b55995314120781) @@ -48,7 +48,7 @@ U32 balChamberSwPeriod; ///< Balancing chamber switching period BOOL isBalChamberFillInProgress; ///< Whether balancing chamber fill in progress or not U32 currentBalChamberSwitchingCounter; ///< Current balancing chamber switching counter - BOOL isPressureStabilizedDuringFill; ///< Whether pressure stabilized during fill or not + BOOL isPressureStalbilizedDuringFill; ///< Whether pressure stabilized during fill or not BOOL balChamberSWOnlyState; ///< Balancing chamber switching only status ( On/Off) } BAL_CHAMBER_DATA_T; Index: firmware/App/Controllers/DialysatePumps.c =================================================================== diff -u -r830213bc6dcc1a684610caf78c79d55f2cb41e93 -r5bc2cbda7e16937366aeae9f2b55995314120781 --- firmware/App/Controllers/DialysatePumps.c (.../DialysatePumps.c) (revision 830213bc6dcc1a684610caf78c79d55f2cb41e93) +++ firmware/App/Controllers/DialysatePumps.c (.../DialysatePumps.c) (revision 5bc2cbda7e16937366aeae9f2b55995314120781) @@ -22,6 +22,7 @@ #include "FpgaDD.h" #include "MessageSupport.h" #include "Messaging.h" +#include "TestSupport.h" //#include "NVDataMgmt.h" #include "OperationModes.h" #include "PersistentAlarm.h" @@ -69,10 +70,13 @@ #define SPEED_COUNT_ZERO 0 ///< Measured speed count zero check. #define SPEED_CONV_FACTOR 1500000 ///< Measured speed count conversion to RPM -#define D12_PUMP_P_COEFFICIENT 20.0F ///< P term for fresh dialysate pump delta pressure control. -#define D12_PUMP_I_COEFFICIENT 60.0F ///< I term for fresh dialysate pump delta pressure control. -#define D48_PUMP_P_COEFFICIENT 20.0F ///< P term for spent dialysate pump delta pressure control. -#define D48_PUMP_I_COEFFICIENT 60.0F ///< I term for spent dialysate pump delta pressure control. +#define D12_PUMP_P_COEFFICIENT 20.0F ///< P term for fresh dialysate pump delta pressure control (Diener 2000). +#define D12_PUMP_I_COEFFICIENT 60.0F ///< I term for fresh dialysate pump delta pressure control (Diener 2000). +#define D48_PUMP_P_COEFFICIENT 20.0F ///< P term for spent dialysate pump delta pressure control (Diener 2000). +#define D48_PUMP_I_COEFFICIENT 60.0F ///< I term for spent dialysate pump delta pressure control (Diener 2000). +/** Diener 1000 pump gains for D48 when TEST_CONFIG_DD_ENABLE_DIENER_1000_PUMP is set. Tune as needed. */ +#define D48_PUMP_P_COEFFICIENT_1000 20.0F ///< P term for D48 when Diener 1000 enabled. +#define D48_PUMP_I_COEFFICIENT_1000 60.0F ///< I term for D48 when Diener 1000 enabled. #define DIAL_PUMP_NO_FEED_FORWARD 0.0F ///< Feedforward term for dialysate pump control #define DEGAS_PUMP_SLOPE_FACTOR -0.0156F ///< Dialysate pump target pressure multiply factor ( m factor in 'y = mx + b' equation) #define DEGAS_PUMP_INTERCEPT_FACTOR 0.1153F ///< Dialysate pump target pressure addition factor ( b factor in 'y = mx + b' equation) @@ -156,6 +160,36 @@ /*********************************************************************//** * @brief + * Returns maximum dialysate pump RPM for D48 (Diener 1000: 1300 when + * TEST_CONFIG_DD_ENABLE_DIENER_1000_PUMP set, else Diener 2000: 2650). + * Used by ModeGenDialysate/BalancingChamber for D48 speed limits. + * @return MAX RPM for D48 pump. + *************************************************************************/ +U32 getMaxDialysatePumpRpm( void ) +{ + return ( TRUE == getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DIENER_1000_PUMP ) ) + ? (U32)DIENER_1000_MAX_RPM + : (U32)DIENER_2000_MAX_RPM; +} + +/*********************************************************************//** + * @brief + * Returns maximum dialysate pump RPM for the given pump. D12 always 2650; + * D48 uses TEST_CONFIG_DD_ENABLE_DIENER_1000_PUMP (1300 vs 2650). + * @param pumpId D12_PUMP or D48_PUMP. + * @return MAX RPM for that pump. + *************************************************************************/ +U32 getMaxDialysatePumpRpmForPump( DIALYSATE_PUMPS_T pumpId ) +{ + if ( pumpId == D48_PUMP ) + { + return getMaxDialysatePumpRpm(); + } + return (U32)DIENER_2000_MAX_RPM; +} + +/*********************************************************************//** + * @brief * The initDialysatePump function initializes the DialysatePumps unit. * @details \b Inputs: none * @details \b Outputs: Dialysate pump unit variables initialized. @@ -217,13 +251,27 @@ pumpTargetPressure[D48_PUMP].ovData = 0.0F; pumpTargetPressure[D48_PUMP].override = OVERRIDE_RESET; - // Initialize the fresh dialysate pump PI controller + // Initialize the fresh dialysate pump PI controller (D12 always Diener 2000: 200-2650) initializePIController( PI_CONTROLLER_ID_D12_PUMP, FRESH_DIAL_OPEN_LOOP_SPEED_RPM, D12_PUMP_P_COEFFICIENT, D12_PUMP_I_COEFFICIENT, - MIN_DIALYSATE_PUMP_RPM, MAX_DIALYSATE_PUMP_RPM, FALSE, DIAL_PUMP_NO_FEED_FORWARD ); + MIN_DIALYSATE_PUMP_RPM, +#ifdef __NEW_D48_PUMP__ + MAX_DIALYSATE_PUMP_RPM, FALSE, DIAL_PUMP_NO_FEED_FORWARD ); +#else + (U32)DIENER_2000_MAX_RPM, FALSE, DIAL_PUMP_NO_FEED_FORWARD ); +#endif - // Initialize spent dialysate pump PI controller - initializePIController( PI_CONTROLLER_ID_D48_PUMP, SPENT_DIAL_OPEN_LOOP_SPEED_RPM, D48_PUMP_P_COEFFICIENT, D48_PUMP_I_COEFFICIENT, - MIN_DIALYSATE_PUMP_RPM, MAX_DIALYSATE_PUMP_RPM,FALSE, DIAL_PUMP_NO_FEED_FORWARD ); + // Initialize spent dialysate pump PI controller (D48: Diener 1000 when TEST_CONFIG_DD_ENABLE_DIENER_1000_PUMP, else 2000) + { + F32 d48Kp = ( TRUE == getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DIENER_1000_PUMP ) ) ? D48_PUMP_P_COEFFICIENT_1000 : D48_PUMP_P_COEFFICIENT; + F32 d48Ki = ( TRUE == getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DIENER_1000_PUMP ) ) ? D48_PUMP_I_COEFFICIENT_1000 : D48_PUMP_I_COEFFICIENT; + initializePIController( PI_CONTROLLER_ID_D48_PUMP, SPENT_DIAL_OPEN_LOOP_SPEED_RPM, d48Kp, d48Ki, + MIN_DIALYSATE_PUMP_RPM, +#ifdef __NEW_D48_PUMP__ + MAX_DIALYSATE_PUMP_RPM, FALSE, DIAL_PUMP_NO_FEED_FORWARD ); +#else + getMaxDialysatePumpRpm(), FALSE, DIAL_PUMP_NO_FEED_FORWARD ); +#endif + } // Init the dialysate pump with valid PWM while motor is disabled. // when enable triggers, we dont want invlid RPM set that triggers alarm in motor controller. @@ -290,7 +338,7 @@ if ( pumpId < NUM_OF_DIALYSATE_PUMPS ) { - if ( ( MIN_DIALYSATE_PUMP_RPM <= rpm ) && ( rpm <= MAX_DIALYSATE_PUMP_RPM ) ) + if ( ( MIN_DIALYSATE_PUMP_RPM <= rpm ) && ( rpm <= getMaxDialysatePumpRpmForPump( pumpId ) ) ) { pumpTargetSpeed[ pumpId ].data = rpm; } @@ -301,7 +349,7 @@ } else { - pumpTargetSpeed[ pumpId ].data = MAX_DIALYSATE_PUMP_RPM; + pumpTargetSpeed[ pumpId ].data = getMaxDialysatePumpRpmForPump( pumpId ); } // Assign Open loop or close loop control @@ -360,7 +408,7 @@ } // Reset all the variables to stop mode - dialysatePumps[ pumpId ].currentPumpSpeed = MIN_DIALYSATE_PUMP_RPM; + dialysatePumps[ pumpId ].currentPumpSpeed = (F32)MIN_DIALYSATE_PUMP_RPM; pumpTargetSpeed[ pumpId ].data = 0.0F; dialysatePumps[ pumpId ].dialysatePumpState = DIALYSATE_PUMP_OFF_STATE; dialysatePumps[ pumpId ].controlTimerCounter = 0; @@ -753,7 +801,7 @@ // If the pump's target speed is set to be 0, do not ramp down set it to zero immediately // if ( getDialysatePumpTargetSpeed( pumpId ) < MIN_DIALYSATE_PUMP_RPM ) // { -// dialysatePumps[ pumpId ].currentPumpSpeed = MIN_DIALYSATE_PUMP_RPM; +// dialysatePumps[ pumpId ].currentPumpSpeed = (F32)MIN_DIALYSATE_PUMP_RPM; // } } @@ -786,10 +834,24 @@ { DIALYSATE_PUMP_STATE_T state = DIALYSATE_PUMP_CONTROL_TO_TARGET_STATE; - // control at set minimum interval or interval is expired and balance chamber fill is complete - if ( ( ( ++dialysatePumps[ pumpId ].controlTimerCounter >= DP_CONTROL_INTERVAL ) || - ( TRUE == dialPumpsReadyToControl ) ) && ( TRUE != isDialPumpOpenLoopEnabled[ pumpId ] ) ) + // Open-loop: continuously apply target RPM so pump stays at setpoint (not overwritten by any prior closed-loop output). + if ( TRUE == isDialPumpOpenLoopEnabled[ pumpId ] ) { + F32 targetSpeed = getDialysatePumpTargetSpeed( pumpId ); + dialysatePumps[ pumpId ].currentPumpSpeed = targetSpeed; + if ( D12_PUMP == pumpId ) + { + setFPGAD12PumpSpeed( (U16)targetSpeed ); + } + else + { + setFPGAD48PumpSpeed( (U16)targetSpeed ); + } + } + // Closed-loop: control at set interval when balancing chamber fill is complete. + else if ( ( ++dialysatePumps[ pumpId ].controlTimerCounter >= DP_CONTROL_INTERVAL ) || + ( TRUE == dialPumpsReadyToControl ) ) + { dialysatePumps[ pumpId ].controlTimerCounter = 0; dialPumpsReadyToControl = TRUE; @@ -1164,7 +1226,7 @@ { // Handle start command if ( ( TRUE == payload.startStop ) && - ( ( payload.rpm >= MIN_DIALYSATE_PUMP_RPM ) && ( payload.rpm <= MAX_DIALYSATE_PUMP_RPM ) ) ) + ( ( payload.rpm >= MIN_DIALYSATE_PUMP_RPM ) && ( payload.rpm <= getMaxDialysatePumpRpmForPump( (DIALYSATE_PUMPS_T)payload.pumpID ) ) ) ) { setDialysatePumpTargetRPM( (DIALYSATE_PUMPS_T)payload.pumpID, payload.rpm, (BOOL)payload.pumpControl ); result = TRUE; Index: firmware/App/Controllers/DialysatePumps.h =================================================================== diff -u -rd210786d6c7d75bb0b4d9e18efc40a01d85123fe -r5bc2cbda7e16937366aeae9f2b55995314120781 --- firmware/App/Controllers/DialysatePumps.h (.../DialysatePumps.h) (revision d210786d6c7d75bb0b4d9e18efc40a01d85123fe) +++ firmware/App/Controllers/DialysatePumps.h (.../DialysatePumps.h) (revision 5bc2cbda7e16937366aeae9f2b55995314120781) @@ -7,8 +7,8 @@ * * @file DialysatePumps.h * -* @author (last) Sameer Kalliadan Poyil -* @date (last) 03-Feb-2026 +* @author (last) Vinayakam Mani +* @date (last) 13-Nov-2025 * * @author (original) Vinayakam Mani * @date (original) 07-Oct-2024 @@ -25,19 +25,34 @@ * @brief Dialysate Pumps monitor/controller module. Controls and monitors the dialysate pumps. * Dialysate pump manufacturer: Diener Silencer Series Gear Pumps, PN: 01483-PM-3-RA. * The pump shall run at 200(10%) -2700(90%)RPM. + * D12 always uses Diener 2000 (200-2650 RPM). D48 uses Diener 1000 (200-1300) when + * TEST_CONFIG_DD_ENABLE_DIENER_1000_PUMP is set via Dialin, else Diener 2000 (200-2650). * * @addtogroup DialysatePumps * @{ */ // ********** public definitions ********** -#ifdef __MAXON_SPEED_UPDATE__ -#define MIN_DIALYSATE_PUMP_RPM 200 ///< Minimum RPM target for dialysate pump (though zero is allowed if turning pump off). + +/** Diener 2000 pump limits. */ +#define DIENER_2000_MIN_RPM 200 ///< Diener 2000 minimum RPM. +#define DIENER_2000_MAX_RPM 2650 ///< Diener 2000 maximum RPM. + +/** Diener 1000 pump limits (when TEST_CONFIG_DD_ENABLE_DIENER_1000_PUMP is set, or __NEW_D48_PUMP__ defined). */ +#define DIENER_1000_MIN_RPM 150 ///< Diener 1000 minimum RPM. +#define DIENER_1000_MAX_RPM 1350 ///< Diener 1000 maximum RPM. + +#ifdef __NEW_D48_PUMP__ + +#define MIN_DIALYSATE_PUMP_RPM 150 ///< Minimum RPM target for dialysate pump (150 accepted; zero allowed when turning pump off). +#define MAX_DIALYSATE_PUMP_RPM 1300 ///< Maximum RPM target for dialysate pump (new D48 / Diener 1000). + #else -#define MIN_DIALYSATE_PUMP_RPM 350 ///< Minimum RPM target for dialysate pump (though zero is allowed if turning pump off). -#endif -#define MAX_DIALYSATE_PUMP_RPM 2650 ///< Maximum RPM target for dialysate pump. +#define MIN_DIALYSATE_PUMP_RPM 150 ///< Minimum RPM target for dialysate pump (150 accepted; zero allowed when turning pump off). +#define MAX_DIALYSATE_PUMP_RPM 2650 ///< Maximum RPM target for dialysate pump (Diener 2000; use getMaxDialysatePumpRpm() for runtime config). + +#endif #define DEGAS_PUMP_TARGET_PRES_ADJ_THRESHOLD -1.0F ///< Dialysate Pump(D12) target pressure threshold adjustment factor. #define MIN_DIALYSATE_FLOW_RATE ( 100.0F ) ///< Minimum dialysate flow rate @@ -93,6 +108,9 @@ void signalDialysatePumpHardStop( DIALYSATE_PUMPS_T pumpId ); BOOL setDialysatePumpTargetRPM( DIALYSATE_PUMPS_T pumpId, U32 rpm, BOOL isOpenLoopControlEnabled ); +U32 getMaxDialysatePumpRpm( void ); +U32 getMaxDialysatePumpRpmForPump( DIALYSATE_PUMPS_T pumpId ); + BOOL testDialysatePumpsDataPublishIntervalOverride( MESSAGE_T *message ); BOOL testDialysatePumpTargetSpeedOverride( MESSAGE_T *message ); BOOL testDialysatePumpMeasuredSpeedOverride( MESSAGE_T *message ); Index: firmware/App/DDCommon.h =================================================================== diff -u -r8a547ec16b2c59efad84e7243526f6715a46dbda -r5bc2cbda7e16937366aeae9f2b55995314120781 --- firmware/App/DDCommon.h (.../DDCommon.h) (revision 8a547ec16b2c59efad84e7243526f6715a46dbda) +++ firmware/App/DDCommon.h (.../DDCommon.h) (revision 5bc2cbda7e16937366aeae9f2b55995314120781) @@ -49,7 +49,7 @@ //#define __BICARB_CHAMBER_FILL__ 1 //Uncomment below for Maxon controller speed change -#define __MAXON_SPEED_UPDATE__ 1 +//#define __MAXON_SPEED_UPDATE__ 1 //Uncomment below to disable heaters debug message #define __HEATERS_DEBUG__ 1 Index: firmware/App/Modes/ModeGenDialysate.c =================================================================== diff -u -r7f97b34440ff591f75dbedb9ae3284ced36e73b7 -r5bc2cbda7e16937366aeae9f2b55995314120781 --- firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision 7f97b34440ff591f75dbedb9ae3284ced36e73b7) +++ firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision 5bc2cbda7e16937366aeae9f2b55995314120781) @@ -7,8 +7,8 @@ * * @file ModeGenDialysate.c * -* @author (last) Sameer Kalliadan Poyil -* @date (last) 06-Feb-2026 +* @author (last) Varshini Nagabooshanam +* @date (last) 12-Jan-2026 * * @author (original) Vinayakam Mani * @date (original) 06-Nov-2024 @@ -62,7 +62,9 @@ #define LOW_DIAL_FLOW_RATE 150.0F ///< Dialysate flow rate lesser than 150 considered to be low Qds. #define ZERO_DIAL_FLOW_RATE 0.0F ///< Zero dialysate flow rate #define SPENT_CHAMBER_FILL_MAX_COUNT 10 ///< Total number of spent chamber fill allowed. -#define BICARB_CHAMBER_FILL_TIMEOUT ( 1 * MS_PER_SECOND ) ///< Bicarb chamber fill timeout. +#define BICARB_CHAMBER_FILL_TIMEOUT ( 1 * MS_PER_SECOND ) ///< Bicarb chamber fill timeout. +#define PUMP_SPEED_SLOPE_FACTOR 1.24F ///< D48 pump speed (calculation based on Qd) slope factor. +#define PUMP_SPEED_INTERCEPT_FACTOR 30.0F ///< D48 pump speed (calculation based on Qd) intercept factor. //Testing #define DELAY_BC_SWITCHING_AT_START_UP ( 10 * MS_PER_SECOND ) ///< Provide a balancing chamber switching start up delay to stabilize pump speed etc., /// Payload record structure for Gen dialysate execution state set request @@ -88,6 +90,7 @@ static U32 bypassStateDelayStartTimeMS; ///< Delay balancing chamber switching for a second to preapre pump steady state. static BOOL delayBypassStateFlag; ///< To indicate change in treatment parameters static F32 dialysateToDialyzerFlowRate; ///< Current dialysate to dialyzer flow rate (ml/min) +static U32 d48PumpSpeed; ///< Initial D48 pump speed based on the Qd. // ********** private function prototypes ********** @@ -137,6 +140,7 @@ bicarbFillStartTimeMS = 0; pendingSpentChamberFill = FALSE; pendingBicarbChamberFill = FALSE; + d48PumpSpeed = MIN_DIALYSATE_PUMP_RPM; //Testing bypassStateDelayStartTimeMS = 0; delayBypassStateFlag = TRUE; @@ -160,8 +164,13 @@ *************************************************************************/ U32 transitionToGenDialysateMode( void ) { + U32 initialD48PumpSpeed = 0U; + initGenDialysateMode(); setCurrentSubState( NO_SUB_STATE ); + //calculateD48PumpSpeedForBCFill(); + initialD48PumpSpeed = getCalculatedD48PumpSpeedForBCFill(); + setD48PumpSpeedForBCFill( initialD48PumpSpeed ); transitionToUltrafiltration(); return genDialysateState; @@ -216,34 +225,21 @@ setValveState( D35_VALV, VALVE_STATE_CLOSED ); // VDI setValveState( D40_VALV, VALVE_STATE_CLOSED ); // VDO setValveState( D47_VALV, VALVE_STATE_CLOSED ); // spent chamber purge valve + setValveState( D64_VALV, VALVE_STATE_CLOSED ); setValveState( D34_VALV, VALVE_STATE_OPEN ); // Bypass valve - setValveState( D8_VALV, VALVE_STATE_CLOSED ); - setValveState( D54_VALV, VALVE_STATE_CLOSED ); - setValveState( D81_VALV, VALVE_STATE_CLOSED ); - setValveState( D85_VALV, VALVE_STATE_CLOSED ); - setValveState( D31_VALV, VALVE_STATE_CLOSED ); + setValveState( D80_VALV, VALVE_STATE_OPEN ); // Bicarb valve - if ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DRY_BICARB ) == FALSE ) - { - setValveState( D80_VALV, VALVE_STATE_OPEN ); // Bicarb valve - setValveState( D64_VALV, VALVE_STATE_CLOSED ); - } - // Turn on the primary heater calculateTargetDialysateTemp(); setHeaterTargetTemperature( D5_HEAT, getGenDialysateTargetTemperature() ); setD28TempFeedbackControl( TRUE ); startHeater( D5_HEAT ); - //Turn on Trimmer heater - setHeaterTargetTemperature( D45_HEAT, getD4AverageTemperature() ); - startHeater( D45_HEAT ); - //Testing : Enable close loop once testing is complete //setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, FALSE ); setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, TRUE ); //setDialysatePumpTargetRPM( D48_PUMP, SPENT_DIAL_PUMP_INITIAL_RPM, FALSE ); - setDialysatePumpTargetRPM( D48_PUMP, SPENT_DIAL_PUMP_INITIAL_RPM, TRUE ); + setDialysatePumpTargetRPM( D48_PUMP, d48PumpSpeed, TRUE ); //Rinse pump On setRinsePumpState( RINSE_PUMP_STATE_ON ); @@ -258,11 +254,7 @@ case DD_GEND_DIALYSATE_DELIVERY_STATE: //Previous state setValveState( D47_VALV, VALVE_STATE_CLOSED ); // spent chamber purge valve - setValveState( D8_VALV, VALVE_STATE_CLOSED ); - setValveState( D54_VALV, VALVE_STATE_CLOSED ); - setValveState( D81_VALV, VALVE_STATE_CLOSED ); - setValveState( D85_VALV, VALVE_STATE_CLOSED ); - setValveState( D31_VALV, VALVE_STATE_CLOSED ); + setValveState( D64_VALV, VALVE_STATE_CLOSED ); setValveState( D14_VALV, VALVE_STATE_OPEN ); setValveState( D53_VALV, VALVE_STATE_OPEN ); // Drain valve @@ -272,14 +264,10 @@ setD28TempFeedbackControl( TRUE ); startHeater( D5_HEAT ); - //Turn on Trimmer heater - setHeaterTargetTemperature( D45_HEAT, getD4AverageTemperature() ); - startHeater( D45_HEAT ); - //setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, FALSE ); setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, TRUE ); //setDialysatePumpTargetRPM( D48_PUMP, SPENT_DIAL_PUMP_INITIAL_RPM, FALSE ); - setDialysatePumpTargetRPM( D48_PUMP, SPENT_DIAL_PUMP_INITIAL_RPM, TRUE ); + setDialysatePumpTargetRPM( D48_PUMP, d48PumpSpeed, TRUE ); //Rinse pump On setRinsePumpState( RINSE_PUMP_STATE_ON ); @@ -288,33 +276,17 @@ setValveState( D34_VALV, VALVE_STATE_CLOSED ); // Bypass valve setValveState( D35_VALV, VALVE_STATE_OPEN ); // VDI setValveState( D40_VALV, VALVE_STATE_OPEN ); // VDO - - if ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DRY_BICARB ) == FALSE ) - { - setValveState( D80_VALV, VALVE_STATE_OPEN ); // Bicarb valve - setValveState( D64_VALV, VALVE_STATE_CLOSED ); - } + setValveState( D80_VALV, VALVE_STATE_OPEN ); // Bicarb valve break; case DD_GEND_SPENT_CHAMBER_FILL_STATE: //Set valves and actuators setValveState( D35_VALV, VALVE_STATE_CLOSED ); // VDI setValveState( D40_VALV, VALVE_STATE_CLOSED ); // VDO - setValveState( D8_VALV, VALVE_STATE_CLOSED ); - setValveState( D54_VALV, VALVE_STATE_CLOSED ); - setValveState( D81_VALV, VALVE_STATE_CLOSED ); - setValveState( D85_VALV, VALVE_STATE_CLOSED ); - setValveState( D31_VALV, VALVE_STATE_CLOSED ); setValveState( D14_VALV, VALVE_STATE_OPEN ); setValveState( D53_VALV, VALVE_STATE_OPEN ); // Drain valve setValveState( D34_VALV, VALVE_STATE_OPEN ); // Bypass valve - - if ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DRY_BICARB ) == FALSE ) - { - setValveState( D80_VALV, VALVE_STATE_OPEN ); // Bicarb valve - setValveState( D64_VALV, VALVE_STATE_CLOSED ); - } - + setValveState( D80_VALV, VALVE_STATE_OPEN ); // Bicarb valve setValveState( D47_VALV, VALVE_STATE_OPEN ); // Spent chamber purge valve requestConcentratePumpOff( D76_PUMP, FALSE ); @@ -326,8 +298,6 @@ setHeaterTargetTemperature( D5_HEAT, getGenDialysateTargetTemperature() ); setD28TempFeedbackControl( TRUE ); startHeater( D5_HEAT ); - // Stop trimmer heater - stopHeater( D45_HEAT ); setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, TRUE ); setDialysatePumpTargetRPM( D48_PUMP, SPENT_DIAL_PUMP_FILL_RPM, TRUE ); @@ -352,13 +322,8 @@ setValveState( D53_VALV, VALVE_STATE_OPEN ); // Drain valve setValveState( D34_VALV, VALVE_STATE_OPEN ); // Bypass valve - - if ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DRY_BICARB ) == FALSE ) - { - setValveState( D80_VALV, VALVE_STATE_OPEN ); // Bicarb valve - setValveState( D64_VALV, VALVE_STATE_OPEN ); // Bicarb chamber purge valve - } - + setValveState( D64_VALV, VALVE_STATE_OPEN ); // Bicarb chamber purge valve + setValveState( D80_VALV, VALVE_STATE_OPEN ); // Bicarb valve bicarbFillStartTimeMS = getMSTimerCount(); // Turn on the primary heater @@ -372,7 +337,7 @@ setRinsePumpState( RINSE_PUMP_STATE_ON ); setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, TRUE ); - setDialysatePumpTargetRPM( D48_PUMP, SPENT_DIAL_PUMP_INITIAL_RPM, TRUE ); + setDialysatePumpTargetRPM( D48_PUMP, d48PumpSpeed, TRUE ); break; case DD_GEND_DIALYSATE_DELIVERY_PAUSE: @@ -397,6 +362,7 @@ setValveState( D40_VALV, VALVE_STATE_CLOSED ); setValveState( D31_VALV, VALVE_STATE_CLOSED ); setValveState( D47_VALV, VALVE_STATE_CLOSED ); + setValveState( D64_VALV, VALVE_STATE_CLOSED ); setValveState( D54_VALV, VALVE_STATE_CLOSED ); setValveState( D14_VALV, VALVE_STATE_CLOSED ); setValveState( D52_VALV, VALVE_STATE_CLOSED ); @@ -408,12 +374,7 @@ setValveState( D34_VALV, VALVE_STATE_OPEN ); setValveState( D53_VALV, VALVE_STATE_OPEN ); - - if ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DRY_BICARB ) == FALSE ) - { - setValveState( D80_VALV, VALVE_STATE_OPEN ); - setValveState( D64_VALV, VALVE_STATE_CLOSED ); - } + setValveState( D80_VALV, VALVE_STATE_OPEN ); break; case DD_GEND_ISOLATED_UF_STATE: @@ -544,6 +505,31 @@ /*********************************************************************//** * @brief + * The getD48PumpSpeedForBCFill function returns the calculated D48 pump speed + * @details \b Inputs: none + * @details \b Outputs: none + * @return D48 pump speed. + *************************************************************************/ +U32 getD48PumpSpeedForBCFill( void ) +{ + return d48PumpSpeed; +} + +/*********************************************************************//** + * @brief + * The setD48PumpSpeedForBCFill function sets the updated D48 pump speed. + * @details \b Inputs: d48PumpSpeed + * @details \b Outputs: none + * @param pumpSpeed Dialysate pump speed + * @return none. + *************************************************************************/ +void setD48PumpSpeedForBCFill( U32 pumpSpeed ) +{ + d48PumpSpeed = pumpSpeed; +} + +/*********************************************************************//** + * @brief * The monitorChamberLevelStatus function checks the spent chamber and bicarb * chamber level status and updates the corrosponding flags. * @details \b Inputs: Spent and bicarb chamber levels. @@ -582,7 +568,7 @@ if ( dialFlowrate >= LOW_DIAL_FLOW_RATE ) { - // linear releationship seen against high dialysate flowrate Vs DeltaTemp + // linear relationship seen against high dialysate flowrate Vs DeltaTemp // deltaTemp = (-0.0029 * Qd) + 3.47 deltaTemp = ( LINEAR_SLOPE_FACTOR * dialFlowrate ) + LINEAR_INTERCEPT_FACTOR; } @@ -599,6 +585,20 @@ /*********************************************************************//** * @brief + * The calculateD48PumpSpeedForBCFill function calculates the pump speed based on the + * dialysate flow rate for continuous delivery of dialysate. + * @details \b Inputs: Qd. + * @details \b Outputs: D48 pump speed + * @return calculated D48 pump speed. + *************************************************************************/ +U32 getCalculatedD48PumpSpeedForBCFill( void ) +{ + F32 dialFlowrate = getTDDialysateFlowrate(); + return dialFlowrate; +} + +/*********************************************************************//** + * @brief * The handleGenDDialysateIsolatedUFState function performs the * Isolated ultrafiltration operations. * @details \b Inputs: none. @@ -645,16 +645,15 @@ execBalancingChamberControl(); } - if ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_SPENT_CHAMBER_H_FILL ) == TRUE ) +#ifdef __SPENT_CHAMBER_FILL__ + if ( ( TRUE == pendingSpentChamberFill ) && ( FALSE == balancingChambFillInProgress ) ) { - if ( ( TRUE == pendingSpentChamberFill ) && ( FALSE == balancingChambFillInProgress ) ) - { - setModeGenDStateTransition( DD_GEND_SPENT_CHAMBER_FILL_STATE ); - pendingSpentChamberFill = FALSE; - isDialDeliveryInProgress.data = FALSE; - state = DD_GEND_SPENT_CHAMBER_FILL_STATE; - } + setModeGenDStateTransition( DD_GEND_SPENT_CHAMBER_FILL_STATE ); + pendingSpentChamberFill = FALSE; + isDialDeliveryInProgress.data = FALSE; + state = DD_GEND_SPENT_CHAMBER_FILL_STATE; } +#endif #ifdef __BICARB_CHAMBER_FILL__ if ( ( TRUE == pendingBicarbChamberFill ) && ( FALSE == balancingChambFillInProgress ) ) { @@ -699,16 +698,15 @@ isDialDeliveryInProgress.data = FALSE; state = DD_GEND_DIALYSATE_BYPASS_STATE; } - else if ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_SPENT_CHAMBER_H_FILL ) == TRUE ) +#ifdef __SPENT_CHAMBER_FILL__ + else if ( ( TRUE == pendingSpentChamberFill ) && ( FALSE == balancingChambFillInProgress ) ) { - if ( ( TRUE == pendingSpentChamberFill ) && ( FALSE == balancingChambFillInProgress ) ) - { - setModeGenDStateTransition( DD_GEND_SPENT_CHAMBER_FILL_STATE ); - pendingSpentChamberFill = FALSE; - isDialDeliveryInProgress.data = FALSE; - state = DD_GEND_SPENT_CHAMBER_FILL_STATE; - } + setModeGenDStateTransition( DD_GEND_SPENT_CHAMBER_FILL_STATE ); + pendingSpentChamberFill = FALSE; + isDialDeliveryInProgress.data = FALSE; + state = DD_GEND_SPENT_CHAMBER_FILL_STATE; } +#endif #ifdef __BICARB_CHAMBER_FILL__ else if ( ( TRUE == pendingBicarbChamberFill ) && ( FALSE == balancingChambFillInProgress ) ) { @@ -886,6 +884,8 @@ *************************************************************************/ void updateTreatmentSettings( void ) { + F32 initialPumpSpeed = 0.0F; + // Update any dynamic treatment parameter changes if ( TRUE == isTreatmentParamUpdated ) { @@ -904,6 +904,12 @@ //TODO: update others parameters setting as needed. signalUFRateUpdate(); + //Update D48 pump speed + //calculateD48PumpSpeedForBCFill(); + initialPumpSpeed = getCalculatedD48PumpSpeedForBCFill(); + setD48PumpSpeedForBCFill( initialPumpSpeed ); + + //reset the flag isTreatmentParamUpdated = FALSE; } @@ -1009,7 +1015,7 @@ *************************************************************************/ static void checkDialysateTemperature( void ) { - F32 dialysateTemp = getFilteredConductivitySensorTemperature( D29_COND ); // Assuming the closest temp sensor to dialyzer + F32 dialysateTemp = getConductivityTemperatureValue( D29_COND ); // Assuming the closest temp sensor to dialyzer F32 targetTemp = getTDTargetDialysateTemperature(); BOOL isDialTempAboveHighSafety = ( dialysateTemp >= DIALYSATE_TEMP_UPPER_MAX_SAFETY_LIMIT_C ? TRUE : FALSE ); BOOL isDialTempAboveLowSafety = ( dialysateTemp > DIALYSATE_TEMP_UPPER_SAFETY_LIMIT_C ? TRUE : FALSE ); Index: firmware/App/Modes/ModeGenDialysate.h =================================================================== diff -u -rd210786d6c7d75bb0b4d9e18efc40a01d85123fe -r5bc2cbda7e16937366aeae9f2b55995314120781 --- firmware/App/Modes/ModeGenDialysate.h (.../ModeGenDialysate.h) (revision d210786d6c7d75bb0b4d9e18efc40a01d85123fe) +++ firmware/App/Modes/ModeGenDialysate.h (.../ModeGenDialysate.h) (revision 5bc2cbda7e16937366aeae9f2b55995314120781) @@ -7,8 +7,8 @@ * * @file ModeGenDialysate.h * -* @author (last) Sameer Kalliadan Poyil -* @date (last) 03-Feb-2026 +* @author (last) Varshini Nagabooshanam +* @date (last) 12-Jan-2026 * * @author (original) Vinayakam Mani * @date (original) 06-Nov-2024 @@ -33,8 +33,8 @@ #define FRESH_DIAL_PUMP_INITIAL_RPM 2500 ///< Nominal RPM target for fresh dialysate pump to maintain required pressure. #define SPENT_DIAL_PUMP_INITIAL_RPM 2300 ///< Nominal RPM target for spent dialysate pump to maintain required pressure. -#define DIAL_PUMP_DRAIN_RPM 1000 ///< Nominal RPM target for dialysate pump to drain the dry bicart. #define SPENT_DIAL_PUMP_FILL_RPM 200 ///< Nominal RPM target for spent chamber fill operations. +#define DIAL_PUMP_DRAIN_RPM 1000 /// Generate dialysate mode data structure typedef struct @@ -58,6 +58,10 @@ void setTreatmentParamUpdate( void ); // To indicate one or more treatment parameters updated void updateTreatmentSettings( void ); // Process the recent treatment parameters changes BOOL requestDDGenDialyasteStop( void ); // Stop generate dialysate +U32 getD48PumpSpeedForBCFill( void ); // Get D48 pump speed +void setD48PumpSpeedForBCFill( U32 pumpSpeed ); // Set D48 pump speed +U32 calculateD48PumpSpeedForBCFill( void ); // Calculate and store initial D48 pump speed +U32 getCalculatedD48PumpSpeedForBCFill( void ); // Get nominal D48 speed from formula only BOOL testDDGenDialysateDataPublishIntervalOverride( MESSAGE_T *message ); // GenD Mode data publish interval override BOOL testDialDeliveryInProgressOverride( MESSAGE_T *message ); // To override the dialysate delivery in progress flag