Robotic assembly systems are widely used in industry to improve the production task. However when they halt their operation due to a failure, it usually takes considerable time to diagnose the system. In this paper, we discuss the results of an approach which uses Virtual Factories to reduce the time spent on diagnosis. The approach proposes building a virtual model of the system and simulating the process many times to identify the possible failure scenarios, their symptoms and likelihood of occurrence before they happen. Then, a diagnosis system can be built based on these results and integrated to the assembly system; and when actual failure happens, the system can come up with the most possible failure scenario using Bayesian Reasoning. A case study and its results are discussed. It is expected that this approach will reduce the downtime because of diagnosis and improve the productivity of large-scale production systems.