コマンドで「ブロック注釈」の設定をすることが出来ますか?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 25 de Oct. de 2013
Respondida: MathWorks Support Team
el 25 de Oct. de 2013
ブロックのブロックプロパティ のブロック注釈のブロックプロパティトークンのプロパティを表示できるよう コマンドで設定するにはどのようにしたらよいのでしょうか。
Respuesta aceptada
MathWorks Support Team
el 25 de Oct. de 2013
ブロックパラメータ:AttributesFormatString を使用した方法になります。
(例1) サンプル時間の表示設定
set_param(gcb,'AttributesFormatString','ST=%<SampleTime>')
(例2) 条件に応じて表示/非表示を設定
if strcmp(get_param(gcb,'SampleTime'),'-1')
set_param(gcb,'AttributesFormatString','');
else
set_param(gcb,'AttributesFormatString','%<SampleTime>')
end
(上記は、サンプル時間が -1 の場合、SampleTime を ブロック下部に表示しないで、それ以外の場合、表示する)
これらは、ブロックプロパティのコールバック関数:InitFcn に設定します。
なお、パラメータ設定後、[モデルの更新]あるいは、[シミュレーション実行]を行うことで表示が反映されます。
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre モデル、ブロックおよび端子のコールバック en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!