User`s guide
getsignalid
14-51
14getsignalid
Purpose Get signal index or signal property from signal list
Syntax MATLAB command line
getsignalid(target_object, 'signal_name')
tg.getsignalid('signal_name')
Arguments
Description getsignalid returns the index or name of a signal from the signal list, based
on the path to the signal name. The block names must be entered in full and
are case sensitive. Note, enter for
block_name the mangled name that
Real-Time Workshop uses for code generation.
Examples Get the signal index for the single signal from the Simulink block Gain1.
getsignalid(tg, 'Gain1') or tg.getsignalid('Gain1')
ans = 6
See Also xPC Target target object method getparamid.
xPC Target M-file demo scripts listed in “xPC Target Demos” on page 5-8.
Troubleshooting chapter question “Why Does the getparamid Function Return
Nothing?” on page 12-25.
target_object
Name of an existing target object.
signal_name
Enter the name of a signal from your Simulink
model. For blocks with a single signal, the
signal_name is equal to the block_name. For
blocks with multiple signals, xPC Target appends
S1, S2 ... to the
block_name.