How do you change the locations of the inputs and outputs of a subsystem in Simulink or Simevents?

Hello,
I'm trying to figure out how to change the locations of inputs and outputs on a subsystem so that it will be easier to route wires in a desired direction. It will also allow for smoother flow when debugging specific things in my design. Any help would be greatly appreciated.

6 commentaires

I won't be able to talk about what I'm working on specifically, but I can provide an example. When I make a subsystem, even if I have the input of one thing on the right, and the input of another thing on the left, it defaults to putting them both to the left. I do not want this. I want it the way I have it inside of the subsystem. I want one of the inputs to be on the left and one of the inputs to be on the right. How do I do this?
Still not clear for me, what do you mean by right and left?
In simulink there are blocks. On each of these blocks there is a right side, a left side, a top side, and a bottom side. The left side usually has the inputs and the names of the inputs that show up, and on the right side it has the outputs and the names of the outputs that show up. I want to know how to make it so that I can put some, not all, of the inputs that show up on the left side of the block, onto the right side of the block. I know it's possible because I've seen it done, but I do not know how to do it. That's what I need to know, how to change the locations of those inputs and outputs on the simulink block that I've created.
That's what I'm trying to ask. How do I do this? I did this in paint, but I don't know how to do it in Simulink.

Connectez-vous pour commenter.

Réponses (4)

Azzi Abdelmalek
Azzi Abdelmalek le 28 Jan 2013
Modifié(e) : Azzi Abdelmalek le 28 Jan 2013
You mean, you want to rotate your block, Select your block then type, ctrl+r twice

3 commentaires

I do not want to rotate my block, as you can see in the picture below.
That's what I'm trying to ask. How do I do this? I did this in paint, but I don't know how to do it in Simulink.

Connectez-vous pour commenter.

Only 5 years late, but within the subsystem, you can right click a port, select block parameters, and there is a option that says "Port Location on Parent Subsystem". Better late than never!

2 commentaires

The problem is, there is no "Port Location on Parent Subsystem", where can I find it?
You can right-click on the subsystem (or pretty much any component) and select 'Rotate & Flip' and either 'Flip Block' to apply a vertical axial symetry, or rotate it as many times as needed. You can also flip the name label to put it on top (or bottom depending on how many times you apply it) of the block.
Hope this answers the question.

Connectez-vous pour commenter.

With physical ports of subsystems in SimScape its tricky. You should obey certain sequence when creating them - from left to right, from top to bottom. This will affect wheather they will appear on the left or right side of the subsystem
In the example below I have created first Ua, then T1 to the right, then Ub below then T2 and so on.
Good luck!
In 2023b, this seems to only be possible using simscape and bidirectional ports:
I don't think you can change the defaut side for inport/outport in simulink, but you can drag that port to any side that you wish. This would need to be done manually for each instance and only works if there is no mask.
I find this limitation very confusing when using back pressure. I'd like to put my back pressure output port for my inputs on the input side and back pressure input port for my outputs on the output side.

Catégories

En savoir plus sur Discrete-Event Simulation dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by