A vehicle headlamp is a high-sophisticated device basically composed of three elements: housing, lighting system and lens. Nowadays, they are assembled with no dimensional control, obtaining a final product with high physical deviations. Since the car manufacturer is requiring more and more precision, the number of faulty headlamps is increasing, and thus the cost to the headlamp producer. To solve this problem, a new automatic assembly machine was built. It integrated different technologies such as sensor systems, linear actuators and computational capacities. This work presents the conception, design and development of a fuzzy control algorithm for an automatic machine capable of correcting the dimensional tolerances of vehicle headlamps during its assembly process. Particulary, this paper describes the problem of modeling and control an industrial system, with a high complex dynamics and unknown model, by a rule-based model constructed from measured data. To validate the proposed control system, different experimental tests were carried out in both the lab and the assembly line in the factory. The obtained results show how the prototype, together with the proposed fuzzy software, solve the problem of assembling vehicle headlamps obtaining a final product with minimum dimensional errors.