User`s guide
getsignalid
6-28
6getsignalid
Purpose Get the signal index or property name from the signal list
Syntax MATLAB command line
getsignalid(target_object, ’block_name’)
getsignalid(target_object, ’block_name’, ’flag’)
Arguments
Description Method of a target object. 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.
Examples Get the property name for the parameter Gain in the Simulink block Gain1.
getsignalid(tg, ’Gain1’) or tg.getsignal(’Gain1’)
ans = S6
Get the property index for the parameter Gain in the Simulink block Gain1.
getsignalid(tg, ’Gain1’, ’Gain’, ’numeric’)
ans = 6
S6 is a property of the target object. For example, you could get the value of a
signal with
signal_6 = tg.s6.
See Also The target object method getparamid. The xPC target M-file demo scripts
listed in “xPC Target Demos” on page 5-21.
target_object Name of an existing target object.
block_name Name of a Simulink block from you model.
flag If flag = property, then return the property name
for the signal. If flag = numeric, then return a
number index. This argument is optional with the
default behavior to return a number.