Data store memory storage class

1 回表示 (過去 30 日間)
Simone Specchia
Simone Specchia 2020 年 10 月 24 日
回答済み: Fangjun Jiang 2020 年 10 月 26 日
I have a model containing a data store that I have to convert to C code. I would like to set the "Storage class" attribute of the data store to ExportedGlobal in order to have it defined as a global variable in the corresponding C code, however I cannot find this parameter in the mask of the Data store Memory block. Where can I find this property? Is there a different way to force some variable in the generated code to be global?

採用された回答

Fangjun Jiang
Fangjun Jiang 2020 年 10 月 26 日
Create a Simulink.Signal object in the workspace and you can use DataStore Read/Write block anywhere in the model. You can speify the storage class in the signal object. This is the same as create a DataStoreMemory block in the root level of your model.
If the DataStoreMemory block is in a subsystem, check the option "data store name must resolve to simulink signal object" in its dialog to link to the signal object.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by