How to reset a stateflow state machine on external event?

 Akzeptierte Antwort

TAB
TAB am 3 Sep. 2012

1 Stimme

AFAIK, there is no such provision in stateflow. But you can design your stateflow chart logic with an external trigger input in such a way that it resets all the states and data (locals & outputs) when trigger is enabled.

2 Kommentare

Kaustubha Govind
Kaustubha Govind am 4 Sep. 2012
Bearbeitet: John Kelly am 26 Feb. 2015
The documentation also suggests placing Stateflow charts inside Enabled Subsystems and setting the "States when enabling" parameter to "reset" to force re-initialization: http://www.mathworks.com/help/stateflow/ug/controlling-states-when-function-call-inputs-reenable-charts.html?searchHighlight=States%20when%20enabling
Do you have a example of this? That would be extremely helpful

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Stateflow finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 3 Sep. 2012

Kommentiert:

am 10 Feb. 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by