getsignalidsfromlabel

Vector of signal indices

Description

example

index_vector = getsignalidsfromlabel(target_object, signal_label) returns a vector of one or more signal indices that are associated with the labeled signal, signal_label.

Note

Signal access by signal index will be removed in a future release. Access signals by signal name instead.

Label the signal for which you request the index by using the Simulink® Signal name parameter. You must apply a unique label. That is, only one signal has the label signal_label.

The Simulink Real-Time™ software refers to Simulink signal names as signal labels.

Examples

collapse all

Get the vector of signal indices for a signal labeled 'fourth' in model ex_slrt_sf_car.

tg = slrt;
index_vector = getsignalidsfromlabel(tg, 'fourth')
index_vector =

     1

Input Arguments

collapse all

Object that represents the target computer. Before calling this function, make sure that you start the target computer with the Simulink Real-Time kernel and apply the required Ethernet link settings.

Example: tg

You must explicitly assign the signal label. The signal name is not a signal label.

Output Arguments

collapse all

Vector that contains indices from the Signals property of the real-time application.

Introduced in R2014a