Hi everyone,
I experience difficulties when I try to use some Simulink Function in my stateflow. Actually, I have encountered some problem to reset the function I have called in my chart.
For the exemple, I will use a simple counter as my Simulink function. To be more specific, I am calling the Simulink function at two differents times in my chart. But when I call the function for the second time (in state " Neutral_Speed" on the picture), I want that the value of my counter starts from 0 again (like the first time the function was called).
However, even if I set in the block parameter, the option " State when enabling" to reset, the value of my counter does not reset. I success to do this thing with a enabled subsystem but I need to do this in a Simulink Function.
The result I obtained (in red) vs the result I want (in green).
Do you have any idea on how to reset my signal each time I called the Simulink function ?
Please find enclosed a picture to have a better understanding.
Thanks for your help and have a good day !