Real-Time Workshop | ![]() ![]() |
Pressing the Data Archiving button of the External Mode Control Panel opens the External Data Archiving dialog box.
This panel supports the following features:
Directory Notes. Use this option to add annotations that pertain to a collection of related data files in a directory.
Pressing the Edit directory note button opens the MATLAB editor. Place comments that you want saved to a file in the specified directory in this window. By default, the comments are saved to the directory last written to by data archiving.
File Notes. Pressing Edit file note opens a file finder window that is, by default, set to the last file to which you have written. Selecting any MAT-file opens an edit window. Add or edit comments in this window that you want saved with your individual MAT-file.
Data Archiving. Clicking the Enable Archiving check box activates the automated data archiving features of external mode. To understand how the archiving features work, it is necessary to consider the handling of data when archiving is not enabled. There are two cases, one-shot and normal mode.
In one-shot mode, after a trigger event occurs, each selected block writes its data to the workspace just as it would at the end of a simulation. If another one-shot is triggered, the existing workspace data will be overwritten.
In normal mode, external mode automatically rearms the trigger after each trigger event. Consequently, you can think of normal mode as a series of one-shots. Each one-shot in this series, except for the last, is referred to as an intermediate result. Since the trigger can fire at any time, writing intermediate results to the workspace generally results in unpredictable overwriting of the workspace variables. For this reason, the default behavior is to write only the results from the final one-shot to the workspace. The intermediate results are discarded. If you know that sufficient time exists between triggers for inspection of the intermediate results, then you can override the default behavior by checking the Write intermediate results to workspace check box. Note that this option does not protect the workspace data from being overwritten by subsequent triggers.
The options in the External Data Archiving dialog box support automatic writing of logging results, including intermediate results, to disk. Data archiving provides the following settings:
dirname1
, dirname2
, and so on.
filename1
, filename2
, etc. Note that this happens automatically in normal mode.
xdata
in incremental files (file_1
, file_2
, etc.) as xdata_1
, xdata_2
, and so on. This is useful if you want to load the MAT-files into the workspace and compare variables in MATLAB. Without the unique names, each instance of xdata
would overwrite the previous one in the MATLAB workspace.
This picture shows the External Data Archiving dialog box with archiving enabled.
Unless you select Enable archiving, entries for the Directory and File fields are not accepted.
![]() | External Signal & Triggering Dialog Box | Parameter Download Options | ![]() |