フィルターのクリア

Using scenarios in test assessment blocks within an observer

5 ビュー (過去 30 日間)
Gerben Erens
Gerben Erens 2022 年 7 月 13 日
回答済み: Swetha Murali 2022 年 7 月 20 日
The example works fine and does what I expect it to do, but now I want to have a synced scenario between the test sequence and the test scenario block. But because the blocks exist in different models I can not use the parameter I would normally use for this. How can I have the test sequence and test assessment scenarios synced when using an observer?
  1 件のコメント
Pat Canny
Pat Canny 2022 年 7 月 14 日
Just to clarify - are you using a Test Sequence block to manage test scenarios? I wasn't sure what you meant by "test scenario block".
Are you attempting to do something like the workflow described in this example, only within an Observer? https://www.mathworks.com/help/sltest/ug/define-test-sequence-scenarios-in-test-sequence-editor.html

サインインしてコメントする。

回答 (1 件)

Swetha Murali
Swetha Murali 2022 年 7 月 20 日
I think using Simulink.Parameter that maps to the Scenario Parameter will allow you to use synchronize scenarios across models. Here is an example screenshot of a Test Sequence in the main model (Left image) using the parameter "ChangeScenario" and the Assessment block in the Observer (Right image) that also uses the same parameter for switching scenarios for assessment.
ChangeScenario was defined using the following command on the MATLAB Command line:
ChangeScenario = Simulink.Parameter(1);
ChangeScenario.Value = 1; % Scenario_1
ChangeScenario.Value = 2; % Scenario_2
Changing the value of the parameter will impact both models and help synchronize scenarios.

カテゴリ

Help Center および File ExchangeInputs についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by