LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Latency

Hi All
 
In my application , i have to acquire the data continuously. I am using NI USB 8451 card (SPI comm.) with the clock rate of 1 MHz. I am using Labview 8.0
 
I am acquire the data in while loop with the delay of 1 ms. My question - Can i use wait function with the delay of 1 ms .One of my collegue told me that it will adversely effect the Windows and the system may crash. In my PC , Windows XP professional is installed. 
 
If i will use delay of 1 ms second , will i am be able to read the data consistently after each 1 ms or it may vary . Please explain.
 
Also expalin the minimum latency with the Windows operating system specially Windows XP professional . Alos with whch OS version we can get the minimum latency with consistency.
 
It will be fine if somebody sends the link or some documents on this issue.
 
Regards
J
0 Kudos
Message 1 of 3
(3,058 Views)
Try the timed loop. Real TIme (RT) is the only way to get exact timing results.
0 Kudos
Message 2 of 3
(3,040 Views)
If your just collecting data, then you only need to collect data often enough to avoid overflowing the buffer (and the buffer size should only be limited by your memory, so you could have buffers several minutes long). And if windows doesn't respond to a request within a couple minutes you probably have some other far more serious problem. In my project I have a 10 second buffer that's never overflowed (it'd be bigger but in my case the buffer memory isn't in the computer).

But Windows offers no guaranties on latency, and neither does any other typical Desktop OS (Well Linux just added some kernel support a couple days ago, but that's not going to help you). That's what real time OSes are for, but if your just collecting data a RTOS is probably complete overkill.

Unless you fool around with priorities (or have a messed up system),  windows wont crash from 1 ms delays because it will just delay you longer if it needs to (and likely will do that quite often at 1 ms).

If you want to avoid latency.  Do your data acquisition (or other time critical work) in a separate loop from the rest of your code, and if possible run on a multicore system (these will help a lot).

Short Answer: Use a buffer and make sure it's big enough.
0 Kudos
Message 3 of 3
(3,016 Views)