A kind of automatic welding machine and its microcomputer control system were designed in this paper. The mechanical system includes a floating welding workbench, the two-dimension mechanism and the indexing mechanism. There are two choices for the control system, based on PLC or IPC separately. The automatic welding machine can be applied to train hook buildup welding. Experiments showed that reasonable buildup welding was achieved, and the automatic buildup welding equipment can improve productivity and work conditions.