[Simulink] Enabled subsystem changes input sample times

1 次查看(过去 30 天)
I've been having an issue for a few days now, regarding signal sample times inside an enabled subsystem.
I have a block inside a library, that has an enabled subsystem which is supposed to receive a bus signal as an input. The bus comprises several signals, some of which with different sample times amongst each other. After running "Sample Time Display", I'm noticing that all the signals' sample times get changed to "Constant", once they get inside the enabled subsystem.
Here's what I am observing. I used a "bus selector" both outside (before the subsystem) and inside the subsystem and got each individual signal comprising the bus. As you can see, some of the signals have a sample time (marked red) associated with them, whereas others are set as "Constant" (marked black). However, all sample times get converted to "constant", once inside the enabled subsystem.
In my subsystem's InPort, I've set the sample time value to "inherited", so I'm assuming all sample times should be preserved. Is this a bug from Simulink?
I'm running Matlab 2009b and Simulink 7.4 under Ubuntu 14.04 LTS 64-bit.
Thanks in advance.

采纳的回答

Zoe Xiao
Zoe Xiao 2017-8-3
If in your model, there is an nonvirtual Inport block in the enable subsystem, I think it is the same issue as the one shown in this bug report: https://www.mathworks.com/support/bugreports/612693
This has been fixed in 2010b. You could upgrade to version later than 2010b. Or follow the workaround on 2009b provided in the above link.
  1 个评论
José
José 2017-8-3
Thank you for your answer. After a few tries, using a combination of memories and rate transition blocks in my system successfully fixed my issue.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Subsystems 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by