Two-axis CNC automatic welding machine