MATLAB Answers

How to insert a Mean block in a referenced model?

1 view (last 30 days)
Marco
Marco on 29 Jan 2016
Answered: Abhisek Roy on 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!

  0 Comments

Sign in to comment.

Answers (1)

Abhisek Roy
Abhisek Roy on 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.

  0 Comments

Sign in to comment.


Translated by