With the Simulation Data Inspector and Simulink Real-Time, you can trace signal data with data logging in immediate mode or log signal data with data logging in buffered mode. In immediate mode, you view the output in real time as the application produces it.
The application can produce more data than the target computer can transmit in real time to the development computer. Data accumulates in the network buffer, and, if the buffer fills up, the RTOS drops data points.
To avoid dropped data points caused by network buffer overruns, you can use buffered logging mode. In buffered mode, you connect signals to File Log blocks in the model. In the real-time application, these blocks store data for the buffered signals on the target computer. At the end of execution, the real-time application transmits the data to the development computer for display in the Simulation Data Inspector. You can then view the most important signals immediately and view the buffered signals afterward.
Buffered logging mode supports decimation and conditional block execution semantics. Some examples are logging buffered data by enabling data logging for a signal inside a for-iterator, function-call, or enabled/triggered subsystem. For more information, see Simulation Data Inspector and How Application is Run Affects Signals Logged.
To set up the model for logging signal data:
MuxOut output signal, place your cursor over the
signal, and select Enable Data Logging.
Double-click the File Log block. The Decimation value is 1.
To set up the Simulation Data Inspector:
Open the Simulation Data Inspector ().
Click Layout ().
Select two horizontal displays.
To view the simulation data:
Build and download
Start real-time execution.
When the Simulation Data Inspector button glows , click the top display and select the
Sum output signal.
Click in the bottom display and select the
Stop real-time execution.
Sum output appears, click Fit to
To zoom in on a time segment of interest, for example, 10.0–10.1 s, click Zoom in Time () and use the mouse and mouse wheel.
To save the Simulation Data Inspector session as an MLDATX file, click Save.