Products & Services Solutions Academia Support User Community Company

Learn more about Stateflow   

Rules for Naming Stateflow Objects

Characters You Can Use

You can name Stateflow objects with any combination of alphanumeric and underscore characters. Names cannot begin with a numeric character or contain embedded spaces.

Restriction on Name Length

Name length should comply with the maximum identifier length enforced by Real-Time Workshop® code generation software. You can set this parameter in the Real-Time Workshop > Symbols pane of the Configuration Parameters dialog box. The default is 31 characters and the maximum length you can specify is 256 characters.

For more information, see Maximum identifier length in the Real-Time Workshop reference documentation.

Reserved Keywords

You cannot use the following keywords to name Stateflow objects. These keywords are part of the Stateflow action language (see Using Actions in Stateflow Charts for details).

Usage in Action LanguageKeywordsReferences
Change detectionhasChanged, hasChangedFrom, hasChangedToUsing Change Detection in Actions
Complex datacomplex, imag, realUsing Operators to Handle Complex Numbers
Data typesboolean, double, int8, int16, int32, single, uint8, uint16, uint32Setting Data Properties in the Data Dialog Box
Data type operationscast, fixdt, typeType Cast Operations
Explicit eventssendBroadcasting Events in Actions
Implicit eventschange, chg, tick, wakeupUsing Implicit Events
Literal symbolsfalse, inf, true, tSymbols in Action Language
MATLAB functions and datamatlab, mlml Namespace Operator
State actionsbind, du, during, en, entry, ex, exit, onDefining Action Types
State activityinChecking State Activity
Temporal logicafter, at, before, every, sec, temporalCountUsing Temporal Logic in State Actions and Transitions

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS