The invention provides a milking device (3) and a methodof 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 amilking frequency determined in a first manner at a first lactation phaseand a milking frequency determined in a second, different manner at a later,second lactation phase, for example, the stimulation phase and the stablephase, respectively, wherein the first manner results in a higher milkingfrequency than the second manner in the same circumstances, - identifyinga dairy animal (2) and determining the associated milking frequency, -milking the dairy animal (2) dependent on the milking frequency, - determiningthe milk production, and - switching from the first to the secondlactation phase, dependent on the milk production.