xPC Target | ![]() ![]() |
Get the signal index or property name from the signal list
Syntax
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.
![]() | getscope | load | ![]() |