How to update variant subsystem in Test Sequence?

8 visualizzazioni (ultimi 30 giorni)
Xiang Wang
Xiang Wang il 1 Apr 2022
Risposto: Rajanya il 4 Set 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.

Risposte (1)

Rajanya
Rajanya il 4 Set 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.

Categorie

Scopri di più su Component-Based Modeling in Help Center e File Exchange

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by