i want to use stateflow diagram to simulate optimization control to prevent the rate of reaction, but there is still error in diagram, could anyone help me?. The diagram can be changed and any rule can be used just for example and testing. Thank you

 採用された回答

Sebastian Castro
Sebastian Castro 2015 年 11 月 4 日

0 投票

The error message tells you what's wrong: There are 2 outputs that the chart has to produce, but the chart in its current state never assigns any value to them. So, when the Reactor block tries to look at its "heater" and "stirrer" signals they come up empty.
You need to add assignment operators to either the states
entry:
RPM = 1000;
Temp = 20;
or to your state transitions
{RPM = 1000; Temp = 20;}
As long as you do at least once at the beginning, Simulink will have stored values for RPM and Temp and this will remove the error. Typically you want to initialize your outputs to default values (usually zero) and then update them at certain points in your chart logic.
- Sebastian

1 件のコメント

iwan soenandi
iwan soenandi 2015 年 11 月 4 日
Yes you are right, Thank you

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStateflow についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by