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
  • Thanks for your valuable suggestion........

    but I am need to design FSM for Points and Routes....In a Railway station there may be many points and many routes...To set a route, several points need to be in particular position....that is Route FSM sees the state of Point FSM...and to set a route conflicting routes states also to be verified...that is route FSM verifies other route FSM......This is the Idea of the design...and whether its is improper design??? if yes kindly justify me......and any other solution other than FSM for these types of system....

    with regards,
    G. Karthik Ragunath

Reply
  • Thanks for your valuable suggestion........

    but I am need to design FSM for Points and Routes....In a Railway station there may be many points and many routes...To set a route, several points need to be in particular position....that is Route FSM sees the state of Point FSM...and to set a route conflicting routes states also to be verified...that is route FSM verifies other route FSM......This is the Idea of the design...and whether its is improper design??? if yes kindly justify me......and any other solution other than FSM for these types of system....

    with regards,
    G. Karthik Ragunath

Children
  • There many different techniques for routing. I suggest that you google routing algorithms.
    It appears to me that your task is very similiar to routing algorithms for telephone or PCB routing.
    Bradford

  • Hai,

    But routing algorithms is mainly to achieve shortest path in network...but my main intention is to achieve Fail safe Railway Interlocking.......
    Concept:
    Consider a route with two points....Points are one which connects one route to another route...point can be normal or reverse.... say if Point normal means the point can be connected to route1 and Point Reverse means can be connected to route2....

    I hope u can understand my concept.....
    to achieve this I am in need to need to see the status of point that is point FSM....to set the route that is route FSM.........

    To set Route 1 point status should be normal and to set the route 2 point status should be reverse.....So route FSM depends on the Point FSM....there may be n number of points and n number of routes......

    This is the concept......
    with regards,

    G. Karthik Ragunath

  • Surely, there must be well-established techniques to do this?!

  • If a switch only has two states, I woud nt treat it as a FSM. But in reality it has more.
    - It has a state where it is in neither way - either because it is currently changing or you don't have contact with it.
    - It may also have a state "broken", where you are in contact with the switch but the switch can't confirm either setting and have beeen like that longer than the time it takes to make a switch.
    - In reality, you may also have a switch controlled manually or electrically. This could potentially mean that it can have an "override" attribute to.

    Anyway - for a route, you would normally only care if a switch is correct or not. Incorrect because it is broken or incorrect because of a manual override or because you don't have contact with it or because you haven't changed the state yet.

    But whatever you do - if you model each point with a FSM, this would represent a hierarchical system and not a system where any FSM takes the input of other FSM.