07-08-2014 05:27 PM
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?
07-08-2014 11:21 PM - edited 07-08-2014 11:23 PM
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.
07-09-2014 10:06 AM
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?
07-09-2014 10:12 AM
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...
07-09-2014 12:48 PM
Do you have any links or examples of buffer reading programs. Ive been curious to see what my buffer is looking like.
07-09-2014 12:55 PM
Check the examples, search for something like continuous sampling or seamless sampling.
Mike....