How to display simulation time in the Simulink Test Manager?

11 次查看(过去 30 天)
I am testing Simulink models using Simulink Test Manager using MATLAB R2023b. Because I have set the stop time to "Inf", the simulation progress is stuck at 0%. Therefore, there is no way of knowing how far ahead in the simulation the test is.
 
Knowing the simulation time would help me determine how much time I need to wait (as I know approximately the duration) before ending the simulation.
 
Is it possible to display the current simulation time in addition to the simulation progress in the Test Manager during the simulations?

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2024-3-31
As of MATLAB R2023b there is no built-in way of viewing the simulation time in the Simulink Test Manager. 
As a workaround, you can insert a "Clock" block in the simulation to observe the simulation time, as shown in the screenshot below. You can do that following these steps:
  1. In the Test Harness, insert a "Clock" block and attach it to a "Scope" block.
  2. Double-click on the "Clock" block, and enable the "Display Time" parameter.
  3. (Optionally) Change the "Decimation" parameter to your desired time precision.
  4. Enlarge the "Clock" block.
  5. Place your Test Harness window side by side with the Test Manager such that you can observe both windows at the same time.
  6. Run the test in the Test Manager, and you can now observe the simulation time in the "Clock" block.
For more information regarding the "Clock" block, please see the following documentation page:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Results, Reporting, and Test File Management 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by