| xPC Target™ | ![]() |
MATLAB® command line
getsignalid(target_object, 'signal_name')
tg.getsignalid('signal_name')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, the xPC Target™ software appends S1, S2 ... to the block_name. |
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.
Get the signal index for the single signal from the Simulink block Gain1.
getsignalid(tg, 'Gain1') or tg.getsignalid('Gain1')
ans = 6xPC Target target object method getparamid.
xPC Target M-file demo scripts listed in xPC Target™ Demos.
Troubleshooting chapter question Why Does the getparamid Function Return Nothing?.
![]() | getsignal | getsignalidsfromlabel | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |