Re: Access bus signal names in S-function
- From: "Mick H" <mick.nospam@xxxxxxxxxxxxxxxx>
- Date: Mon, 7 Apr 2008 05:32:02 +0000 (UTC)
Get hold of the relevant signal lines and theirproperties,
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.
.
- Follow-Ups:
- Re: Access bus signal names in S-function
- From: Riccardo
- Re: Access bus signal names in S-function
- Prev by Date: Re: Robust Least Squares
- Next by Date: Re: simple question: how to figure out what the axes_handle property is within the grid function??
- Previous by thread: created GUI in GUIDE
- Next by thread: Re: Access bus signal names in S-function
- Index(es):
Relevant Pages
|
Loading