With the Simulation Data Inspector and Simulink Real-Time, you can trace signal data by streaming signal data directly to the Simulation Data Inspector or by logging signal data by recording it through a File Log block. If streaming signal data directly, 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. Streaming signal data directly does not support decimation or limit data points.
To avoid dropped data points caused by network buffer overruns, you can use logging through a File Log block. When logging, 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.
Logging signal data through a File Log block supports decimation or limit data points and supports conditional block execution semantics. Some examples are logging signal data by enabling data logging for a signal inside a for-iterator, function-call, or enabled/triggered subsystem. For more information, see Simulation Data Inspectorand 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.