How can I comment out a subsystem from the mask initialisation pane (the subsystem is inside the masked subsystem)?
4 ビュー (過去 30 日間)
古いコメントを表示
I would like to comment out either this or that subsystem from within the mask initialization pane, depending on the user's choice of a certain mask parameter. But when I use the set_param command, I get these error messages Error in 'xyz': Initialization commands cannot be evaluated. Caused by: Block 'xyz' cannot be commented during execution of a callback
Is this impossible in general, or do I have to use some tricks here?
0 件のコメント
回答 (2 件)
Kiran
2016 年 2 月 8 日
Hi Hans,
The ability to comment out blocks from inside the block callback during the initialization phase is not available in Simulink.
This is expected behavior because the Simulink solver decides the block executing order during the model compilation phase. Therefore, commenting out blocks would be an unexpected behavior for the solver and the model would give an error message.
To enable this kind of behavior, you may use a variant subsystem with a subsystem variant that is just a direct feed-through from the inport to the outport.
Hope this would help.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Subsystems についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!