Aiming at the defect detection operation of the welding seam of the large‐scale LPG spherical tank in service. In order to improve the automatic detection level of defect detection and further enhance the autonomy in the welding seam detection process, an automatic scanner for welding seam defect detection based on machine vision has been developed. First, the hardware of the system was built, including the mechanical frame, X and Z axis timing belt sliding table, industrial CMOS camera, light source and phased array detection device. Secondly, the Vision Master image processing software is used to obtain digital images and process them to obtain the distance between the center line of the weld and the front edge of the probe. Finally, the automatic control system of the scanner is designed using PID control method, which realizes the self‐adaptive tracking of the probe.