Variant Subsystems control by Model Workspace variables?

4 visualizzazioni (ultimi 30 giorni)
Tilman
Tilman il 31 Ago 2014
Commentato: Lee il 25 Gen 2022
Dear Community,
does there exist a way to use Model Workspace variables instead of Base Workspace variables for variant control?
I would like to avoid using callbacks for variant override.
I wonder why hierarchical symbol resolution ( http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/ ) does not apply for variant control ...
Best regards,
Tilman
  4 Commenti
Markus
Markus il 19 Feb 2021
I agree to the above. I would also prefer to have Simulink Variant objects in the model workspace.
Lee
Lee il 25 Gen 2022
Where is this limitation even mentioned in the documentation? I don't understand why variables referenced by variant control conditions would need to be present in a specific workspace. Furthermore, even after moving said variables into the base workspace, Simulink throws an error as it's still unable to evaluate logical expressions such as 'and' or '|' or 'not'

Accedi per commentare.

Risposte (2)

Mobashar Ahmad
Mobashar Ahmad il 28 Ott 2019
Any updates on this? i would also like to use the Model Workspace to manage the variants control variables.
  1 Commento
Markus
Markus il 24 Giu 2020
Same here. These make more sense in the model workspace anyway.
Any update from a staff member?

Accedi per commentare.


Jonas
Jonas il 25 Giu 2020
Modificato: Jonas il 25 Giu 2020
You can create a Simulink.Variant variable and put it inside a Data Dictionary, and then link this Data Dictionary to the model.

Categorie

Scopri di più su Component-Based Modeling in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by