The invention provides a milking device (3) and a method of controlling same. The milking device (3) comprises at least one teat cup (66) that is connectable to a teat of a dairy animal (2). A measuring sensor (15) measures the amount of milk secreted. Data regarding the dairy animal (2) are collected in a control unit (9). The method comprises: - providing a milking frequency determined in a first manner at a first lactation phase and a milking frequency determined in a second, different manner at a later, second lactation phase, for example, the stimulation phase and the stable phase, respectively, wherein the first manner results in a higher milking frequency than the second manner in the same circumstances, - identifying a dairy animal (2) and determining the associated milking frequency, -milking the dairy animal (2) dependent on the milking frequency, - determining the milk production, and - switching from the first to the second lactation phase, dependent on the milk production.