Variant subsystem throws error because it does not recognize parameter in mask

17 ビュー (過去 30 日間)
Zeno Pavanello
Zeno Pavanello 2021 年 7 月 6 日
編集済み: Stefanie Schwarz 2024 年 2 月 12 日
When I try to run a model in which a variant subsystem is present I get the following error:
The variable maxdeg is defined in the mask of the subsystem "Sloshing Tank 1" and is given as a parameter to the block "Gravity EGM2008 ECI", which is defined inside a custom library. Sometimes this error is accompanied by another error which states that the workspace of the masked subsystem is not initialized. I cannot debug the problem because when I try to run a simpler model with the single block "Sloshing Tank 1" or with the block "Gravity EGM2008 ECI" it runs smoothly.
If it may help, the model includes a Simscape Multibody system.
Thank you in advance for your help.
  2 件のコメント
耀仁 邢
耀仁 邢 2023 年 2 月 7 日
I have the same problem as you. The most interesting thing is that I can implement this function on matlab2021b, that is, use the variables defined in the mask to switch the variant subsystems, but there is the same error message as you on 2019b
Phab
Phab 2023 年 6 月 21 日
Any solution here?
Because I have the same problem. Workaround for me is using label control and promoting it to the higher mask.
But I want to set a variable so I can change my controled subsystems all over the model.

サインインしてコメントする。

回答 (1 件)

Steve Miller
Steve Miller 2021 年 9 月 29 日
編集済み: Stefanie Schwarz 2024 年 2 月 12 日
Hi Zeno - take a look at this documentation page:
Make sure you have defined your variant control as shown on this page. I usually find it helpful to open the Variant Manager to check that it is set up properly.
--Steve
  1 件のコメント
Phab
Phab 2023 年 5 月 31 日
Hi Steve,
is/was there a known problem with variant subsystems?
Because if I pull some blocks out of the library, created by a colleague, I got the same error as described.
If I rebuild the system in my model, everythink runs smoothly. With the exact same variant conditions.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeComponent-Based Modeling についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by