600344 Disclosed is a positioning system for at least one flexible tubular element (5, 6, 9) connected to a cup-shaped member (4, 8). The positioning system includes a positioning mechanism adapted to hold the cup-shaped member (4, 8) and the tubular element (5, 6, 9) in a parking position in a magazine (3, 7) when the cup-shaped member (4, 8) is not used. A pull out motion of the cup-shaped member (4, 8) and the tubular element (5, 6, 9) is undergone from the parking position to an attaching position on a teat of an animal (1). The positioning system includes a control unit (14) which is arranged to estimate an individually adapted release length of the tubular element (5, 6, 9) in response to information from sensing means (12, 13a, 13b). The sensing means (12, 13a, 13b) are arranged to sense a parameter allowing estimation of the position of a teat of an animal (1). The control unit (14) is also arranged to control the positioning mechanism such that it adjusts the release length of the tubular element (5, 6, 9) to the estimated individually adapted release length.