I am using the C-API feature of Real-Time Workshop 6.0 (R14) to interface an external signal monitoring application with particular signals in my model. These signals emanate from a Subsystem block at the top-level of the model, where I have named them appropriately and set their storage class to "ExportedGlobal". When I generate C-API code for the model, the "rtBlockSignals" structure in the model_capi.c file does not include the names of the signals. Instead, the "signalLabel" field is populated with "NULL" as shown below:
/* Block output signal information */ static const rtwCAPI_Signals rtBlockSignals[] = { /* addrMapIndex, sysNum, blockPath, * signalLabel, portNumber, dataTypeIndex, dimIndex, fxpIndex, sampTimeIndex */ {0, 0, "model/Subsystem/Gain", "NULL", 0, 0, 0, 0, 0}, { 0, 0, NULL, NULL, 0, 0, 0, 0, 0 } };
Best Answer