A milking system may include a milking stall (1, 51), which an animal may visit to be milked automatically. The milking stall including an animal identifier (9, 53); a gate controller (7, 55) for opening an entry and exit gates (3, 5); a milking machine (11, 57), wherein the teat cups, during milking of a milking animal in the milking stall, are applied to the teats of the milking animal and are connected to vacuum (19, 63) such that milk can be drawn from the milking animal and be collected in the vessel; and a robot (13, 65) provided with a robot arm (21) and a gripper (23) for automatic application of the teat cups to the teats of the animal. The milking system may also include a master computer (75) adapted to hold a database (77) of milking animals capable of visiting the milking stall, to receive an identification of a milking animal from the animal identifier, and adapted to control the gate controller, the milking machine, and the robot depending on the received identification. The robot may include a slave processor (81), connected to receive information from the master computer, according to which movement of the robot arm of the robot is to be performed, and adapted to control the robot to move the robot arm of the robot according to the received information.