Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

BeginMemoryOptimizedReadWaveform AnalogInCallback Timing Errors

With respect to requested sample rate, VS actual sample rate.

 

For example, lets say that i request 1000 samples with a rate of 1000 samples/second.  The sample should cover a period of 1 full second.  If i measure an accelerometer at 15 HZ on a calibrated vibration shaker, i recieve back approximatly 9 full sinusoids, instead of 15.  I have verified the speed of the shaker with a seperate system, and also a strobe.   I Have placed code to time the interval between the analog callbacks and it is on the order of 605 ms +/- 1 ms per analog callback.  The strange thing is that i still recieve back 1000 samples, except its at a rate of 1652 HZ (because i am recieving approx 9 cycles instead of 15).  Is there an error in the sample project?  Am i misapplying this example?  Is there a driver error in the .NET SDK?

 

Its as if the driver is 'scrunching' the measurments into a 605ms window instead of the full second.

 

This problem can be reproduced using the example named ...NI-DAQ\Examples\DotNET4.5\Analog In\Measure Acceleration\ContAccelSamp_IntClk_AnlgStart\VB

 

-Comment out the triggering.

-Set rate and nSamples to 1000 (FYI nSamples input is actually hard coded at 1000 in the example)

-Run and continuous aquisition begins.

 

I need to aquire continuous data, seemless if possible, in 1 second long blocks for the application i have.  Please help.

 

Additional values to show the timing can be placed in AnalogInCallback are shown in the attached rich text file.

 

Computer:  64 Bit windows 7 professional, niDAQ mx version 14.1

 

I have also reproduced on a 32 bit system.

0 Kudos
Message 1 of 3
(5,103 Views)

Hardware is:

cDAQ 9174 - 4 slot compact Daq USB

Slot1:    NI9207  (8 channel voltage, 8 channel current)

Slot2:    NI9235  (8 ch 1/4 bridge)

Slot3:    Empty

Slot4:    NI 9234 (4 ch IEPE accelerometer)

0 Kudos
Message 2 of 3
(5,094 Views)

Hi Alan,

 

The 9234 has a minimum sampling rate of 1.652kS/s, which is probably what you're seeing.  This is shown on page 18 here:

http://www.ni.com/pdf/manuals/374238c.pdf

 

John Moody 

Applications Engineering

National Instruments

 

John M.
0 Kudos
Message 3 of 3
(5,090 Views)