The data type of Data Store Memory 'LEDON' used by a Chart cannot be set to 'auto' and must be known prior to type propagation. Please explicitly enter the data type in the Data Store Memory dialog.

5 ビュー (過去 30 日間)
Design stateflow, If engine speed is less than threshold1, switch off the LED. Blink LED on and off (On for 0.5 sec and Off for 0.5 sec) if the engine speed is greater than threshold1 but less than threshold2. Blink LED on and off (On for 1 sec and Off for 0.5 sec) if the engine speed is greater than threshold2.
I treid adding Data Store Memory but it is throwing the following error.
The data type of Data Store Memory 'LEDON' used by a Chart cannot be set to 'auto' and must be known prior to type propagation. Please explicitly enter the data type in the Data Store Memory dialog.
Component:Simulink | Category:Block error
I have tried designing it to some extent and the snapshots of model are attached here.

採用された回答

Markus
Markus 2021 年 5 月 18 日
編集済み: Markus 2021 年 5 月 18 日
It seems like Simulink does not know the data type and wether it is a real variable or complex.
Try specifying it like that:
And the Data Type, I went with "single" as an example here, but you can use boolean or uint if you are only using on/off states for that variable.
  1 件のコメント
Shoaib Ahmed
Shoaib Ahmed 2021 年 5 月 20 日
Yes I need on/off states in this design, Then I will be using boolean for that.
I appreciate your time to through this design. Thanks for the answer, Now I can look forward to clear it.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by