Signal Logging with MATLAB
To log signal values and times, mark signals for logging with the Simulation Data Inspector or add a File Log to your model.
A File Log block collects signal data on the target computer that is sent to the development computer after each simulation run. Or, if the target computer is not connected to the development computer, you can upload the data to the development computer when you connect to the target computer.
Objects
Target | Represent real-time application and target computer status (Since R2020b) |
Target.FileLog | Target Computer file logger (Since R2020b) |
Instrument | Create real-time instrument object (Since R2020b) |
slrealtime.instrument.LineStyle | Create real-time instrument LineStyle object (Since R2022b) |
Functions
discard | Delete file log data from target computer (Since R2020b) |
list | Get information about available file logs of signal data (Since R2020b) |
import | Import file log data from target computer (Since R2020b) |
openImportDialog | Get information about available file logs of signal data (Since R2023b) |
slrealtime.fileLogImport | After copying file logs from the target computer to the development computer, import file logs into Simulation Data Inspector (Since R2021a) |
slrealtime.fileLogList | After copying file logs from the target computer to the development computer, list available file logs for import into Simulation Data Inspector (Since R2021a) |
startRecording | Starts signal data live streaming and File Log logging (Since R2022a) |
stopRecording | Stops signal data live streaming and File Log logging (Since R2022a) |
Topics
Background
- Real-Time Signal Logging and Streaming Basics
Acquire signal data while running a real-time application and transfer the data to the development computer for analysis. - Real-Time Signal Logging and Parameter Tuning
This example shows how to use real-time parameter tuning and data logging with Simulink® Real-Time™.
MATLAB Interface
- Target and Application Objects
Use the MATLAB® Command Window to change properties and control the target computer and your real-time application. - Instrumentation Apps for Real-Time Applications
Interface with your real-time application by using instrument panel apps.
Limitations
- Troubleshoot Signals Not Accessible by Name
Investigate issues for some signal types prevent file logging or streaming. - Internationalization Issues for Simulink Real-Time
Learn about Simulink® Real-Time™ support for internationalization.
Troubleshooting
Troubleshooting in Simulink Real-Time
Troubleshoot problems that you encounter while using the Simulink Real-Time product