How can I use 'To Workspace' and 'To File' blocks in Model Reference block with configuration parameter 'Total number of instances allowed per top model' set to 'Multi'?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Alexej Dikarew
am 12 Aug. 2019
Kommentiert: Alexej Dikarew
am 29 Aug. 2019
Hi,
I am facing a problem with a Simulink model utilizing Model References. Inside one of the referenced models, I want to log some data variables using a 'To Workspace' and a 'To File' block. To use these blocks Matlab advises me to set the configuration parameter 'Total number of instances allowed per top model' of the afftected Model Reference to 'One' instead of 'Multi'.
The Simulink model is being used for desktop simulation as well as for code generation, in order for the code generation to work the abovementioned parameter is supposed to be 'Multi', so changing it is no option. Also due to the overall model structure and definition of input/output signals the 'To Workspace' and a 'To File' blocks should stay inside the referenced model and can not be moved to the top-level model.
Is there a way to keep these blocks inside the referenced model without changing the number of allowed instances parameter? Or is there maybe another solution for logging specific data from desktop simulation?
Thanks in advance
0 Kommentare
Akzeptierte Antwort
Sahithi Kanumarlapudi
am 16 Aug. 2019
You cannot reference a model more than once in a model hierarchy if the referenced model contains ‘To File’ blocks.
You can have a look into the following link for further information on the limitations of model reference
In order to log data when using reference models ‘Log Selected Signals’ can be used. For further information on how to do that you can refer to the following link
Hope this helps!
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Prepare Model Inputs and Outputs finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!