Modeling Style
hisl_0061: Unique identifiers for clarity
| ID: Title | hisl_0061: Unique identifiers for clarity | ||
|---|---|---|---|
| Description | When developing a model: | ||
| A | Use unique identifiers for Simulink® signals. | ||
| B | Define unique identifiers across multiple scopes within a chart. | ||
| Notes | The code generator resolves conflicts between identifiers so that symbols in the generated code are unique. The process is called name mangling. | ||
| Rationale | A, B | Improve readability of a graphical model and mapping between identifiers in the model and generated code. | |
| Model Advisor Check | Check Stateflow charts for uniquely defined data objects (Simulink Check) | ||
| References |
| ||
| See Also | Model Configuration Set Customization (Embedded Coder) | ||
| Last Changed | R2024a | ||
| Examples | Not Recommended In the following example, two
states
The identifier
| ||
Recommended To clarify the model, create
unique identifiers. In the following example, state
The identifier
| |||
hisl_0062: Global variables in graphical functions
| ID: Title | hisl_0062: Global variables in graphical functions |
|---|---|
| Description | For data with a global scope used in a function, do not use the data in the calling expression if a value is assigned to the data in that function. |
| Rationale | Enhance readability of a model by removing ambiguity in the values of global variables. |
| Model Advisor Checks | Check global variables in graphical functions (Simulink Check) |
| References |
|
| Last Changed | R2024a |
| Examples | Consider a graphical function
Recommended
Not Recommended
|








