change the position of a part of the input ports of a simulink block.
Mostrar comentarios más antiguos
Hello everyone,
I would like to change the position of the input ports of a simulink block. I need to put them on the bottom of a subsystem block. Does anyone have any ideas for how I can put the input ports on more than one side?
Actually I tried to modify the parameter "port connectivity", but at any attempt I get an error message saying:
*' ModelReference block parameter 'PortConnectivity' is read-only '*
This is the list of instructions that I used "
portData = get_param('ModelName/MySubsystemBlockName','PortConnectivity');
portData(1).Position = [newXValue newYValue];
set_param('ModelName/MySubsystemBlockName','PortConnectivity',portData); "
I'm wondering why we have that option, "PortConnectivity", in the parameters list of a Simulink block: http://www.mathworks.nl/help/toolbox/simulink/slref/f23-7517.html if we cannot use it, and in particular in which cases we have a Simulink block where this option is write permitted?
Any help?
thanks in advance
2 comentarios
Karansingh Patil
el 9 de Abr. de 2018
The input/output ports can be flipped in a simple manner. Select the block, right click on it and then select option Rotate and Flip, and chose the option Flip Block. Thus it flips the input/output ports.
Yassine Abada
el 5 de Mayo de 2020
That's it thanks
Respuesta aceptada
Más respuestas (1)
Alaa Salaheldin
el 18 de Abr. de 2015
14 votos
Double click on the input port itself to change its location from right to left using the "Port location on parent subsystem" attribute, after that you may flip your block vertically so the input port would be on the lower side of your block.
3 comentarios
Amit Singh
el 19 de Abr. de 2017
You need to right click on the input port you need to change. Select "Block Parameters (PMIOPort)" and there would be option to put port "left" or "right". Please refer the figures for more info.
<<

>>
Simon Geoffroy-Gagnon
el 9 de Mayo de 2018
Hello,
Is there a way to change the location of the port on the parent subsystem programmatically?
Thank you,
Elisaia Junior Kolia
el 12 de Mayo de 2018
Hello guys, Is anyone here know how to change from input conn to output? I don't know if its just norm but i have only the input conn on the simEvent port and subsystem library. Please
Categorías
Más información sobre Simulink en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!