How to activate Stateflow substate without flow graph

1 visualizzazione (ultimi 30 giorni)
Hello,
I have 2 charts composed of several substates and when (for instance) going from chart1 to chart2, the active substate in chart2 should depend on the on conditions elaborated in the substates of chart1 . Drawing all the possible connections (with flow graph), would result in a "spaghetti" chart, so I was wondering if there is an other way to activate a substate.
Thank you

Risposte (1)

Siddharth Shankar
Siddharth Shankar il 6 Lug 2012
Can you please expand on the question a bit? It would help if you could sketch out a very simple example example with maybe just 2-3 states in chart1 and the corresponding transitions required in chart2.
Something which might work (without knowing exactly what the problem is) is "Inner transitions". One place where you do get a lot of transitions is a situation where whenever some condition is true, you want to transition to a given state irrespective of where you are. In this case, suppose you have N states each with a condition [ci] for transitioning to it, you will need N^2 transitions to spell out the behavior correctly.
To avoid this, you can use inner transitions. This reduces you to only need N inner transitions rather than N^2 outer transitions.
This is probably best explained using a sketch but unfortunately I do not know of a way to attach an image.
  1 Commento
K E
K E il 12 Lug 2012
Modificato: K E il 12 Lug 2012
Here is some information on inserting an image in a reply, and you can use the new image button on answer and comment blanks to insert it.

Accedi per commentare.

Categorie

Scopri di più su Complex Logic in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by