A positioning system for at least one flexible tubular element (5, 6, 9) connected to a cup-shaped member (4, 8) 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 a sensing unit (12, 13a, 13b) arranged to sense a parameter allowing estimation of the position of a teat of an animal. The control unit (14) is also arranged to control the positioning mechanism to adjust the release length of the tubular element (5, 6, 9) to the estimated individually adapted release length.