How to insert a Mean block in a referenced model?
3 次查看(过去 30 天)
显示 更早的评论
I need to put a Mean block (powerlib_meascontrol/Measurements) in a referenced model that is referenced in a triggered subsystem at root level but it gives me the following error:
This model will not inherit a sample time because a sample time was explicitly set in block 'ControllerModelReference/Mean1/In'.
Of course it doesn't inherit the sample time from the root level, then I tried to set the Sample time field to -1 but it doesn't work because
The sample time parameter must be greater than or equal to zero.
How can I make it works?
Thank you!
0 个评论
回答(1 个)
Abhisek Roy
2016-2-3
Hi Marco, All blocks in a triggered subsystem must have either inherited (-1) or constant (inf) sample time. This is to indicate that the blocks in the triggered subsystem run only when the triggered subsystem itself runs, for example, when it is triggered. Since the 'Mean' block you referred needs the sample time parameter to be greater than or equal to zero, you will not be able to use that block. You can have a look at the following documentation page which mentions about this -
You can put other Mean blocks which do not take sample time as a parameter.
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!