LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daq-card

Hi,

I want to aquire data with a PCI-6023 card from NI and write them with
time stamps to a file. The problem is that the coordination of time
stamp to the acquired data must be very exact.
For the realization I used a counter which I initialized at the
beginning of the acquisition to the actual system-time. I set the
samplerate for the "AI start.vi" to 10 (per second) and incremented the
counter by 1 second after the "AI read.vi" read 10 samples.
Since the PCI-card uses a 20MHz oscillator I thought that my counter had

an accuracy of 50 ns. I tested my program for several hour and noted
that after 3 hours the difference between my counter and the system-time

had grown up to 400 ms. Since I want to aquire data over a periode of 24

hours the inaccuracy at the
end would be more the 3 seconds........

I hope this explanation of my problem is not too circumstantial, so that

somebody could tell me, want's wrong with my considerations.

thanks,
hans
0 Kudos
Message 1 of 2
(2,312 Views)
One of the problems is that most companies do not guarantee the accuracy of the PC clock. The more likely thing is that the timing is being done by the PC and with the way Windows multitasking is done, you can not guarantee how long a task will take. Any task can take up to 100ms (worst case).

The better plan here might be to set up a loop with Wait ms Multiple.vi in the loop to let the loop run every 100 ms or so (10 per second). Use the loop to get the system time and then trigger a single data acquisition. This way the amount of time that you are off by should be fairly constant (and not grow over time). If you can work out a way to measure the difference, then you could subtract it from the system time.

Rob
0 Kudos
Message 2 of 2
(2,312 Views)