Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

compactDAQ sample rate question...

Solved!
Go to solution

Ok, I think I have this question in the right place, but if not I beg forgiveness.  🙂

 

I have a CompactDAQ  (4slot) with just a 9225, and 9239 modules installed.  I ran the DAQ assistant and have all seven channels being read and being written to a text file from a event structure... when I push the button, it logs data.  Pretty simple really, also I have a "Wait" timer setup with a 50mS wait time, so I'm basically updateing my loop 20 times per second, not that fast.  The odd thing is that my DAQ module is only giving me data once per sec.  Did I set something up wrong?  Seems to me that as the loop updates it should resend the "True" from the button to the event structure and data should show up at a rate of about 20 samples /sec.   Sample VI attached.

 

Hints and points in the right direction are greatly appreciated!

Chad

0 Kudos
Message 1 of 5
(3,526 Views)
I'm unable to open your vi due to using an earlier version, but have you checked the timeout duration for the event structure?  Perhaps that is your mysterious 1 sec?
0 Kudos
Message 2 of 5
(3,524 Views)
Sorry, I misspoke!  It's in a case structure, not an event structure!
0 Kudos
Message 3 of 5
(3,519 Views)
Solution
Accepted by topic author chuggins143

Hi chuggins143,

 

The behavior is coming from your settings inside the DAQ Assistant:

 

2010-05-10_192137.png

 

If you want the loop to run 20x per second, then "Samples to Read" should be 1/20 of the Sample Rate.  DAQmx will block until "Samples to Read" samples have become available, so this is what is slowing down your loop.  You also might want to change the Timing Settings to "Continuous" if you want to avoid gaps in your data.

 

 

Best Regards,

John Passiak
Message 4 of 5
(3,508 Views)

Perfect!  Thank you very much!

C

0 Kudos
Message 5 of 5
(3,475 Views)