Hi, the error you're facing usually means that Simulink doesn't support resetting states in this specific context, often when the enabled subsystem is nested inside another subsystem.
What you can do to fix this error is:
- Open the Enable block inside the subsystem.
- In the block parameters, change “States when enabling” from "reset" to "held".
This should resolve the error, as Simulink does allow holding states, but not always resetting them depending on where and how the block is used.
If you do need the states to reset when enabled, you could consider:
- Replacing the enabled subsystem with a resettable subsystem.
- Or add logic to manually reset states like integrators using a reset port.
Hope this helps!
Here is the documentation link if you want to know more about enabling states: