Capture signal data in your test results by adding signals to the Simulation Outputs section of the test case. Each output is called a logged signal. Signals listed in Simulation Outputs appear in the test results along with signals that are already selected for logging in Simulink®.
You can use logged signals for data comparison in baseline criteria, equivalence criteria,
custom criteria, and for data visualization in the Simulation Data Inspector. Logged signals
enable you to further test your Simulink model without changing the model. In addition to signals from the top model,
you can also log signals from subsystems and model references. You can select signals
associated with local and global data store memory, and from data store memory that uses a
To add signals:
Open the model
In the Test Manager, under Simulation Outputs, click Add.
In the system under test, highlight blocks or signals that you want to log. To select multiple items, click and drag a selection box over multiple items.
A dialog box appears. Select signals in the dialog box.
Continue adding signals to the test case. Each time you select a signal, the dialog box also shows previously logged signals. You can remove a signal from logging by clearing the selection.
The signals appear in the Logged Signals table in the test case.
To add a signal set, click the Add arrow and select Signal Set.
To specify a specific plot for a signal, enter a number in the Plot Index column. By default, the signals appear on one plot.
You can specify to display the plot immediately after running the test by selecting the Plot signals on the specified plots after simulation check box.
After you run the test, the logged signals appear in the test case results under Sim Output. Select each signal to display on the plot. If you specify a plot index, the signal appears in the plot number you specified.
Perform similar steps to add simulation output associated with data store memory:
Open the model
sldemo_mdlref_dsm, which contains local and
global data store memory.
In a test case, from the top model, add the Sine Wave block for logging.
Click on the Data Store Read block in the top model. Click on
the click to update diagram box. The dialog box displays
the signal associated with the block and the data associated with the
Simulink.Signal object in the base workspace. The model
displays the signal storage class for the block,
Select both signals in the dialog box.
Double-click the model reference
open it, and then open the subsystem
PositiveSS. Select the
Data Store Write block. The table displays the input signal
from the Gain block and the data store memory,
RefSignalVal data store memory for logging. The
dialog box uses a different icon to indicate the data store memory.
Finish selecting signals by clicking Done in the Test
Manager window. In the Test manager, the signals appear under Logged
Signals. The Source column displays the full
path information for each signal. For the signal associated with the
Simulink.Signal object, Source displays
the workspace location of the