| Contents | Index |
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 Simulink Coder 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 = 6
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |