Control the execution of your Stateflow® chart by specifying when transitions between states occur and when actions are executed. Synchronize state execution by broadcasting events. Detect changes in data values and check which states are active during chart execution.
|change||Generate implicit event when data changes value|
|hasChanged||Detect change in data since last time step|
|hasChangedFrom||Detect change in data from specified value|
|hasChangedTo||Detect change in data to specified value|
|isvalid||Determine if message is valid|
|length||Determine length of message queue|
|receive||Extract message from queue|
|send||Broadcast message or event|
|enter||Generate implicit event when state becomes active|
|exit||Generate implicit event when state becomes inactive|
|in||Check state activity in Stateflow|
|ascii2str||Convert array of type |
|str2ascii||Convert string to array of type |
|str2double||Convert string to double precision value|
|strcpy||Assign string value|
|strlen||Determine length of string|
|substr||Extract substring from string|
|tostring||Convert numeric value to string|
|after||Execute chart after event broadcast or specified time|
|at||Execute chart at event broadcast or specified time|
|before||Execute chart before event broadcast or specified time|
|count||Chart executions during which condition is valid|
|duration||Time during which condition is valid|
|elapsed||Time since state became active|
|every||Execute chart at regular intervals|
|temporalCount||Number of events, chart executions, or time since state became active|
Reserved keywords, name length restrictions, and naming limitations.
exit actions in a state.
Bind a function-call output event to the activity of a state.
Create decision points in transition paths.
Perform mathematical computations in Stateflow charts.
Special symbols available for state and transition actions.
Access MATLAB® functions that are not supported for code generation.
Call built-in MATLAB functions by using the
Access C functions in state and transition labels.
Determine if a state is active during chart execution.
Define chart behavior when data change value between time steps.
Use event-based and absolute-time temporal logic operators.
Trigger chart actions by changes in data values and state activity.
Simplify debouncing logic in charts that have transient signals.