The paper presents a hierarchical architecture for fault tolerant control of mechatronic systems. In the architecture, both the diagnosis and the reconfiguration are completely decentralized according to the structure of the control system. In each module of the control system, diagnosis and reconfiguration are included and use only locally available signals. Therefore, no extra dependencies are added to the control system software, something which is important to facilitate efficient engineering of large scale system. All this is achieved by using a purely service oriented view of the system including both hardware and software. The service view with no cyclic dependencies is further used to obtain Bayesian networks for modeling the system.