Operation of milking machines