A device for controlling the opening and closing of a clamp intended to seal a flexible tube, for example in a positive displacement pump, includes: a housing that can be closed with a door a tube placed inside the housing a clamp also placed in the housing, which cooperates with the tube to open or seal it. The clamp is closed when the door is being opened and when the door is being closed. As well as ensuring that the tube is always closed when the door is being opened, the inventive safety device also ensures that the tube remains closed once the door has been closed as long as a suitable device does not trigger the opening of the clamp. The fully mechanical closure device is not exposed to the dangers of a faulty power supply.