The present invention relates to a milking system and a method for preventing detachment of a teat cup from a teat during a milking process, wherein the milking system comprises a milk line connected to the teat cup, a vacuum system able to apply at least two different vacuum levels to the teat cup and measuring device configured to measure the air flow in the milk line during the milking process. 
During a milking process, vacuum is applied from a vacuum source to the teat cups in order to transport milk from the teat cups, via the milk line, to a storing device for milk.  In order to transport the milk in the milk line, a small air flow needs to be created in the milk line.  Usually, the teat cups or connected milk tubes comprise one or several small inlet openings or vents for ambient air ensuring such an air flow.  A further object of the vacuum is to provide a suction force attaching the teat cups to the teats during a milking process.  Such a connection between the teat cups and the teats is substantially air tight. 
Undesired detachment of teat cups from the teats of an animal during a milking process is a problem.  The teat cups may be detached for many reasons such as low vacuum in the teat cup, blocked air vents, restrictions in the short milk tubes, poor cluster alignment, worn milk tubes, uneven weight distribution in the cluster or be kicked off by the animals. 
Thus, one reason for undesired teat cup detachment during a milking process is a low vacuum level in the teat cup.  The vacuum level in the teat cups drops when the milk flow is high.  Consequently, there is an increased risk for undesired detachment of teat cups during periods of the milking process when the milk flow is high.  Some individuals in a herd of milking animals are more productive than the other.  For these individuals, it is an increased risk that the teat cups fall off due to high milk flow during a part of the milking process.  In order to reduce this risk, it is known to use milking systems able to apply two different vacuum levels to the teat cups, one high vacuum level and a reduced vacuum level.  The high vacuum level is only used when the milk flow is very high during a milking process.  It is possible to use the reduced vacuum level during the whole milking process for most cows in a herd.