|
"Phil Goddard" <phil@goddardconsulting.ca> wrote in message <jrcs2d$etf$1@newscl01ah.mathworks.com>...
> You could do this using get_param and set_param (easier in an m-code S-function, but also do-able in a cmex S-Function through calling mexCallMatlab), but it would be unusual.
>
> What if the block isn't connected, i.e. there is no signal to get a name from?
> or the outputs are not connected so again no signal to name?
>
> Usually you'd do this sort of thing as part of the mask initialization, and name underlying Inport and Outport blocks, having those names appear on the mask.
>
> Phil.
Thanks Phil,
Is it really possivle to name signals through set_param?
I want to create a generic simulink block which will do some calculation and will assign the results to ouput signals. These results will be fed to another block where a bus selector selects the signal by name of the signal. If I can assign thr name to the signal inside sfunc itself so that I can avoid any possible mistake from the user in naming signal. As this is all about making a model using this generic block, I wil have names of the signal in a .m file that will be used if nothing is assigned.
|