How to display simulation time in the Simulink Test Manager?

11 Ansichten (letzte 30 Tage)
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?

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 31 Mär. 2024
Bearbeitet: MathWorks Support Team am 31 Mär. 2024
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:

Weitere Antworten (0)

Kategorien

Mehr zu Results, Reporting, and Test File Management finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by