Prev: how to input and output wav files in Spectral subtraction
Next: changing location of point on an image
From: Marco on 26 Feb 2010 05:30 I have developed a GUI for an xPC Target model. It is based on timer objects to update displays and read host scope on target for data logging. On some PCs i had a problem. Sometimes all timers freeze up for an amount of time (some minutes) and then restarts to works. I tried to develop a small test application, with just two timers and some debug disp(), and i observed the same behavior. The cause seems to be that my PC has a very unprecise clock, and system goes faster than needed (gains about 2 minutes every half hour), and there is some mechanism that put back system time to resyncronize it. It seems that Matlab Timer object looks at system time to trigger callbacks, soi when system clock is put back, timers locks. As further verification, i put back my system time manually, and verified the same problem. So may question is: there is a way to not use system time for triggering timers?
From: Steven Lord on 26 Feb 2010 10:17
"Marco " <francociccio(a)hotmail.com> wrote in message news:hm87ru$g69$1(a)fred.mathworks.com... >I have developed a GUI for an xPC Target model. It is based on timer >objects to update displays and read host scope on target for data logging. > On some PCs i had a problem. Sometimes all timers freeze up for an amount > of time (some minutes) and then restarts to works. > > I tried to develop a small test application, with just two timers and some > debug disp(), and i observed the same behavior. The cause seems to be that > my PC has a very unprecise clock, and system goes faster than needed > (gains about 2 minutes every half hour), and there is some mechanism that > put back system time to resyncronize it. > > It seems that Matlab Timer object looks at system time to trigger > callbacks, soi when system clock is put back, timers locks. > As further verification, i put back my system time manually, and verified > the same problem. > > So may question is: there is a way to not use system time for triggering > timers? I would suggest that a better solution would be to figure out what's wrong with your system clock (gaining 4 minutes an hour is pretty bad!) and fix or replace it. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ |