Is it possible to access/use sldd data within a stateflow without using a mask?

 採用された回答

Fangjun Jiang
Fangjun Jiang 2023 年 1 月 19 日

0 投票

Once the SLDD is specified for the model, its data can be used by the whole model. What is the issue?
In Stateflow, add a parameter, specify it as "inherit from Simulink".

5 件のコメント

youjarr
youjarr 2023 年 1 月 19 日
Thank you very much for your answer.
I think I was missing the "inherit from Simulink".
Im gonna test it these days.
youjarr
youjarr 2023 年 1 月 19 日
編集済み: youjarr 2023 年 1 月 19 日
Ok it is "type: Inherit from Simulink".
But I don´t have the auto complition (when hitting TAB) when it is recognizing smth from the sldd, like I have it for e.g. const blocks within simulink itself.
Fangjun Jiang
Fangjun Jiang 2023 年 1 月 19 日
To be accurate, it is to add a Parameter (not local data, not input, not output, etc.). Make the name match the variable name in SLDD.
The data type is usually set as "Inherit: same as Simulink".
Fangjun Jiang
Fangjun Jiang 2023 年 1 月 19 日
Yes. The auto completion of the variable name is not available in Stateflow. I am verifying it in R2022b.
youjarr
youjarr 2023 年 1 月 19 日
First of all it is working like you said. Thank you very much.
But no, in R2022b the auto completion is not available.
A auto completion would be nice, because this would give some kind of a feedback that the variable was found within the simulink without wating for the "update model".

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Simulink Functions についてさらに検索

製品

リリース

R2021b

質問済み:

2023 年 1 月 18 日

編集済み:

2023 年 1 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by