What is the name of Bus Element inport blocks?

1 回表示 (過去 30 日間)
dvd7e
dvd7e 2018 年 5 月 25 日
コメント済み: dvd7e 2018 年 5 月 26 日
I'm trying to build up a Simulink model from the Matlab command line by using the "add_block" command, which requires the block name. For example, a normal inport is like this:
add_block('built-in/Inport',[sys '/Subsystem/In1'],'Position',pos);
However, I need to add a Bus Element Input port (under Signal Routing) and I can't find the name of it. When I add it manually and right click it says that the name is just "Inport" just like a normal inport. I've tried every name I can think of but it won't work (or will give me a normal inport, which is not what I want). Does anyone know the name to use in add_block() to add Bus Element Inports?

採用された回答

TAB
TAB 2018 年 5 月 26 日
編集済み: TAB 2018 年 5 月 26 日
You can do following to see the name and path of any block
1. Open Simulink library model (not library browser) using command bellow:
open_system('simulink')
2. Open subsection (for example Signal Routing)
3. Select the block you want to check
4. Now in Matlab command window type
gcb
5. Block path will be displayed in command window. Copy and use it.
  1 件のコメント
dvd7e
dvd7e 2018 年 5 月 26 日
That did it. Thank you! For other people's reference, the Bus Element block is added via:
add_block('simulink/Signal Routing/Bus Element In',...)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by