How to update variant subsystem in Test Sequence?
4 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Rajanya
2024-9-4
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Outputs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!