How to insert a Mean block in a referenced model?

1 visualizzazione (ultimi 30 giorni)
Marco
Marco il 29 Gen 2016
Risposto: Abhisek Roy il 3 Feb 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!

Risposte (1)

Abhisek Roy
Abhisek Roy il 3 Feb 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.

Categorie

Scopri di più su Subsystems in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by