- Open the Test Sequence block in the test harness that is shown in Fig. 2.
- As shown in Fig. 10 below, open the "Symbols" tab and then click on the "Add data" button under the "Parameter" section.Fig. 10

- As shown in Fig. 11 below, enter "idx_observer" into the field that appears and then press the Enter key.Fig. 11

- Save your changes in the Test Sequence block and then close it.
- Back in Simulink Test Manager, follow the same workflow that you used to add a parameter to override it and you should now see the "idx_observer" parameter appear, as shown in Fig. 12 below.Fig. 12

How can I override a Test Assessment/Sequence scenario parameter in an observer model using Simulink Test Manager?
조회 수: 17 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2025년 4월 28일
답변: MathWorks Support Team
2025년 4월 29일
Consider the model shown in Fig. 1 below.

Fig. 1
Additionally, consider the test harness shown in Fig. 2 for the model shown in Fig. 1.

Fig. 2
where the Test Sequence block contains the 2 scenarios shown in Fig. 3 that are activated according to the "idx_harness" scenario parameter.

Fig. 3
I would like to run a test assessment against the "internal_signal" signal shown in Fig. 1 even though I do not want to output this signal from the model. To do this, I inserted an Observer Reference block into the model shown in Fig. 1, as shown in Fig. 4 below.

Fig. 4
The corresponding Observer model, which is obtained by double-clicking on the "Observer" block in Fig. 4, is shown in Fig. 5.

Fig. 5
The contents of the Test Assessment block shown in Fig. 5 are shown in Fig. 6.

Fig. 6
The Test Assessment block also contains 2 scenarios that are activated according to the value of the "idx_observer" scenario parameter.
I would like to activate different scenarios in the Test Sequence block shown in Fig. 2 and the Test Assessment block shown in Fig. 5 by overriding the values of the "idx_harness" and "idx_observer" parameters inside Simulink Test Manager. Specifically, consider the Simulink Test Manager window shown in Fig. 7.

Fig. 7
When I click on the "Add Parameter" button shown in Fig. 8 to add parameters to override, Simulink Test Manager only detects the "idx_harness" scenario parameter and does not detect the "idx_observer" scenario parameter, as shown in Fig. 9. How can I get Simulink Test Manager to detect the "idx_observer" scenario parameter so that I can override its value?

Fig. 8

Fig. 9
채택된 답변
MathWorks Support Team
2025년 5월 1일
This is a known limitation of Simulink Test Manager. The reason for this is that the observer model is inside its own .slx file, and so the "idx_observer" parameter is not recognized from inside the test harness.
To work around this limitation, proceed as follows:
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Inputs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!