Abstract: A tube-filling machine has a supply device for transporting a tube through different processing stations. The processing stations include a filling station in which a filling pipe is introduced from above into the substantially vertical tube. A filling medium is introduced through the filling pipe into the tube using a dosing device. To introduce the filling medium into the tube with high reliability and to prevent soiling of the tube-filling machine due to defective filling, a sensor device for detecting the relative position between the tube and the inserted filling pipe is disposed in the filling station and a control device is provided which receives a position signal from the sensor device in dependence on which the dosing means can be controlled by the control device.