How to integrate a triggered subsystem which contains a third party supplied block with a different fixed sample rate

4 visualizzazioni (ultimi 30 giorni)
I have been supplied a third party simulink block with a fixed sample time. It needs to go inside a triggered function block of a different sample time. Is there a way to do this?
Thanks
  1 Commento
Joe Holdsworth
Joe Holdsworth il 27 Mar 2018
I should add, trying the above results in this error:
'IDDTest/Triggered Subsystem/Triggered Subsystem/VscIdd1/VscIdd_sfcn' has sample time 0.01. Only constant (inf) or inherited (-1) sample times are allowed in triggered subsystem 'IDDTest/Triggered Subsystem/Triggered Subsystem'.

Accedi per commentare.

Risposte (2)

Birdman
Birdman il 27 Mar 2018
Modificato: Birdman il 27 Mar 2018
To overcome this problem, use Model Referencing. In model referencing, you can specify your model's sampling time separately, in your case 0.01, but please do not forget that its sample time has to be integer multiple of your parent model's sample time. For instance, if you specify your reference model's(in this example, your triggered subsystem) sampling time 0.01, your parent's model sampling time can be 0.001, 0.0001 etc.
Also, solver types have to be the same.
Hope this helps.
  9 Commenti
Joe Holdsworth
Joe Holdsworth il 29 Mar 2018
You might not have seen the previous message but the vender has now supplied the model with the same sample time as the base model, however the same error message is generated, it needs to be an inherited sample time...
Birdman
Birdman il 29 Mar 2018
One thing to make sure: As long as you use Triggered Subsystem, it has to inherit the sample time of the parent model. Therefore these errors will not go away until you keep using Triggered Subsystem. Since I can not edit your model, that is all I can say.

Accedi per commentare.


Joe Holdsworth
Joe Holdsworth il 5 Apr 2018
The solution to this was to move the block outside of the triggered function, although this did require a change of our model to do this.
Thanks for your answers Birdman.

Categorie

Scopri di più su Simulink Functions in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by