|On this page…|
Stateflow® output data should not inherit properties from output signals, because the values back propagate from Simulink® blocks and can be unpredictable.
Use machine-parented data when you want to use global data definitions for Mealy and Moore charts, which do not support data store memory (see Overview of Mealy and Moore Machines for details). Otherwise, avoid using machine-parented data. The presence of machine-parented data in a model prevents reuse of generated code and other code optimizations. This type of data is also incompatible with many Simulink and Stateflow features.
For example, the following features do not support machine-parented data:
Enumerated data (see What Is Enumerated Data?)
Simulink functions (see What Is a Simulink Function?)
Chart SimState (see What Is a SimState?)
Implicit change events (see Keywords for Implicit Events)
Detection of unused data (see Diagnostic for Detecting Unused Data)
Model referencing (see Limitations on All Model Referencing in the Simulink documentation)
Analysis by Simulink Design Verifier™ software
Code generation by Simulink PLC Coder™ software
To make Stateflow data accessible to other charts and blocks in a model, use data store memory. For details, see Share Global Data with Multiple Charts.