How to reset a stateflow state machine on external event?

조회 수: 49 (최근 30일)
olivier
olivier 2012년 9월 3일
댓글: Song 2016년 2월 10일
Is it possible to re-initialize a state machine on an event generated by an other state machine?

채택된 답변

TAB
TAB 2012년 9월 3일
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
Kaustubha Govind
Kaustubha Govind 2012년 9월 4일
편집: John Kelly 2015년 2월 26일
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
Song
Song 2016년 2월 10일
Do you have a example of this? That would be extremely helpful

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by