I have a big model where I am logging a large number of signals. I currently use Outport blocks, then look at the data in tg.OutputLog in the workspace after stopping the simulation. However, OutputLog contains only the signal data in columns, no labels. In order to know what each column corresponds to, I have to go through my model and keep track of how the signals are ordered and bundled before ending up at the root-level outport blocks. This is difficult and tedious for a large model with muxes going into other muxes in various subsystems, and made worse by the fact hat the model is frequently being changed/updated.
Is there an easier way to figure out what the tg.OutputLog data corresponds to?
The normal Simulink signal logging functionality (where you can enable logging through a signal's properties or through the Model Data viewer) would be ideal, since signal names are included in the logged data, but this does not work for real-time since logsout is not saved -- the documentation states "the data logging variables tout, xout, yout, and logsout are available only when you use Simulink to simulate the model in non-real-time." I also know signal groups can be created and saved in the SLRT explorer but that seems to be for monitoring only, I don't see an option for logging ( documentation ).
The only other option I can think of is to have a script where I feed in a list of signal names and it adds them to file scopes (using the SimulinkRealTime.fileScope.addsignal function). However, this is still quite tedious and requires me to maintain a list separate from my model, and also the documentation states SimulinkRealTime.target.getsignalid (IDs are needed to add signals) is being deprecated in future releases.