How to insert a Mean block in a referenced model?

2 visualizaciones (últimos 30 días)
Marco
Marco el 29 de En. de 2016
Respondida: Abhisek Roy el 3 de Feb. de 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!

Respuestas (1)

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

Categorías

Más información sobre Subsystems en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by