How do I add entry and exit actions to a Simulink subsystem inside of a Stateflow chart?
3 views (last 30 days)
Show older comments
MathWorks Support Team
on 6 Oct 2021
Answered: MathWorks Support Team
on 28 Oct 2021
How do I add entry and exit actions to a Simulink subsystem inside of a Stateflow chart?
When I try to add them below the name of the subsystem state, I get the following error:
Simulink based state '<state name>' does not support entry, during, or exit actions.
Accepted Answer
MathWorks Support Team
on 6 Oct 2021
For entry and exit actions, there is a simple workaround: wrap the Simulink subsystem in an otherwise empty Stateflow state.
The entry and exit actions can be added to the parent state, which will prevent the error.
The following image illustrates how to do this:
Though it's not strictly necessary, for clarity/readability in the chart, it is recommend that a default transition be included inside the parent state going to the Simulink state.
0 Comments
More Answers (0)
See Also
Categories
Find more on Complex Logic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!