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

4 views (last 30 days)
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 Comment
Joe Holdsworth
Joe Holdsworth on 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'.

Sign in to comment.

Answers (2)

Birdman
Birdman on 27 Mar 2018
Edited: Birdman on 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 Comments
Joe Holdsworth
Joe Holdsworth on 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 on 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.

Sign in to comment.


Joe Holdsworth
Joe Holdsworth on 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.

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!