You must select the Log data to workspace check box in the Scope parameters dialog box for the software to save data in the data logging MAT-files.
This procedure uses the model
sldrtex_model. To open this model,
in the MATLAB Command Window, type:
The steps in this procedure assume that you have already loaded that model and have completed the steps in Set Scope Parameters for Logging to File and Set Run in Kernel Mode Properties for Logging to File.
After you create a Simulink® model, you can enter the Data Archiving Parameters for data logging to a file:
In the Simulink Editor, on the Desktop Real-Time tab, click Prepare > Control Panel.
In the External Mode Control Panel, click the Data Archiving button.
Select the Enable archiving check box.
In the Directory text box, enter the path
to a folder on your disk. For example, if your MATLAB® working folder is named
In the File text box, enter the file name prefix for the data files to be saved. For example, enter:
The MATLAB environment names the files
data_1.mat, and so on. The number of files equals the
total sample points. For example, if you set Duration to
Total sample points, then only one file is
Select the Append file suffix to variable names check box.
Click the OK button.
In the External Signal & Triggering dialog box, click the OK button for the changes you made to take effect. You do not have to rebuild your real-time application.