In this paper, we focus on the online diagnosis of Automated Production Systems (APS) equipped with sensors and actuators emitting binary signals. These systems can be considered as Discrete Event Systems (DES). The paper presents a Case-Based Reasoning for the Online Diagnosis of All types of Faults in APS (CBR-ODAF). It is an improvement of our approach presented previously in order to remedy its limitations. Firstly, it proposes a new case representation format that describes all the faults to diagnose, adapts to the dynamic aspect of APS, is quite expressive and is easy to understand by human operators. Secondly, it allows to classify in real time each new observation as a ’normal case’, ’faulty case’ or ’unidentified case’ based on a new dissimilarity index which is not intrinsic to the numerical type. It is an index that adapts to our proposed case representation format and describes the degree of difference between cases represented by data of different types (i.e. quantitative and qualitative).