How to update variant subsystem in Test Sequence?

8 Ansichten (letzte 30 Tage)
Xiang Wang
Xiang Wang am 1 Apr. 2022
Beantwortet: Rajanya am 4 Sep. 2024
I am using Variant Subsystem in my model and it is controlled by a parameter, e.g.
variant 1 when Build_Variant ==0;
variant 2 when Build_Variant ==1;
The question is that in a single Simulink test harness with Test Sequence, is that possible to control and test the switching of two vairants for different senarios in Test Sequence?
Many thanks in advance.

Antworten (1)

Rajanya
Rajanya am 4 Sep. 2024
I understand that you want to automate the testing of your subsystems by using the ‘test sequence’ block to switch between the subsystems dynamically in a single test harness. However, to the best of my knowledge, such dynamic switching of subsystems based on a signal or parameter output is not supported in Simulink as it works with workspace variables which are modified only after the simulation ends.
As a workaround, you can try using logic and conditional blocks with the output signal of the ‘test sequence’ to activate the desired subsystems based on the state/step changes in any scenario of the ‘test sequence’ block. Although this would not be a ‘variant subsystem’ test harness but would be sufficient to test the working of all the subsystems automatically.
Please refer the following documentation for more information on ‘Variant Control Switch’ -
Hope this helps.

Kategorien

Mehr zu Component-Based Modeling finden Sie in Help Center und File Exchange

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by