A robotic arm (18) maneuvers a teat (14) preparation cup (12) and executes instructions from a robotic arm (18) controller (20). The controller (20) comprises an interface (24), a memory (28), and a processor (26). The processor (26) instructs the sensor (16, 20) to perform a first scan. If the first scan discovers a first set of teats (14), the processor (26) moves the robotic arm (18) a first distance and instructs the sensor (16, 20) to perform a second scan. If the second scan discovers a second set of teats (14), the processor (26) moves the robotic arm (18) to a location under the first teat (14), and instructs the sensor (16, 20) to perform a third scan. The processor (26) determines if the third scan discovers a third set of teats (14). If each of the first set, second set, and third set of discovered teats (14) comprises the first teat (14), the processor (26) instructs the robotic arm (18) to attach the preparation cup (12) to the first teat (14).