Borrar filtros
Borrar filtros

How can I add port label to my Simulink block within C MEX?

4 visualizaciones (últimos 30 días)
Dear All,
I'm looking for a solution how can I add a port label to my Simulink block within my C MEX S function.
The number of the outputs depends on a masked parameter, so I can't define it at the mask statically. I'd like to have similar guise: http://www.mathworks.com/help/simulink/slref/port_label.html
I've checked this one, but It's not working: http://www.mathworks.com/matlabcentral/answers/31360
Kind regards,
Daniel

Respuesta aceptada

Guy Rouleau
Guy Rouleau el 14 de Dic. de 2012
If the port label depends on a mask parameter, it should be possible to do it in the mask, not in the S-Function.
I do not have an example to do exactly what you are looking for, but the Mask Drawing command has access to mask parameters So it should be possible to write mask drawing commands to achieve what you are looking for.
In R2012b, we have added a new set of examples to show typical things done in masks:
We also have a series of posts on masking here:
Those two links should give you some inspiration to implement what you are looking for.
  1 comentario
Daniel
Daniel el 15 de Dic. de 2012
Thank you! Based on your answer I've written a small matlab code into the mask, so I could parse the parameter string and set up the labels correctly.
Kind regards,
Daniel

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Author Block Masks en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by