Re: Access bus signal names in S-function




Get hold of the relevant signal lines and their
properties,
with commands like:
- ph = get_param( <blkHandle>, 'porthandles' )
- lh = get_param( ph.Inport(<index>), 'line' )
- lName = get_param( lh, 'Name' )
Be careful only with the implication of running the
function as part of the block/mask initialisation.
It may turn out easier/less messy to call the m-function
from the s-function mdlStart method, say, after block
properties have been set.
Hope it helps.
Riccardo


Thanks Riccardo. I've come back to this after some time
away. With your help I have a function working which takes
a single input. I've used the get_param function as you
indicated to get the signal name from the input port/line.

I have not been able to find the parameters to use to
access the signal names if I have a bus of many signals
entering through the inport. Is there a way to do this?

e.g. something like:-

- ph = get_param( <blkHandle>, 'porthandles' )
- is = get_param( ph.Inport(<index>), 'somehandle' )
- is = get_param( <somehandle>, 'InputSignalNames' )

I can access the InputSignalNames from the originating
BusCreator block if I know its handle but is there a way
to get the names without searching for the originating
block?

Thanks for your help.

Mick.



.



Relevant Pages

  • Re: Neural netss (was Re: death of the mind.)
    ... We can talk about motor program generators, ... > This means that any neuron can have more than one output. ... > Use inhibiting signals as well activating ones. ... > neuron will have a single input and one or more outputs. ...
    (sci.cognitive)
  • Re: Neural netss (was Re: death of the mind.)
    ... This means that any neuron can have more than one output. ... In actual biological NNs the signal eventually decays. ... Use inhibiting signals as well activating ones. ... neuron will have a single input and one or more outputs. ...
    (sci.cognitive)
  • Re: Neural netss (was Re: death of the mind.)
    ... >> This means that any neuron can have more than one output. ... >> Use inhibiting signals as well activating ones. ... >> neuron will have a single input and one or more outputs. ... >> multiple outputs that enable the topology you're looking for. ...
    (sci.cognitive)
  • Re: Access bus signal names in S-function
    ... It may turn out easier/less messy to call the m- ... access the signal names if I have a bus of many signals ... I can access the InputSignalNames from the originating ... You have to crawl back to the Bus block, ...
    (comp.soft-sys.matlab)
  • Re: Access bus signal names in S-function
    ... signals, then running a script to produce the structure ... But it's certainly possible to write an m-function to ... browse your s-function block connections in the ...
    (comp.soft-sys.matlab)

Loading