Simulink 2021b subsystem port position change

22 次查看(过去 30 天)
Hi,
I am working on Simulink 2021b and i have noticed that I can drag and move subsystem's ports from one side to the next on some subsystems, but not on some other subsystems. Below are two example subsystems as an example:
As one can see, the subsystem below has its ports moved to upper and lower sides, whereas the upper subsystem's ports cannot be moved by dragging. If I try, it only attempts to connect the port to something, i.e. it will draw a line.
Is there something I am possibly missing or is this just a bug?
  2 个评论
Jon
Jon 2023-9-6
I think the difference between the two blocks is that the lower block only has inports, whereas the upper block has an enable port. Apparently the location of enable ports can not be changed. I don't know if this would be considered a bug or just a design choice on what features to enable.
Ilkka
Ilkka 2023-9-7
It seems that might be the case, also if it is masked then one can't drag the port eihter. For what reason it is decided to be done this way I cannot fathom, but thank you for help Jon!

请先登录,再进行评论。

回答(1 个)

Ishaan
Ishaan 2025-2-18
Hello Illkka,
I notice that you wanted to understand why you can drag and move ports of the subsystem at the bottom of the image you shared, but not in the subsystem at the top.
In Simulink R2021b and later, the ability to move and rearrange ports by dragging is available for standard subsystems, but not for enabled subsystem blocks. This is probably because the top side of an enabled subsystem is reserved for the enable signal, restricting port movement.
To work around this limitation, you can wrap the enabled subsystem by placing the enabled subsystem inside another standard subsystem. This allows you to move and rearrange the outer subsystem's ports freely, including the enable signal as an additional inport. With this you can manage port arrangements while working with enabled subsystems in Simulink.
Hope it helps.

类别

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