Return array of signal indices


int xPCGetSigIdxfromLabel(int port, const char *sigLabel, int *sigIds);


Do not use this C API type definition. Support for this type definition relies on support for the C API, which will be removed in a future release.



Enter the value returned by the function xPCOpenTcpIpPort.


Character string with the name of a signal label.


Return array of signal indices.


If the function finds a signal, it fills an array sigIds with signal indices and returns 0. If it does not find a signal, it returns -1.


The xPCGetSigIdxfromLabel function returns in sigIds the array of signal indices for signal sigName. This function assumes that you have labeled the signal for which you request the indices (see the Signal name parameter of the Signal Properties Controls (Simulink)). The Simulink® Real-Time™ software refers to Simulink signal names as signal labels. The creator of the custom program already knows the signal name/label. Signal labels must be unique.

sigIds must be large enough to contain the array of indices. You can use the xPCGetSigLabelWidth function to get the amount of memory that the program must allocate for the sigIds array.

Introduced in R2007a