Timer object does not work in compiled standalone executable

조회 수: 2 (최근 30일)
hw
hw 2013년 7월 1일
댓글: Li 2015년 1월 4일
I've written a simple code as below to try out the timer object:
T = timer('Period', 0.25, 'ExecutionMode','fixedRate','TasksToExecute',100,'TimerFcn','disp(1);');
start(T);
The code works in Matlab but does not work after compiling it to a standalone executable using mcc function. The exe file runs and displays '1' once then the window is closed. Any idea what is the error?
Thank you.

답변 (2개)

Feng
Feng 2014년 11월 27일
I have got the same problem. Can anyone explain it here?
  댓글 수: 2
hw
hw 2014년 12월 10일
My problem was solved last time. Can't rmr the exact detail but the I rmr it's sort of because the compiled .exe application ended before the timer actually started. You can see if adding some delay (using the sleep function) before the end of program helps or not.
Li
Li 2015년 1월 4일
Can you show us sample code?Thanks.

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


Li
Li 2014년 12월 29일
I have met the same ploblem too.Can anyone help us?

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by