This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Executing more than one Finate State machines

Hai All,

Now I am working in finite state machines and Now I am in need of executing more than one finite state machines parallel.....and one FSM should be able to see the state of other FSM....that is one FSM state will be input of other FSM.......is it possible in 8051 programming....
FSM1 FSM2 .......FSMN

State1 State1 ..........
State2 State2 ..........
State3 State3 ..........
. .
. .
StateN StateN ..........

As shown above there shall be N number of FSMs...in the system and each and every FSM shall share common input table and output table...each FSM transition condition shall be based on inputs and state of other FSM....

For example for FSM1 to transfer from State 1 to State 2...It needs input IP1=1 and IP2=0....and FSM2 should be in State 3..FSM3 should be in State2...

FSM1
Current State:State 1
Transition1: State1-->State2
Condition: IP1=1 && IP2=0 && FSM2=State3 && FSM3=State2
Next State: State2

Like this I am in need of running a parallel FSMs to be executed...Kindly help me......
with regards,
Karthik Ragunath.

Parents
  • .....and one FSM should be able to see the state of other FSM....

    That sounds like an ugly hack at best, and a recipe for splitting headaches and excessively nasty bugs at worst.

    If a system with multiple state machines is designed well, then the need for communication between the state machines is minimized (this means, in turn, that two separate state machines that constantly need to know about each others state should be combined into one). The communication between them can then be done using less hack-ish ways than peeking at each others internal variables.

Reply
  • .....and one FSM should be able to see the state of other FSM....

    That sounds like an ugly hack at best, and a recipe for splitting headaches and excessively nasty bugs at worst.

    If a system with multiple state machines is designed well, then the need for communication between the state machines is minimized (this means, in turn, that two separate state machines that constantly need to know about each others state should be combined into one). The communication between them can then be done using less hack-ish ways than peeking at each others internal variables.

Children
No data