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

조회 수: 4 (최근 30일)
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
Joe Holdsworth
Joe Holdsworth 2018년 3월 27일
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'.

댓글을 달려면 로그인하십시오.

답변 (2개)

Birdman
Birdman 2018년 3월 27일
편집: Birdman 2018년 3월 27일
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
Joe Holdsworth
Joe Holdsworth 2018년 3월 29일
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 2018년 3월 29일
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.

댓글을 달려면 로그인하십시오.


Joe Holdsworth
Joe Holdsworth 2018년 4월 5일
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.

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by