Is it possible to view a signal in "Display" block in real time durring simulation?

 採用された回答

Zack Peters
Zack Peters 2015 年 9 月 1 日

0 投票

Hi Matico,
A few ways you can do this.
1.) The easiest is using the display block as you have already eluded to above
2.) Turn on port value display
3.) Finally if you are looking to visualize the changes in the signal over time, you can add a scope block to your model

5 件のコメント

matico
matico 2015 年 9 月 1 日
I still have problems. All methods show only the last value at the end of simulation. They don't show intermediate values during simulation - as if I step forward step-by-step.
Also, how can I make simulation longer? Now, I have start time in configuration parameters set to 0.0 and stop time to 1. Does that mean that the simulation lasts for 1 second? How can I make simulation to lasts 10 seconds?
Thanks
Walter Roberson
Walter Roberson 2015 年 9 月 2 日
scope blocks should definitely show output as you are running, updated at every time step. By default scope blocks have a limit on the number of points retained, but you can configure the block for infinite retention.
matico
matico 2015 年 9 月 2 日
Yes, both 1. and 2. method you suggested now work. They didn't work because I have set both "stop time" and "time step" to 1.
Can you describe what exactly does "time step" mean? What unit is used here? If those numbers are seconds, then simulation should last for 10 seconds, if I set "stop time" to 10. And probably, if "time step" is set to 1, there should be 10 intermediate calculations during simulation. Am I missing something here? Thanks
Walter Roberson
Walter Roberson 2015 年 9 月 2 日
Seconds, but there are some special meanings for some values. http://www.mathworks.com/help/simulink/ug/types-of-sample-time.html
matico
matico 2015 年 9 月 2 日
Thank you, Walter.

サインインしてコメントする。

その他の回答 (0 件)

製品

タグ

質問済み:

2015 年 9 月 1 日

コメント済み:

2015 年 9 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by