You can name Stateflow® objects with any combination of alphanumeric and underscore characters. Names cannot begin with a numeric character or contain embedded spaces.
Name length should comply with the maximum identifier length enforced by Simulink® Coder™ software. You can set the Maximum identifier length parameter. The default is 31 characters and the maximum length you can specify is 256 characters.
Avoid using reserved keywords to name Stateflow objects. These keywords are part of the action language syntax.
Usage in Action Language Syntax | Keywords | Syntax References |
---|---|---|
Boolean symbols |
| Boolean Symbols, true and false |
Change detection | Detect Changes in Data Values | |
Complex data |
| Supported Operations for Complex Data |
Data types |
| Specify Type of Stateflow Data |
Data type operations |
| |
Explicit events | Broadcast Local Events to Synchronize Parallel States | |
Implicit events | Control Chart Behavior by Using Implicit Events | |
Literal symbols |
| Supported Symbols in Actions |
MATLAB® functions and data |
| Access MATLAB Functions and Workspace Data in C Charts |
App Design | ||
Messages | Control Message Activity in Stateflow Charts | |
State actions |
| State Action Types |
State activity | Check State Activity by Using the in Operator | |
String manipulation | Manage Textual Information by Using Strings | |
Temporal logic | Control Chart Execution by Using Temporal Logic |
Note
Do not use the file names sf.sfx
for Stateflow charts or sf.slx
for Simulink models. Using these file names can shadow Stateflow program files and result in unpredictable behavior.