フィルターのクリア

Stateflow question: transitions evaluated before state is executed

4 ビュー (過去 30 日間)
Iban
Iban 2011 年 5 月 25 日
Hello,
I was wondering wether there is a type of transition in Stateflow which is evaluated before the state is executed.
I have two superstates wich own two substates each inside, so what I want is the transition between the superstates to be evaluated before the substate of the active superstate is executed. Is that possible?

採用された回答

Jarrod Rivituso
Jarrod Rivituso 2011 年 5 月 25 日
Hi Iban,
I believe that is actually the default behavior. Generally, outer transitions (ones on the super states) are tested first, and then inner transitions (ones on the substates) are tested.
Also, I believe if a transition will cause a state to be left at a particular time step, then no "during" action will occur for that state. Is that what you meant by the superstate being "executed"?
  3 件のコメント
Jarrod Rivituso
Jarrod Rivituso 2011 年 5 月 25 日
Hi Iban,
Are you aware that you can set your chart to execute once during the initialization phase of the simulation? This would mean that, at time 0 of your simulation, your chart would already be in the default state (so time 0 would not be used to actually go to the default state).
To do this, select File --> Chart Properties and then enable the "Execute (enter) Chart At Initialization" option.
Let me know if that works for you :)
-Jarrod
Iban
Iban 2011 年 5 月 25 日
Hi Jarrod,
That was great!! I´m quite new with Stateflow and I didn´t know that possibility.
Thanks a lot,
Iban

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeComplex Logic についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by