Documentation Center

  • 評価版
  • 製品アップデート

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. slvnvlogsignals records the logged data in the structure data.

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. You must generate harness_model 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

model_block

Full block path name or handle to a Simulink Model block

harness_model

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

test_case_index

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

Output Arguments

data

Structure that contains the logged data

Examples

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

  1. 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');
  2. 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);

See Also

| | |

Was this topic helpful?