I have been trying to flip a block in Simulink along the vertical but I couldn't figure out how this can be done. For example, when the "sincos" trigonometric function block is inserted, the sin output is up and the cos output is down. I want the cos output to be up and the sin one down for my connection to be nicer.
I tried to rotate 180 deg and then flip it horizontally, but this even did NOT work.
Any suggestion
Generally you can rotate and flip every block like desired and the ports are rotated accordingly. Some blocks like this little 'add'-bubble requires special syntax like |+-
or -|+-
though.
In some very rare cases the rotation of the ports is disabled. I don't have your block, but you can check the following:
inspect(gcbh)
Have a look at the MaskPortRotate
and PortRotationType
properties, whether there are set to default
If not you can try to change that. But I'm not sure if that's possible for in-built blocks.
Programatically:
h1 = get_param('modelName/BlockName','handle')
h2 = get_param('modelName/BlockName','handle')
inspect(h1)
inspect(h2)
and then you can use set_param
to change the properties.
set_param(h1,'PortRotationType',...)
set_param(h2,'MaskPortRotate',...)
But it possibly could not work and I don't have your block to try it out. But thats the way to go, otherwise it is not possible.
A workaround could be to put your block in subsystem and mask it with the parameters of the underlying block. Then the rotation is working.