incompatible global variables in a model reference

7 visualizaciones (últimos 30 días)
Till Rahlf
Till Rahlf el 8 de Sept. de 2014
Respondida: Till Rahlf el 30 de Mayo de 2016
Hi all,
I have a model reference, which is built every time. Also if nothing changed. :-(
My Rebuild configuration is set to "If any changes in known dependencies detected".
( 'UpdateModelReferenceTargets' is set to 'IfOutOfDate' )
I did not change any file.
But the command line displays: ### Model reference SIM target (myModel_msf.mexw64) for model myModel may be out of date because global variables used by this model are incompatible with the variables that were in the base workspace when the target was generated. This model uses global variable(s): 'ConfigSet_myModel,bus1_myModel'.
I did not change the configuration reference/set and I did not change the bus definition.
Why is it incompatible?
Can see furhter information, about the possible differences?
Thanks for your help.
Till

Respuestas (3)

A Jenkins
A Jenkins el 8 de Sept. de 2014
This Example isn't exactly the same as yours, but it does introduce some of the troubleshooting methods for future reference.
In this case, if you don't need the variables to be global, I would recommend making them local to the model workspace. If you do need them to be global, you can Parameterize your model references to pass in your global parameters instead of trying to compile them in every time.
  1 comentario
Till Rahlf
Till Rahlf el 9 de Sept. de 2014
That seems to be a good idea.
All my "usual" variables are in the model workspace.
But some variable have to be global, like a Simulink.ConfigSet object.
A Simulink.Parameter cannot store a Simulink.ConfigSet object. So I do not know, how to parameterize that. Any idea?

Iniciar sesión para comentar.


Brian Wilson
Brian Wilson el 26 de Mayo de 2016
the configuration set is treated differently than other variables. The best way to manage config sets, especially if you have multiple models using the same config set settings, is to use a "config set reference".

Till Rahlf
Till Rahlf el 30 de Mayo de 2016
I use ConfigSet References. And I made all my variables local to the model workspace. Except the ConfigSet and the Simulink.Bus. As IO wrote the only variables are 'ConfigSet_myModel', 'bus1_myModel' in the base workspace. Althouth it is build every time again. And I don't have a clue, why.

Categorías

Más información sobre Deployment, Integration, and Supported Hardware en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by