How to update variant subsystem in Test Sequence?

8 visualizaciones (últimos 30 días)
Xiang Wang
Xiang Wang el 1 de Abr. de 2022
Respondida: Rajanya el 4 de Sept. de 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.

Respuestas (1)

Rajanya
Rajanya el 4 de Sept. de 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.

Categorías

Más información sobre Component-Based Modeling en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by