Constant block value change during simulation

조회 수: 5 (최근 30일)
Ege Can Koçak
Ege Can Koçak 2020년 10월 9일
댓글: Ameer Hamza 2020년 10월 9일
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
Sudhakar Shinde
Sudhakar Shinde 2020년 10월 9일
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?

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

답변 (1개)

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

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by