As an overall strategy, it is too complicated for most common programming.
Nonsense. Mealy state machines are used all the time. I bet my FPGA programmer uses them without even thinking about it. In a PLC one would need to save away the current state bits into a copy or last state bits. Then it is easy to simplify with a Karnaugh map. If any of you remember Terry Woods you know he was a big believer in K-maps.As an overall strategy, it is too complicated for most common programming.
What? Where have you been? You haven't lived until you have done one.I don't think I have ever had to program a chain of state machines.
I agree...each Moore automaton can be converted into a Mealy automaton, and vice versa ! (this is not the problem)
It depends on which state machine your are most comfortable with. Both methods will work. 25 years ago I was in Turkey working in a steel mill. There was a young PLC programmer that was trying to write PLC code for a down coiler. Basically it goes up and down. The programmer thought it should have only two rungs, one to make it go up and another to make it go down. I noticed that he was having difficulty with this problem for over a week. After I go my stuff done I asked the down coiler program to show me his program and tell me what is supposed to happen. I wrote a program that required 11 states or rungs instead of two. The PLC programmer didn't like the fact that my program was much 'longer' or had more rungs but when he entered my rungs there were only a few modifications necessary before the down coiler worked perfectly. The point is that Moore state machines usually require more rungs but they are simpler to implement.I think (to myself) is more simpler to think in Mealy's way to code ... you can so easier capsulate ... states ! (etc.)
... me think , this question awaits a non trivial answer !What happens when a sensor (from a set of sensors) fails in a Mealy implementation and what happens if one fails in a Moore implementation?
... me think , this question awaits a non trivial answer !
The answer to your question depends on what you are using and how strict you choose to be in your definition of the state machine.
...