LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with sampling rate and number of samples with USB 6009 module

Solved!
Go to solution

Hello,

I am currently designing a readout software in LabVIEW (version 2010) using NI USB 6009 for fluorescence polarization analysis. The idea is to acquire signals from two detectors in my experimental setup. The detectors are connected to two analog input terminals (ai0 and ai3) on the DAQ. I want to record a signal for 100 seconds from the DAQ. I tried changing the sampling rate to 1000 S/s and the number of samples to 10000 but all I could get was a signal of 10 seconds duration (check the images attached).Kindly address this problem.

Here is my VI.

 

P.S: Pardon the image clarity

 

 

 

Download All
0 Kudos
Message 1 of 4
(2,996 Views)
Solution
Accepted by seetha92

Hi seetha,

 

reading 10k samples at 1kS/s sample rate results in a waveform of 10s - simple math!

 

Additionally you need to take care of the timeout input of the DAQmxRead function - but usually it's better to read several smaller blocks of samples instead of waiting for the "one big read" for several seconds!

 

And PLEASE don't use the TimedWhileLoop here, it's completely useless as the iteration time is determined by DAQmxRead!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,995 Views)

Thanks a lot for your reply, GerdW !

 

I just figured out that 10 seconds thing. Silly me! However, what's with the timeout input of DAQmx read part? Do I need to modify the block in entirety or just change some settings in that block?

 

Thanks again,

Seetha

0 Kudos
Message 3 of 4
(2,989 Views)

Hi seetha,

 

when you want to read more samples than can be acquired within 10s you need to wire a different timeout value to the DAQmxRead function.

(Note: as said before I don't recommend to read samples for such intervals. Read smaller chunks, read more often.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,968 Views)