MATLAB: How to log incremental data with Real-Time Windows Target 3.6 (R2010b)

dataduringincrementalloggingnormalone-shotreal timeruntimetargettriggerwindows

I am running a model in Real-Time Windows Target for data collection. To be sure that I do not lose all gathered data in case of a System Crash I would like to save the data during the runtime of the model.

Best Answer

This can be done with Real-Time Windows Target.
Look at the attached model for the exact steps:
1. Open the model
2. Tools --> External Mode Control Panel
2.1. Signal & Triggering ...
--> Take a look at the settings here
2.2. Data Archiving ...
--> Take a look at the settings here
Adjust the path according to your system.
Note that the data needs to be saved to a subfolder of the working directory.
The Scope1 is only there for triggering.
In addition the Scopes of which you want to log the data need to be configured accordingly:
Open the Scope --> Parameters --> Data History --> Save Data to Workspace ...
This will result in MAT-files with incremental suffixes.
Each MAT-file contains the scopedata of the corresponding trigger. If you open the MAT-files you will see the data in the MATLAB workspace with the according suffixes.