Index: firmware/App/Drivers/PinchValve.c =================================================================== diff -u -r2c16de14d2acd2aa1e36943f95c3855da094dc97 -r3479c42f6bf13fb6c565cc48ba13936e1ec22be9 --- firmware/App/Drivers/PinchValve.c (.../PinchValve.c) (revision 2c16de14d2acd2aa1e36943f95c3855da094dc97) +++ firmware/App/Drivers/PinchValve.c (.../PinchValve.c) (revision 3479c42f6bf13fb6c565cc48ba13936e1ec22be9) @@ -131,6 +131,7 @@ PINCH_VALVE_HOME_CMD_RESET_EVENTS_COMPLETE, ///< Pinch valve home command reset events complete PINCH_VALVE_HOME_CMD_SET_PROFILE_MODE_SECOND, ///< Pinch valve home command set profile mode second PINCH_VALVE_HOME_CMD_SET_VELOCITY_THIRD, ///< Pinch valve home command set velocity third + PINCH_VALVE_HOME_CMD_SET_POSITION_A, PINCH_VALVE_HOME_CMD_UPDATE_THIRD, ///< Pinch valve home command update third PINCH_VALVE_HOME_CMD_GET_EVENT_STATUS_THIRD, ///< Pinch valve home command get event status third NUM_OF_PINCH_VALVE_HOMING_COMMANDS ///< Number of pinch valve in the homing commands @@ -170,6 +171,7 @@ { PINCH_VALVE_PMD_CMD_GET_ACTUAL_POSITION, 0, 0, 0, 0, 2, FALSE }, // Reads and stores for position C { PINCH_VALVE_PMD_CMD_RESET_EVENT_STATUS, PINCH_VALVE_RESET_EVENT_STATUS_VALUE, 0, 0, 1, 0, TRUE }, // Clears event bits after endpoint detection is complete. { PINCH_VALVE_PMD_CMD_SET_PROFILE_MODE, PINCH_VALVE_PROFILE_MODE_S_CURVE, 0, 0, 1, 0, TRUE }, // Selects the profile mode used to move to position A + { PINCH_VALVE_PMD_CMD_SET_POSITION, 0, 0, 0, 2, 0, TRUE }, // Set calculated Position A { PINCH_VALVE_PMD_CMD_SET_VELOCITY, 0, 0, 0, 2, 0, TRUE }, // Sets the velocity used to move to position A { PINCH_VALVE_PMD_CMD_UPDATE, 0, 0, 0, 0, 0, TRUE }, // Starts movement to the calculated position A. { PINCH_VALVE_PMD_CMD_GET_EVENT_STATUS, 0, 0, 0, 0, 1, FALSE } // Polls event status until the third movement completes @@ -193,6 +195,7 @@ { PINCH_VALVE_PMD_CMD_GET_ACTUAL_POSITION, 0, 0, 0, 0, 2, FALSE }, // Reads and stores for position C { PINCH_VALVE_PMD_CMD_RESET_EVENT_STATUS, PINCH_VALVE_RESET_EVENT_STATUS_VALUE, 0, 0, 1, 0, TRUE }, // Clears event bits after endpoint detection is complete { PINCH_VALVE_PMD_CMD_SET_PROFILE_MODE, PINCH_VALVE_PROFILE_MODE_S_CURVE, 0, 0, 1, 0, TRUE }, // Selects the profile mode used to move to position A + { PINCH_VALVE_PMD_CMD_SET_POSITION, 0, 0, 0, 2, 0, TRUE }, // Set calculated Position A { PINCH_VALVE_PMD_CMD_SET_VELOCITY, 0, 0, 0, 2, 0, TRUE }, // Sets the velocity used to move to position A { PINCH_VALVE_PMD_CMD_UPDATE, 0, 0, 0, 0, 0, TRUE }, // Starts movement to the calculated position A. { PINCH_VALVE_PMD_CMD_GET_EVENT_STATUS, 0, 0, 0, 0, 1, FALSE } // Polls event status until the third movement completes @@ -1200,6 +1203,15 @@ positionB = valvePositions[ valve ][ VALVE_POSITION_B_OPEN ]; positionC = valvePositions[ valve ][ VALVE_POSITION_C_CLOSE ]; valvePositions[ valve ][ VALVE_POSITION_A_INSERT_EJECT ] = positionB + ( ( positionC - positionB ) / 2 ); + if ( H1_VALV == valve ) + { + setSigned32CommandWords( &h1HomingCommands[ PINCH_VALVE_HOME_CMD_SET_POSITION_A ], valvePositions[ valve ][ VALVE_POSITION_A_INSERT_EJECT ] ); + } + else if ( H19_VALV == valve ) + { + setSigned32CommandWords( &h19HomingCommands[ PINCH_VALVE_HOME_CMD_SET_POSITION_A ], + valvePositions[ valve ][ VALVE_POSITION_A_INSERT_EJECT ] ); + } break; default: