The robot welding gun is installed on sixth axis of robot, and welding gun, welding controller and robot controller are connected through robot pipeline package. The robot carries out logic programming through spot welding software package, moves welding gun to corresponding welding position, and controls opening, closing, welding and other actions of welding gun. The welding gun is responsible for the output of welding pressure and welding current, and welding controller is responsible for setting, detection and feedback of welding parameters. Through mutual cooperation, fully automatic welding of automobile is realized.