06-11-2013 12:56 PM
So I'm a beginner in LabVIEW, and I'm working a program to help me with some research. I have attached my VI below, and I'm taking data at a rate of about 2000 samples per second (using the time delay express VI set at .001s). However, I need to be taking data at about 10,000 samples per second, but if I try to simply decrease the amount of delay (down to .0001s), the sampling rate doesn't increase. Does anyone have any thoughts/solutions to help me out? Thanks.
Solved! Go to Solution.
06-11-2013 01:05 PM
06-11-2013 01:14 PM
It would be expected that someone with a username fo "kronos.." would understand time.....
1. If you open the front panel of the Time Delay Express VI and look at the block diagrams insde your find this:
The resolution of the Wait (ms) function is 1 millisecond. So you cannot get any specified delays shorter than that.
Two things you can do to get much faster data acquistion (assuming your DAQ devices is capable):
1. Use hardware timing on the DAQ board. Almost all boards can sample at 10000 samples per second and many are much faster. Set the sample rate to 10000 samples per second and read 1000 or 2000 samples on each call to the Read VI. No delays are required in your loop because the DAQ Read will wait for the specified number of samples.
2. Use a Producer/Consumer (data) architecture so that the DAQ read is in one loop and the file writes are in a parallel loop. This prevents any slow downs due to the file system or the OS from blocking the DAQ reads.
It is also faster to use the low level DAQ drivers. That avoids the overhead in the DAQ Assistant.
Lynn
06-11-2013 01:35 PM
Use the Example Finder and search for the "Voltage - Continuous Input.vi". It is a good example of a basic acquisition. There is also a built-in function of DAQmx called Configure Logging. When enabled, DAQmx will automagically log the task data to a TDMS file for you. Use the continuous acquisition and set the sample rate to your desired rate. You will need to read multiple samples to keep up. But that example is an excelent place to start.
06-12-2013 11:39 AM
Thanks for your help! I had to upgrade the NI-DAQmx to version 9.0 for it to work. It's now running smoothly 🙂