- 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?
15 次查看(过去 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!