Hi all, Here I am using "after(0.025, sec)" in statechart for generating pulse, but when it wached on scope,its generating at 0.03, why is the difference. Can any help me how to make exact at 0.025.

댓글 수: 3

Gerd
Gerd 2011년 6월 15일
Hi Murali,
what is the update interval of your simulink model. How did you manage to have the 0.025sec?
Gerd
Arnaud Miege
Arnaud Miege 2011년 6월 15일
Also, how often does your chart update?
Murali Mohan
Murali Mohan 2011년 6월 17일
sample time provided for the model is 0.01

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

 채택된 답변

Gerd
Gerd 2011년 6월 17일

0 개 추천

Hi Murali,
using a sample time of 0.01s for your model lets you only generate pulses with a multiple of the basic sample time(0.01 / 0.02 / 0.03) If you want to generate a pulse of 0.025 you have to increase your sample time to e.g. 0.001s
Gerd

댓글 수: 3

Murali Mohan
Murali Mohan 2011년 6월 17일
Thans Gerd,
I am tried with your ans, but still the same.
Pls refer stateflow example of "sf_abstemporal_basic.mdl" present in matlab. change the step time to 0.1 to 0.01 In chart "WithAbsoluteTime":make the transition as "after(0.025,sec)" Observed result is generating the pulse @0.03sec, can any one explains why? how to get the exactly at 0.025.
Let me know if any details required
Gerd
Gerd 2011년 6월 17일
Murali,
please open the model.
Double click on the upper chart "With absolute Time".
Change the transition to "After(0.025,sec)".
Hit Ctrl+E. Change the fundamental sample time to 0.001.
Open the scope and open Parameter pane. Go to "History".
Deselect Limit data points to last.
Run the model and observe the result.
I did these steps and the result is Ok
Murali Mohan
Murali Mohan 2011년 6월 17일
Thanks Gerd for your reply :)

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Decision Logic에 대해 자세히 알아보기

태그

질문:

2011년 6월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by