Log test data for component or model during simulation
every test case in the Signal Builder block of the
data = slvnvlogsignals(
the input signals to the Test Unit block in the harness model. If
every test case in the Signal Builder.
model_block— Component or model
The full block path name or handle to a Simulink Model block, specified as a character vector or string.
test_case_index— Indices of test cases to be simulated
Array of integers that specifies which test cases in the Signal Builder block of the harness model to simulate.
data— Output data
Structure that contains the logged data.
This example shows how to log simulation data for a Model block and use the logged data to create a harness model and visualize the data in the referenced model.
Open the directory that contains the example files.
Open the model and log the signals for the CounterB block.
open_system('sldemo_mdlref_basic'); data = slvnvlogsignals('sldemo_mdlref_basic/CounterB');
Create a harness model for
the logged data and the default harness options.
load_system('sldemo_mdlref_counter'); harnessOpts = slvnvharnessopts [harnessFilePath] = ... slvnvmakeharness('sldemo_mdlref_counter', data, ... harnessOpts);