Real-Time Windows Target |
 |
Entering Data Archiving Parameters
The Data Archiving dialog box is related to the Scope parameters dialog box. In the Scope parameters dialog box, you must select the Save data to workspace check box to be able to save data to a disk drive for two reasons:
- The data is first transferred from the scope data buffer to the MATLAB workspace before being written to a MAT-file.
- The Variable name entered in the Scope parameters dialog box is the same variable in the MATLAB workspace and the variable in the MAT-file.
If you do not select the Save data to workspace check box in the Scope parameters dialog box, the MAT-files for data logging will be created, but they will be empty.
After you create a Simulink model, you can enter the Data Archiving Parameters for data logging to a disk drive:
- In the Simulation window, and from the Tools menu, click External Mode Control Panel.
- The External Mode Control Panel dialog box opens.
- Click the Data archiving button.
- The External Data Archiving dialog box opens. This dialog box allows you to specify data archiving options.
- Select the Enable archiving check box.
- In the Directory text box, enter the path to a directory on your disk drive. For example, if your MATLAB working directory is named
mwd
, enter
- In the File text box, enter the filename prefix for the data files to be saved. For example, enter
- MATLAB names the files
data_0.mat
, data_1.mat
. . . The Number of files = Total sample points / Duration. For example, if you set the Duration = Total sample points, then only one file is created.
- Select the Append file suffix to variable names check box.
- Within each MAT-file, a variable is saved with the same name you entered in the Variable name text box (Data History pane on the Scope parameters dialog box). By selecting the Append file suffix to variable names check box, the same suffix that is added to the MAT-file is added to the variable name. For example, if you entered the variable name
ScopeData
, then within the file data_0.mat
will be a variable ScopeData_0
.
Your External Data Archiving dialog box will look similar to the figure shown below.

- Click the Close button.
- The parameters you entered are applied to your model.
Note There is no Apply button with this dialog box. You must click the Close button for the changes you make to take effect.
| Entering Signal and Triggering Properties | | Plotting Logged Signal Data |  |