Azzera filtri
Azzera filtri

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

4 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Guy Rouleau
Guy Rouleau il 14 Dic 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 Commento
Daniel
Daniel il 15 Dic 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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Author Block Masks in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by