My Simple model does not run when my time is set to 10 seconds

조회 수: 2 (최근 30일)
Jorje German
Jorje German 2020년 9월 8일
댓글: Jorje German 2020년 9월 9일
I have a stop time of 10 seconds but it doesn't seem to actually leave the 0 sec position. First time ever using simulink, what am I doing wrong.

채택된 답변

stozaki
stozaki 2020년 9월 9일
Hello Jorje,
Probably because the sample time value in your constant block is the default value.
The constant block sample time defaults to inf. The default value of inf indicates that the block output can never change. This setting speeds simulation and generated code by avoiding the need to recompute the block output.
If you want to get the output of the Constant block at each sample time, set the sample time of the Constant block explicitly to the sample time.
In the previous Scope block, the sample time of the Scope block was set to 1 second, so it continuously observed 1.
Regards,
stozaki
  댓글 수: 4
stozaki
stozaki 2020년 9월 9일
Hi Jorje,
Change the setting of the Scope block to display a straight line.
See the Scope block documentation for details : Scope
Jorje German
Jorje German 2020년 9월 9일
OMG thank you very much. This whole online learning has taken me by surprise. These programs can cause headaches when its a simple setting that needs changing. Thank you

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by