LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

computer loses time during datalogging

When datalogging using a Dell Inspiron laptop, Labview 6.0.2, Windows 2000, NI DAQcard 1200 the computer clock runs slow (at least the clock used for file timestamping when file write vi's are called, and the windows clock are affected. I'm not sure about the time value returned by the time reading vi's). The datalogging is at high sampling rates, but in bursts of two per second, with sufficient pauses in the vi so it doesn't monopolise cpu time or anything. The clock loses perhaps 1 minute every 10 minutes, although it will jump back to the correct time periodically after an hour or so.

I have also noticed this several years ago using an earlier Dell portable with windows 95, although the time never recovered in this case - it j
ust got further and further behind.

Can anyone explain why this happens?

If it is an effect that cannot be changed, is there a simple way to refresh the windows clock from within labview.

thanks
0 Kudos
Message 1 of 3
(2,509 Views)
I found the following discussion that goes into this issue in detail. This seems to be an issue with thread priority. If a LabVIEW program takes all the CPU time, the computer cannot service the clock and you lose time. A solution is to put waits of 1 ms in all of your loops and use DAQ occurrences if you are doing data acquisition. The solutions described in the discussion deal with resetting the time after time has been lost.
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=5065000000080000007B270000&ECategory=LabVIEW.LabVIEW+General

Jeremy Braden
National Instruments
0 Kudos
Message 2 of 3
(2,509 Views)
I also read that thread but there are different issues in my case. Their solutions are to run third party software to synchronise the clock with another computer. I am using a portable computer and don't even have connection to mains power let alone LAN or internet access to other computers clocks so this is not an option. Besides, my computer DOES know what the correct time is. It periodically realligns itself, or a reboot would reset the time correctly as well, so there must be someway to read the real time. Can labview be used to read the bios clock and not the windows version?

My code has plenty of waits in it, and at least 50% of cpu time is free averaged over any 1 second period. This is not the problem.

I'm not familiar with what is meant
by DAQ occurrences but will look into it to see if it helps.

Thanks,
Steve
0 Kudos
Message 3 of 3
(2,509 Views)