How to insert a Mean block in a referenced model?

2 vues (au cours des 30 derniers jours)
Marco
Marco le 29 Jan 2016
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!

Réponses (1)

Abhisek Roy
Abhisek Roy le 3 Fév 2016
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.

Catégories

En savoir plus sur Subsystems dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by