Latching and control unit (1) for integration in a medical device for infusion of a medicament or removal of a substance of a human body by a drive means, the latching and control unit being adapted for controlling the movement of at least a first and a second movable component, the latching and control unit (1) comprising: a drive train (10) biased in a distant position with regard to the support device (20), wherein the drive train (10) comprises a case (13) and a latching means (17) for latching a first movable component and being movable within the case (13) between an extended and an retracted position and being biased in its latching position, wherein the case (13) is movable between an unstressed and a stressed position with regard to the support device (20) and biased into the unstressed position, wherein the elastic force for biasing the latching means (17) is greater than the elastic force for biasing the case (13), a detection device (15) for detecting a stressed position of the case (13), coupling means (13.6) for coupling of at least a partial movement of the second movable component with the movement of the case (13), a control device which is functionally connected to the detection device (15) which comprises a function for determining a stressed position of the drive train so that the control device determines the movement of the latching means (17) in its retracted position by interaction with the first component and the movement of the drive train (10) in its stressed position by interaction with the second component.Linvention concerne une unité de verrouillage et de commande (1) à intégrer dans un dispositif médical pour perfuser un médicament ou éliminer une substance du corps humain à laide dun moyen dentraînement, lunité de verrouillage et de commande étant conçue pour commander le déplacement dau moins un premier et un second composant mobiles. Ladite unité de verrouillage et de commande (1) comprend : un ensemble dentraînement (10) sollicité