LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

counter innacuracy

I am using a counting function in labview and I want to count for 10 seconds but the timer stops at like 10.04 seconds. what could be causing this?
0 Kudos
Message 1 of 4
(2,551 Views)
If you are using a built in software timing funtion, then you should be glad that you are getting this level of accuracy. System clocks in Windows are said to have an accuracy of 55 milliseconds, which probalby explains your error. If you want more precise timing, unfortunately this means a hardware solution.
0 Kudos
Message 2 of 4
(2,551 Views)
This inacuracy is a "feature" of all non-Real-Time operating systems. The error you cited is on the order of 40 ms. This is not bad. I have bench marked the timer functions on Windows platforms and found them to vary drastically when working in the sub second arena.

If you need determinism (the ability to specify when in time an event should occur) you will have to implement a hardware solution (i.e. configure some DAQ board to use its on-board clock to start and stop something) or move to an RT environment.

In LV-RT I have managed to pull off determistic loops with jitter less than 1 ms using timer functions, and sub-micro-second jitter using hardware timing.

Summing up.
Asking for 10 seconds and getting 10.04 is pretty good.

I hope this helps,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 4
(2,551 Views)
Labviewguru wrote in news:506500000005000000E7860000-
1023576873000@exchange.ni.com:

> Windows are said to have an accuracy of 55 milliseconds, which

That was Windows 3.x and older, and it was the resolution of the timer.

Now the resolution is better (in labview it is 1 ms) but the accuracy is
not 1ms, because of the nature of a multitasking OS.
0 Kudos
Message 4 of 4
(2,551 Views)