Simulink Subsystems are grayed out and hard to read

75 ビュー (過去 30 日間)
Smattering_Applause
Smattering_Applause 2020 年 4 月 24 日
I have simulink models that are provided by my software engineers. When browsing them to view how the code is formatted, some of them go "gray" below a certain level. This makes it much harder to read the code provided in the functions. Here is an example of the "gray" or "faded" text
Below is an example of similar text at a higher level. While it's not too hard to read either right now, when it gets to stateflow stuff, the contrast is really gone.
What's causing this, can I change it? I've tried searching, but all the terms I use keep going to signal manipulation, not just visual representation issues.

採用された回答

Bhargavi Maganuru
Bhargavi Maganuru 2020 年 4 月 28 日
Hi,
This can happen when blocks are commented.You can uncomment by right click on block and select uncomment.
  2 件のコメント
Smattering_Applause
Smattering_Applause 2020 年 4 月 28 日
I took a look at doing this. On a function that was not already grayed out I selected Comment Out and it went to the same gray. I then right clicked it again and it changed to show Uncomment which I clicked and it went back. Annoyingly, everything that is grayed in the model I have doesn't show Uncomment as an option. Additionally, that only works for blocks and not the inputs or outputs which are also grayed in the model I have.
When I try to comment out blocks that were always gray I get the error "Commenting out of the following block(s) is not supported:" which is the same error I get when trying to comment out an input or output to a block.
What other things can make stuff gray?
Smattering_Applause
Smattering_Applause 2020 年 4 月 28 日
Update: I think I found the reason. All simulink that I looked at went gray when it got to the level where they split to different variants. The error reads like "Variant control 'Block Name' of variant block 'subsystem page name' must be a condition expression or name of a Simulink.Variant object in the global scope workspace of the model. Ensure that the condition does not match the model name."
Once I loaded the expression config file to my workspace then opened the simulink model, everything that I wanted to be able to read better was readable. Basically Variant blocks sort of automatically comment out sections that aren't activated by configs.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNaming Conventions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by