The manufacturing of the X-shaped tip of prestressed centrifugal concrete piles is nowadays done half automatically by combining the manual worker and the automatic welding robot. To make this welding process full automatically, the welding seam tracking algorithm is considered. There are many types of sensors that can be used to detect the welding seam such as vision sensor, laser vision sensor, arc sensor, or touch sensor. Each type of sensor has its advantages and disadvantages. In this paper, an algorithm for welding seam tracking using laser distance sensor is proposed. Firstly, the fundamental mathematics theory of the algorithm is presented. Next, the positioning table system supports the procedure is designed and manufactured. The object of this research is the fillet joint because of the characteristics of the X-shaped tip of the concrete piles. This paper proposes a new method to determine the welding trajectory of the tip using laser distance sensor. After that, the experimental results are received to verify the proposed idea. Finally, the improved proposal of the algorithm is considered to increase the accuracy of the suggested algorithm.