How to enable External Mode for a Simulink model containing multiple referred models?

조회 수: 2 (최근 30일)
Hi ALL,
I have been searching for quite a while if there is a way to run my Simulink project model, which consists of upto 7 referenced models and many more subsystems. Its of interest to run in the external mode for simplifying the debugging process!
I and colleagues of mine were in touch with Mathworks support engineer ( just before the summer) and tried to find a solution to this, but what we came to know was that its, as of then, not supported to Simulink models with referenced models inside them. And we managed to get our hands on a forum thread where someone posted a workaround to transform all the referenced models in to subsystems. But the thing is this function was for Matlab 2009 and we run Matlab 2013b, which didn't work for us anyway evenif we tried to modify it.
So my question remains, is there any support in Matlab R2014b for referenced models to run in External Mode or is there an official supported workaround to transform referenced models in to subsystems in Simulink so that one can run external mode on the whole project file ( model) ?`
Many regards!

답변 (1개)

Jon Boerner
Jon Boerner 2014년 10월 22일
In R2014b, there is not a way to convert model blocks into subsystems. You could potentially write a script to do this, but it would be fairly complicated.
Additionally, I do not believe you can tune/upload data inside model reference blocks in external mode as of R2014b either.
There is a workaround you could try, however. When you use a model reference, you can define something called "model arguments". Think of these the same as mask parameters for a subsystem. You define a model argument, and then in the reference model you can use that argument as a variable in other blocks (e.g. a Gain block). You can tune the model arguments from the top-level model during an external mode simulation. That way you could still tune some of the values in the model references.
You would still have to create outputs for signals you would like to monitor, however, so you have access to them from the top-level model.
Obviously this is much more limited than just tuning the parameters in the model references, but it does get you closer. Model arguments are explained here:
  댓글 수: 1
Alon Spinner
Alon Spinner 2021년 2월 22일
Has this been addressed in new versions?
I would very much like to update blocks in the referenced model as if it was the parent model when running external mode.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by