Borrar filtros
Borrar filtros

Access SIMULINK simulation time while it runs.

3 visualizaciones (últimos 30 días)
Kalle el 13 de Jul. de 2014
Comentada: Kalle el 14 de Jul. de 2014
I made a simulink model and can simulate it without any problems. I made a variable called simulation_stop_time and instead of changing the simulation time manually I am changing this variable in a matlab script.
Is there a way I can access the simulation time when it goes from 0 - simulation_stop_time? I want to start some functions when the simulation time is in between start to end like this:
if simulation_stop_time > 20
signal = 1
signal = 0;
because if I try to do this, the simulation_stop_time will always be the same value and doesnt change while the simulation runs.
Is there a way to access this simulation while it runs?

Respuesta aceptada

Rashmil Dahanayake
Rashmil Dahanayake el 14 de Jul. de 2014
use clock block
  1 comentario
Kalle el 14 de Jul. de 2014
Thank you very much. I have been searching for this kinda block for a long time now. Have a great day.

Iniciar sesión para comentar.

Más respuestas (0)


Más información sobre Simulink en Help Center y File Exchange.


Community Treasure Hunt

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

Start Hunting!

Translated by