What is "machine-parented data" in Simulink and how does its usage differ across releases?

7 次查看(过去 30 天)
I have recently come across "machine-parented data", and how support of it has recently changed. When I build in R2019b, I am getting warnings regarding machine-parented data. I have also read that "Starting in R2023a, Stateflow charts no longer support machine-parented data".
What is machine-parented data, and how can I find machine-parented data in the Model Explorer or otherwise? 

采纳的回答

MathWorks Support Team
MathWorks Support Team 2025-11-24,0:00
编辑:MathWorks Support Team 2025-11-24,19:13
Machine-Parented Data
In the context of Stateflow, the "machine" is the object which contains all other Stateflow objects in a Simulink model. For a Simulink model where you may have multiple Stateflow charts, the "machine" is the object that encompasses all of these charts. 
 
"Machine-parented" data, therefore, is data that can be read by and modified by any Stateflow chart that is in that Simulink model. 
Finding and replacing Machine-Parented Data
To make Stateflow data accessible to other charts and blocks in a model, it is recommended to use chart-parented data of scope "Data Store Memory".
If you do upgrade to a more recent version (e.g. R2024a) of MATLAB, there is an automated Model Advisor check which checks for machine-parented data. Further details can be found in the
documentation under "Check for machine-parented data".
Alternatively, in R2019b, there should be a diagnostic,
, which you can set to throw a warning or an error if there is machine-parented data in your model that can be replaced with data of scope Data Store Memory.
Finding Machine-Parented data in the Model Explorer
Machine-parented data is any data that appears at the Simulink model level. Data is indicated in the Model Explorer with the icon with 1s and 0s with rounded edges:
 
For example, the screenshot below shows what objects are at the Simulink model, "untitled", level. The data "SomeData" is defined at this level in the hierarchy (as opposed to being within one of the Stateflow objects, e.g. being under "Chart"). This data, "SomeData", would throw the warning/error when the model is compiled. 

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Decision Logic 的更多信息

产品


版本

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by