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.