The invention relates to a milking machine comprising at least one teat cup, a milk conduit and a milk collecting container. The milking machine is arranged to repeatedly go through a teat searching phase and a milking phase. The milk conduit is with one end connected to an outlet of the teat cup and with an other end connected to the milk collecting container. The milking machine comprises a milking pump arranged to apply a predetermined and controlled vacuum to the milk conduit to transport milk from the teat cup via the outlet to the milk collecting container during the milking phase. The milking machine comprises a suction pump arranged to generate a suction flow through the teat cup towards and through the outlet during a teat searching phase.