A device and a method for a peritoneal dialysis treatment having several cycles include a cycler controlled by a processor. The cycler fills the abdominal cavity with dialysis fluid, and drains the abdominal cavity. A sensor senses a variable related to the draining of the dialysis fluid. The draining is interrupted when the variable reaches a breakpoint at which the variable is radically changed, thereby leaving the residual volume of fluid.