필터 지우기
필터 지우기

How can I stop a Test Case on the last step instead of waiting for the Stop Time?

조회 수: 6 (최근 30일)
I am using Simulink Test, with test cases in the Test Manager. For each Test Case, I have calculated the time is should take to complete the test and added an extra 60 seconds. I am using this time as the Stop Time which is situated in the Test Manager under System Under Test > Simulation Settings Overrides section.
The extra 60 seconds is used to record the behaviou of our product during a failed Test Case. However, if our product passes the test and completes all steps without failure, the test case will still wait the extra 60 seconds.
Is there a way to stop the test when the Test Case reaches the last step, instead of waiting for the remaining Stop Time to run down? If we can stop the test once it reaches the last step this will significantly reduce our overall testing time.
Thanks in advance.

답변 (1개)

Zaid Jilani
Zaid Jilani 2022년 10월 4일
You can generate a non-zero output from Test Sequence block when a specific state is reached and feed this to the 'Stop Simulation' block so you can stop the simulation.
You can refer to Answers section of the following MATLAB Answer for more information:
https://www.mathworks.com/matlabcentral/answers/248732-how-to-stop-simulation-in-test-sequence-block
  댓글 수: 1
Thomas Edmonds
Thomas Edmonds 2022년 11월 2일
Thank you for the answer, but we are running real time tests and this is not working. Are they any other suggestions/way we can achieve this?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Inputs에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by