How to activate Stateflow substate without flow graph
1 回表示 (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
Siddharth Shankar
2012 年 7 月 6 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Syntax for States and Transitions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!