Enabling multiple outputs using SIMULINK

50 visualizaciones (últimos 30 días)
Sultan
Sultan el 11 de En. de 2016
Editada: Adithya Addanki el 13 de En. de 2016
Is there anyway I can enable multiple outputs in a model in SIMULINK ? Its like I'm making a subsystem comprising of the blocks In1,Complex to Magnitude-Angle, Out2,Out3. This system allows me to get 2 outputs and similarly if I want to have more outputs I just simply add the Complex to Mag-Angle block to the path.So when I setup Mask for the subsystem I can initialize two outputs. I want to make a drop-down menu (input field) in mask so as to enable the desired outputs, whether it may be 2 or 3 and by doing so only the desired outputs are initialized or active.
I have been following the example mentioned on:
But I'm unable to replicate it for the outputs.
  1 comentario
Adithya Addanki
Adithya Addanki el 13 de En. de 2016
Editada: Adithya Addanki el 13 de En. de 2016
Hi Sultan,
I think you are in the right direction of achieving it. However, you may need to modify the callback code a bit in your case.
You will need to initialize the mask and in the callback corresponding, you need to make use of the "add_block" and "add_line" functions to add the out blocks and connect them to relevant ports. The number of blocks may be dependent on the value you set.
Thank you,
Adithya

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by