To improve the development efficiency of automatical diagnosis equipment (ADE) and ensure the generality of ADE software, this paper proposes a novel method to exchange deep knowledge of systems under diagnosis (SUD) using ontologies. A general framework of knowledge base combining test information model and diagnosis information model is proposed. The diagnosis information model is decomposed into structure model and function model. The structure model describes the connectivity of adjacent components as well as the structural hierarchy, and the function model describes behaviour of modules by mapping input signals into output signals. Moreover, the method to locate the fault based on the proposed knowledge base is introduced. Finally, a case study for guiding system of passive-radar guidance missile is carried out to illustrate our proposed method. The practice shows that our method can achieve the object well.