Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample rate problem with USB-6009 using VI-Logger

I am using a USB-6009 and an USB-9211 with VI-Logger.   The problem is that the sample rate of the USB-6009 is wrong.  My original one sampled slow by a factor of 1.0044 relative to the PC clock  whereas the USB-9211 is exactly on.  This causes an ever increasing time error in the 6009 amounting to many second after just a couple of hours of data.  NI support tried to help, with no positive result.  They finally declared the 6009 to be bad and replaced it.  The replacement is slow by a factor of 1.0064, worse than the original:  For example: after about 2.5 hours (8847 seconds, actually) the indicated time in the 6009 VI-Logger window is lagging behind the PC clock by 56 seconds!  I have repeated this on two different computers.

Does anyone have any idea what might be going wrong?  I am setting the VI-Logger task up to continuously record 1 sample, twice per second.

0 Kudos
Message 1 of 2
(3,019 Views)
This sounds like a software timing problem.

You are probably doing this on the 6009:

1. Read a sample
2. Sleep 5 seconds
3. Repeat

Reading the sample is taking time in your program that you need to account for. You need to do this. I imagine the code for the 9211 is doing things this way:

1. Read a sample
2. Check the system time
3. Sleep a calculated amount of time until the next sample time
4. Repeat

Message Edited by 280Z28 on 04-08-2006 05:48 PM

Message Edited by 280Z28 on 04-08-2006 05:50 PM

0 Kudos
Message 2 of 2
(2,953 Views)