Documentation

slvnvlogsignals

Log test data for component or model during simulation

Syntax

data = slvnvlogsignals(model_block)
data = slvnvlogsignals(harness_model)
data = slvnvlogsignals(harness_model, test_case_index)

Description

data = slvnvlogsignals(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.

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

data = slvnvlogsignals(harness_model, test_case_index) simulates every test case in the Signal Builder block of the harness_model specified by test_case_index. slvnvlogsignals logs the input signals to the Test Unit block in the harness model. If you omit test_case_index, slvnvlogsignals simulates every test case in the Signal Builder.

Input Arguments

collapse all

The full block path name or handle to a Simulink Model block, specified as a character vector.

Name or handle to a harness model that the Simulink Design Verifier software, sldvmakeharness, or slvnvmakeharness creates, specified as a character vector.

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

Output Arguments

collapse all

Structure that contains the logged data.

Examples

collapse all

Log simulation data for a Model block. Use the logged data to create a harness model and visualize the data in the referenced model.

% Simulate the CounterB Model block, which references the
% sldemo_mdlref_counter model, in the context of the
% sldemo_mdlref_basic model and log the data:
open_system('sldemo_mdlref_basic');
data = slvnvlogsignals('sldemo_mdlref_basic/CounterB');

% Create a harness model for sldemo_mdlref_counter using the
% logged data and the default harness options:
load_system('sldemo_mdlref_counter');
harnessOpts = slvnvharnessopts
[harnessFilePath]  = ...
    slvnvmakeharness('sldemo_mdlref_counter', data, ...
    harnessOpts);

Introduced in R2010b

Was this topic helpful?