Logic-based probabilistic models (LBPMs) enable us to handle problems with uncertainty succinctly thanks to the expressive power of logic. However, most of LBPMs have restrictions to realize efficient probability computation and learning. We propose an EM algorithm working on BDDs with order encoding for LBPMs. A notable advantage of our algorithm over existing approaches is that it copes with multi-valued random variables without restrictions. The complexity of our algorithm is proportional to the size of a BDD representing observations. We utilize our algorithm to make a diagnoses of a logic circuit which contains stochastic error gates and show that restrictions of existing approaches can be eliminated by our algorithm.