When the cow elects to enter the milking unit (due to highly palatable feed that she finds in the milking box), a cow ID sensor reads an identification tag (transponder) on the cow and passes the cow ID to the control system. If the cow has been milked too recently, the automatic gate system sends the cow out of the unit. If the cow may be milked, automatic teat cleaning, milking cup application, milking, and teatspraying takes place. As an incentive to attend the milking unit, concentrated feedstuffs needs to be fed to the cow in the milking unit.