フィルターのクリア

Add simscape blocks programmatically

4 ビュー (過去 30 日間)
Grzegorz Diaczek
Grzegorz Diaczek 2022 年 12 月 20 日
コメント済み: Grzegorz Diaczek 2022 年 12 月 20 日
Hello,
I tried to add a simscape block programmatically, using 'add_block()' function.
add_block('Simscape/Foundation Library/Electrical/Electrical Sources/Controlled Current Source',[gcb,'/Current Load'])
The following error occured:
There is no block named 'Simscape/Foundation Library/Electrical/Electrical Sources/Controlled Current Source'
I check if there is no mistake in path definition, also the simulink and simscape has been loaded using 'load_system()' function. Using simple command to built-in library works fine:
add_block('built-in/Gain',[gcb,'/Current Load'])
Thanks for help.

回答 (1 件)

C B
C B 2022 年 12 月 20 日
  1 件のコメント
Grzegorz Diaczek
Grzegorz Diaczek 2022 年 12 月 20 日
Thank you for your answer. Unfortunately, the output of gcb when block is right clicked in Library Browser is empty.

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

カテゴリ

Help Center および File ExchangeElectromagnetic Models についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by