How to connect simmechanice blocks?

8 ビュー (過去 30 日間)
Aghil Pour Rahim
Aghil Pour Rahim 2017 年 4 月 5 日
回答済み: Steve Miller 2018 年 2 月 1 日
I've try to connect two blocks in simmechanice with add_line commend, but it does not work. I want to know how I can connect Machine Environment block with Ground block. And then for connecting joint blocks with body blocks that has got different ports. Of course, I test some comments like Block1PortHandles = get_param('Mymodel/Block1','PortHandles'); and then add_line('Mymodel',Block1PortHandles.LConn(1), Block2PortHandles.LConn(1)); but I can not to add lines between block.
I am looking forward to your reply. With regard, Aghil

回答 (1 件)

Steve Miller
Steve Miller 2018 年 2 月 1 日
We have posted an example on the MATLAB Central File Exchange that shows how to use MATLAB commands to add Simscape blocks and connect them.
To connect a block to an existing line, simply use add_line() to connect the new block to any of the ports that are already connected to that line. The above example connects the Solver Configuration block to two other blocks which are already connected.
Thanks,
--Steve

カテゴリ

Help Center および File ExchangeMultibody Dynamics についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by