Main Content

sldvlogsignals

Log simulation input port values

Description

data = sldvlogsignals(model_block) simulates the model that contains model_block and logs the input signals to the model_block block. model_block must be a Simulink® Model block. sldvlogsignals records the logged data in the structure data.

example

data = sldvlogsignals(harness_model) simulates every test case in the harness_model and logs the input signals to the Test Unit block in the harness model. Generate harness_model by using Simulink Design Verifier™ analysis, sldvmakeharness, or slvnvmakeharness (Simulink Coverage).

data = sldvlogsignals(harness_model, test_case_index) simulates every test case in the Signal Editor block of the harness_model that specifies the test_case_index. sldvlogsignals logs the input signals to the Test Unit block in the harness model. If you omit test_case_index, sldvlogsignals simulates every test case in the Signal Editor.

Examples

collapse all

Use logged signals to create a harness model to visualize the data.

Simulate the CounterB Model block, which references the sldemo_mdlref_counter model, in the context of the sldemo_mdlref_basic model. Then log the data:

openExample('sldemo_mdlref_basic');
data = sldvlogsignals('sldemo_mdlref_basic/CounterB');

Create a harness model for sldemo_mdlref_counter model by using the logged data and the default harness options:

load_system('sldemo_mdlref_counter');
harnessOpts = sldvharnessopts;
[~, harnessFilePath]  = ...
    sldvmakeharness('sldemo_mdlref_counter', data, harnessOpts);

Input Arguments

collapse all

Full block path name or handle or Simulink.BlockPath object to a Simulink Model block.

Name or handle to a harness model that the Simulink Design Verifier software, sldvmakeharness, or slvnvmakeharness (Simulink Coverage) creates.

Array of integers that specifies the test cases in the Signal Editor block of the harness model to simulate.

Output Arguments

collapse all

Structure that contains the logged data.

Version History

Introduced in R2010b