About the use of Data Store Memory
7 次查看(过去 30 天)
显示 更早的评论
I need to exchange data using a large number of "Data Store Memory".(More than 100)
So I created a lot of "Data Store Memory" at the top of the model, but it would look ugly and messy.
If I put all the "Data Store Memory" into the subsystem, it will not be accessible everywhere in the model.
Is there a way to put these "Data Store Memory" into a subsystem and still be able to access them from anywhere?
Or is there any other way to package these "Data Store Memory"?
Thanks!
0 个评论
回答(1 个)
Fangjun Jiang
2023-2-3
"You can use Simulink.Signal objects in addition to, or instead of, Data Store Memory blocks to define data stores. A data store defined in the base workspace with a signal object is a global data store. Global data stores are accessible to every model, including all referenced models. See Data Stores for more information."
So, instead of adding a DataStoreMemory block and label it "A", you can just do this in Command Window, and then use DataStoreRead and DataStoreWrite block anywhere in the model.
A=Simulink.Signal;
4 个评论
Fangjun Jiang
2023-2-8
That is true. There is no direct way. A few ways to help find those info:
- Model Data Editor, Data Stores tab, sort by name
- Ctrl+F in the model
- find_system() in script
- If tansfer the objects to a SLDD and link the SLDD to the model, then in the SLDD, you can select the object and right click, select "find where used"
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!