Run Code when opening Mask (Simulink)

3 ビュー (過去 30 日間)
mk_lab
mk_lab 2021 年 5 月 25 日
コメント済み: mk_lab 2021 年 5 月 25 日
Hi there,
I have a self-modifying mask. Depending on a check-box, some parameters are made visible or invisible. If this check-box is not checked and the mask is closed, then double-clicked on the block again, so open the mask --> these parameters are visible, although they should be invisible. If I then check and uncheck the check-box, it seems fine, again. From this behaviour, I think, that the Initialization code is not run when double-clicking on the subsystem and opening the mask.
Is that correct?
I use the Callback-Function of the check-box to make the related parameters visible or unvisible - I copied the same code piece in the initialization area --> which does not seem to work.
Kind regards and thanks in advance :)
  1 件のコメント
mk_lab
mk_lab 2021 年 5 月 25 日
Found my mistake ... obviously, the initialization and callback commands are executed when opening the mask ...

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeAuthor Block Masks についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by