How to enable External Mode for a Simulink model containing multiple referred models?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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!
0 comentarios
Respuestas (1)
Jon Boerner
el 22 de Oct. de 2014
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 comentario
Alon Spinner
el 22 de Feb. de 2021
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.
Ver también
Categorías
Más información sobre Subsystems en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!