Stateflow: reset simulink-based state on entry

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?

Respuestas (1)

Mark McBroom
Mark McBroom el 21 de Sept. de 2024

0 votos

Did you try putting a reset subsystem in the Simulink subsystem to reset the state?
Thanks.
Mark.

1 comentario

Francis
Francis el 10 de Oct. de 2024
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Functions en Centro de ayuda y File Exchange.

Productos

Versión

R2022b

Etiquetas

Preguntada:

el 19 de Sept. de 2024

Comentada:

el 10 de Oct. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by