Simulink connection without drawing lines?

조회 수: 115 (최근 30일)
Kevin Bachovchin
Kevin Bachovchin 2016년 1월 17일
답변: Pranav Pillai 2023년 1월 25일
Hello,
Is there a way to connect two nodes in a Simulink diagram without drawing the lines (such as using ports or something like that)? I'm trying to simulate a relatively complex electric circuit in Simulink and if I try to draw all the lines, there's going to be a lot of lines overlapping each other. The circuit would be much cleaner to view if I could connect through ports at a few places instead.
Thank you,
Kevin

채택된 답변

Walter Roberson
Walter Roberson 2016년 1월 17일
Would it perhaps make sense to design pieces as "subsystems" ? If I understand correctly, subsystems can be represented as having input and output ports, so your lines would at worse go to the edge of the subsystem, without having to have each external line be drawn to each internal location that needs it.
  댓글 수: 3
Walter Roberson
Walter Roberson 2016년 1월 17일
It is not immediately obvious that you cannot do that; http://www.mathworks.com/help/simulink/ug/creating-subsystems.html
What happens if you create an existing circuit with a DC voltage input, select the parts after that in the circuit, and put them in a subsystem?
Are you using basic Simulink or are you using SimElectronics?
Kevin Bachovchin
Kevin Bachovchin 2016년 1월 17일
Thanks that worked. When I selected part of the circuit and put it into a subsystem it made the ports as hexagon "connection ports" blocks, which can connect to circuit elements, rather than oval shaped "in" and "out" blocks, which I was trying before. To answer your question, I'm using the circuit element under Simscape/FoundationLibrary/Electrical.
One additional question I have is: When I click on the voltage source block, there is a parameter called “voltage”. Is there a way to set that voltage equal to a signal port input to the subsystem? (ie, the voltage source value is determined from a different controller subsystem)

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Matthew Kapp
Matthew Kapp 2017년 8월 3일

Pranav Pillai
Pranav Pillai 2023년 1월 25일
You can use in and out too if you are using a subsystem

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by