stateflow control stuck in the default block

5 ビュー (過去 30 日間)
GIRISH GOKUL CHENNUPALLI
GIRISH GOKUL CHENNUPALLI 2019 年 2 月 5 日
編集済み: Mauro Fusco 2019 年 6 月 13 日
The file is attached and the control inside the chart addition is stuck in the Init block and doesn't go out of it. Please run the model with the parameters a = 10; b = 20, c = 2
screeshot.PNG

回答 (1 件)

Mauro Fusco
Mauro Fusco 2019 年 6 月 13 日
編集済み: Mauro Fusco 2019 年 6 月 13 日
Looking at your flow chart, once that the superstate "addition" is reached (when this happens you can see blue border, as in your picture), then the Init state is accessed, as it has a default transition pointing to it. There are no transitions that go out of the init state, therefore it is normal that you observe no change of state.
In other words, your model contains a "deadlock". You need to add transitions that have origin in your init state and point towards other states if you want to get out of init. On the transitions you can add conditions using square brackets, to control when the init state is exited.
I hope this helps, maybe a good idea is to follow first these tutorials:

カテゴリ

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

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by