Main Content

Set External Mode Data Archiving Parameters

You must select the Save 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:


It assumes that you have already loaded that model.

After you create a Simulink® model, you can enter the Data Archiving Parameters for data logging to a file:

  1. In the Simulink Editor, on the Desktop Real-Time tab, click Prepare > Control Panel.

  2. In the External Mode Control Panel, click the Data Archiving button.

  3. Select the Enable archiving check box.

  4. In the Directory text box, enter the path to a folder on your disk. For example, if your MATLAB® working folder is named mwd, enter

  5. 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_0.mat, 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 created.

  6. Select the Append file suffix to variable names check box.

  7. Click the Close button.

Related Topics