Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample rate NI 9239 not working as expected

Solved!
Go to solution

Hi all,

I am setting up an experiment and I am currently having trouble making the NI 9239 card reading at the correct sample rate.

The detection system is set up as follows: 

  • cDAQ 9174
    • Module 1: NI 9239
      • channel 1: trigger line (just for reading)
      • channel 2: sample line (like a photodiode)
    • Module 2: NI 9402 (trigger acquisition)

I already checked if adding or removing the NI 9402 module would make a difference and it does not.

I am using a laser with a 4 kHz repetition rate, and I aim to acquire 4 points for every laser shot, which means that I want to use a sample rate of 16 kHz.

However, when I am making the program run (example attached), it looks like the acquisition is slightly faster than that: indeed if I check what is the rate through the property node "SampClk.Rate" option, it gives me a rate of 16666.7 Hz instead of the wished 16000 Hz.

Digging inside the timing property node I realized that the actual rate is not the one I give to the sample clock as an input, that rate will be rescaled based on the timebase rate and the MaxRate of the device.

Is it somehow possible to get a sampling rate of exactly 16 kHz or exactly another number that is not related to the SampClk.Rate I am seeing in the VI I attached?

 

I am sorry if the problem might be trivial but I am not an electrical engineer so I am new in this field!

Thanks for help

E

 

0 Kudos
Message 1 of 3
(1,530 Views)
Solution
Accepted by topic author EdoardoA

Sample 13+ points with 50kHz and do a resampling in software?

However since the masterclock and your laser clock are not synchronized, the actual samples will match to the laser pulse +- 1/SR in timing

Any chance to sync the laser pulses timebase with your aquisition timebase?

 

RTFS:

Mastertimebase is 12.8 MHz

All posible samplerates are 12.8M/256/n  = 50k/n  (n=1..31)

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 3
(1,491 Views)

Thanks for answering!

Unfortunately, I can not change the laser pulse timebase...However, I did find a NI9215 card and with this one I can read at sample rate of 16000! I don't understand why I can't do the same with the other one... So I guess I will keep using this one!

0 Kudos
Message 3 of 3
(1,465 Views)