Stateflow: reset simulink-based state on entry

조회 수: 2 (최근 30일)
Francis Therien
Francis Therien 2024년 9월 19일
댓글: Francis Therien 2024년 10월 10일
I have a Stateflow chart in Simulink, and in this chart I have some Simulink-based states. Some of these states contain stateful blocks such as integrators and delays. I would like to reset some or all of the block states each time I enter the Simulink-based state. How can I achieve this?

답변 (1개)

Mark McBroom
Mark McBroom 2024년 9월 21일
Did you try putting a reset subsystem in the Simulink subsystem to reset the state?
Thanks.
Mark.
  댓글 수: 1
Francis Therien
Francis Therien 2024년 10월 10일
Hi @Mark McBroom. Thanks for the reply. I tried adding a "Reinitialize Function" block to the simulink state. By itself this does nothing. I believe I need to call it's associated reinint() function, but I'm not sure how to do that on entry to the state in the stateflow chart. Could you please clarify?
I can attach the minimal test model I am working with if needed.

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

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by