In the recent years, Artificial Neural Networks (ANNs) have proved their great success for fault diagnosis in many applications. The performance of the ANN depends on its topology. So, optimizing the ANN's topology is an essential task to improve its efficiency. On another side, genetic algorithms (GAs) are becoming a main optimization methodology used in solving the engineering problems. However, the proposed system introduces a new algorithm that uses genetic algorithm to optimize the topology of the ANN. It has been used for diagnosis and repairing the Photovoltaic (PV) energy systems dynamically online as a case of study. Recently, PV systems have a great attention and concerning by the researchers to solve the power problems all over the world. Many diagnostic systems have been developed to diagnose the PV faults, but they are very expensive and sometimes are unmanaged especially for complex and critical PV systems. The proposed system enables the PV systems can overcome these limitations. Its obtained results are compared with fuzzybased and traditional neural network-based diagnostic PV systems. It is found that, the proposed system has proved its goodness for the practical applications.