Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r594f5e422534a959fd048718ec34c6f9ea8b1249 -r4a320cf9a637ceef24d4fc0da4737ed47519da34 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 594f5e422534a959fd048718ec34c6f9ea8b1249) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision 4a320cf9a637ceef24d4fc0da4737ed47519da34) @@ -892,8 +892,9 @@ // Check if the valve's transition time has timed out else if ( ( TRUE == didTimeout( valvesStatus[ valve ].transitionStartTime, VALVE_TRANSITION_TIMEOUT_MS ) ) && ( FALSE == isACPowerLost() ) ) { - // Go back to Idle state - state = VALVE_STATE_IDLE; + // Go back to Idle state and set the valve position to not in position because it was not able to get to the target position + valvesStatus[ valve ].currentPosition = VALVE_POSITION_NOT_IN_POSITION; + state = VALVE_STATE_IDLE; SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_VALVE_TRANSITION_TIMEOUT, (U32)valve ); // If the valve transition timeout is active and the valve's commanded positions is position C, activate safety shutdown @@ -1293,7 +1294,10 @@ switch ( currentPositionEnum ) { case VALVE_POSITION_NOT_IN_POSITION: - // Do nothing. It will be faulted in the monitor function if it is out of position + // If the valve is in an unknown position, it means the transition timed out and the software faulted. In the fault mode, + // the valves are commanded to transition to position C so from wherever the valve is stuck it is subtracted to go to position C. + // Position C is de-energized position and it is the negative of 0 position. + valvesStatus[ valve ].targetPositionInCounts = currentPosition - nextStep; break; case VALVE_POSITION_A_INSERT_EJECT: