Why does Simulink ignore an update to my referenced model step-size when it's a model argument?

9 views (last 30 days)
Folks,
I have a referenced model, RefModel, that I'd like to run at different rates depending on the scenario. RefModel is fixed-step/discrete with a variable as its fixed-step size. This variable, ts_sim is initialized in RefModel's local workspace with MATLAB code, and included in its list of Model Arguments.
TopModel is the root model whose rate will be changed based on the scenario. Its rate is specified by a base workspace variable named topModelTs. When I include RefModel as a referenced model in TopModel, I point to topModelTs as its "Model argument value". By my understanding, the numerical value of TopModel's topModelTs should now override that contained in RefModel's ts_sim.
No warning or error is thrown, but no override occurs. This argument value is ignored and RefModel will execute at the default created in its model workspace.
I can't find any documentation that prohibits including a model's fixed-step size as a model argument. Have I missed it?
I'm running MATLAB 2011a.
Thanks in advance for any insight you may have.
Phil
  1 Comment
aguadopd
aguadopd on 11 Sep 2016
The same is happening to me in 2015b. Not exactly with step size but with the inports size. The refmodel argument values are not overriding the default ones as it says here: http://www.mathworks.com/help/simulink/ug/parameterizing-model-references.html . In fact, there should be an error, as it says " The value of the model argument does not default to the value of the corresponding MATLAB variable. That value is available only to a standalone or top model. "
Any help, anyone?

Sign in to comment.

Answers (0)

Categories

Find more on Simulink Environment Customization in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!