How to update variant subsystem in Test Sequence?
8 ビュー (過去 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 で Component-Based Modeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!