You can name Stateflow®objects with a 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金宝app®Coder™software. You can set theMaximum identifier lengthparameter. 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.
Note
Do not use the file namessf.slx
for Simulink models orsf.sfx
for standalone Stateflow charts in MATLAB®. Using these file names can shadow Stateflow program files and result in unpredictable behavior.
Usage in Action Language Syntax | Keywords | Syntax References |
---|---|---|
Boolean symbols |
|
Boolean Symbols, true and false |
Change detection | Detect Changes in Data and Expression 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 |
|
States |
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 |