Is it possible to force my Stateflow 8.0 (R2012b) chart to reset to the state connected to the default transition?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 28 Jan. 2013
Bearbeitet: MathWorks Support Team
am 19 Dez. 2013
I have a Stateflow chart that can be viewed as a chain of states. The first time the chart is called a default transition enters "State 0". At the next time step the chart moves to a proceeding state based on input values.
I would like to have the ability to force my chart to return to "State 0" based on the value of an input. Can this be done without drawing individual transitions from each state back to "State 0"?
Akzeptierte Antwort
MathWorks Support Team
am 18 Okt. 2013
One design that can be used to do this is to enclose the chain of states within a parent state. Then create another parent state that is entered based on the reset condition. Please see the attached examples "chainChart" and "chainChart_reset" for a demonstration of how this can be done. The model "chainChart" does not contain any reset logic, "chainChart_reset" includes logic for resetting to "State 0".
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Complex Logic finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!