Constant block value change during simulation

5 visualizaciones (últimos 30 días)
Ege Can Koçak
Ege Can Koçak el 9 de Oct. de 2020
Comentada: Ameer Hamza el 9 de Oct. de 2020
Hello everyone,
I am very new to MATLAB/Simulink. I have designed a complex Simulink model. In my model there are too many function blocks and constant blocks and all of them linked together. One of my constant block is "time" value and my model is using this time value in many function box. However, I want to see the change over time during my simulation, since my time variable is constant, I cannot see what is happening at the certain time at the simulation. My question is, how can I set this constant time block as increase over time during simulation? Or do you have any other suggestion to that as a solution for my problem ?
  1 comentario
Sudhakar Shinde
Sudhakar Shinde el 9 de Oct. de 2020
Which blocks you are using for visualization? Are you using scope block?
You can check firstly, 'signal logging' / Data logging concept and visualize looged data using Data inspector.
These may help you for better way to log output/input and view.
Then coming to the constant block, if possible can you share model example?

Iniciar sesión para comentar.

Respuestas (1)

Ameer Hamza
Ameer Hamza el 9 de Oct. de 2020
Why not directly use the clock block to get time: https://www.mathworks.com/help/simulink/slref/clock.html.
  2 comentarios
Ege Can Koçak
Ege Can Koçak el 9 de Oct. de 2020
Yes that worked actually. I have tried several different ways to do it. Thanks !
Ameer Hamza
Ameer Hamza el 9 de Oct. de 2020
I am glad to be of help!!!

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by