![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1201003/image.png)
Simlinkでマスクされた関数内にあるGotoBlockを有効にする方法
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
yuji Ito
am 20 Nov. 2022
Kommentiert: yuji Ito
am 21 Nov. 2022
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1200628/image.png)
上記のようにマスクされたブロック内にプロモートを用いてVinという名前の変数名を与え、GotoBlockを定義しています。
ただ。実際にシミュレーションを実行するとVinがつながっていないと表示され、Vinの出力は常に0になります。
上記あたりがヒントになるかと思い、マスクエディター上で下記コマンドをかいたのですがVariableNameは存在しないというエラーで使えませんでした。
set_param([gcb '/Goto'],'GotoTag',VariableName)
この問題を解決する方法をどなたか教えていただけないでしょうか?
0 Kommentare
Akzeptierte Antwort
Toshinobu Shintai
am 20 Nov. 2022
この場合、サブシステムの階層を跨いだFrom/Gotoブロックの使用を行っているので、ブロックパラメーターの「タグの可視性」を「グローバル」に設定する必要があります。こちらの設定は行われていますでしょうか。
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1201003/image.png)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Author Block Masks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!