Nested enabled subsystem in Simulink
11 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a model which contains two nested enabled subsystem.
The inner subsystem is set to "States when enabling: Reset" and the outer "States when enabling: Hold" . But when the outer subsystem is disabled and the inner still enabled the inner resets its states.
I want the inner subsystem to reset only when its enable signal transitions from false to true.
I have tried to put the inner subsystem in an atomic subsystem but still the same behavior. How can I solve this?
Kind regards Jonatan
0 个评论
回答(2 个)
Claudio Rey
2020-4-21
I have been investigating behaviors with nested enables as I want to emulate using clock valid signals, Clock valid signals do not reset the states. However I want to reset the block periodically as well to simulate the effect of resetb. This is essential on getting state machines to reset when the system is re-enabled. to emulate clock valid signals I use an enable that holds the states, this works. To emulate resetb I use an enable that resets the block and I modifiy the output ports to also reset. Well the combination does not work. if you put the held enable block on the outermost level then the internals reset even when they are told to hold, even when the outermost enable has not been tripped. If you put the reset enable on the outermost and the inner reset on hold, then the inner blocks reset only once at the beginning.
This is unexpected behaviour and there is no way around it.
0 个评论
Claudio Rey
2020-4-21
This gives you the answer:
For nested subsystems whose Enableblocks have different parameter settings, the settings for the child subsystem override the settings inherited from the parent subsystem.
So, they are all held or all reset. No two ways about it. So if you want to have a hold function inside a system with a reset you have to use triggers. That forces triggered blocks to all run at twice the speed of the required sampling rate. This is ineficient.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subsystems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!