LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Collection Rate Is Slow

Hello,

 

Im using a cDAQ and ni 9213 module to take small voltage measurements.  I have the rate set to the maximum and i should be aquiring data at 75S/s, but i am only aquiring data at around 2S/s.  My code is posted.  Any suggestions why this might be?

 

 



-Matt
Download All
0 Kudos
Message 1 of 6
(2,841 Views)

You are collecting 1 sample at a time, then proceeding to write that sample to a file in the same loop.

 

Why don't you collect more than 1 sample at once.  Also, use a Producer/Consumer architecture to move the file writing to its own loop.

 

The Build Table express VI is also constantly growing an array, so that will cause the loop to slow down as the program progresses.

0 Kudos
Message 2 of 6
(2,805 Views)

I see.  I can fix those pretty easily.  So what number of samples would you suggest to collect and should i have the express table overwriting the current data in the table as the test proceeds?



-Matt
0 Kudos
Message 3 of 6
(2,774 Views)

Well if you collect 75 samples at a time, the file will be written to once a second. is that good?

 

You see the bigger issue here is to let the DAQ system do the sample timing and put the acquired samples in a buffer. As long as you can read the buffer faster than it fill ups you can read data essentially forever and at a very constant rate.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 6
(2,770 Views)

Do you have any links or examples of buffer reading programs.  Ive been curious to see what my buffer is looking like.



-Matt
0 Kudos
Message 5 of 6
(2,753 Views)

Check the examples, search for something like continuous sampling or seamless sampling.

 

Mike....


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 6
(2,749 Views)