Is there a way to accelerate data acquisition with an accelerometer. When i ran my vi the loop should iterate one a second. But as i have other programs running, when i count the number of data i should have, i notice that there is some missing points the file written from the acquisition. I'm using a NI9234 module with a pcb 100mv/g accelerometer.
Anyone has a clue how we can accelerate the loop time iteration to have exactly the desired data even with other tasks running after the acquisition.
You're already half-way to this, but you might want to read about Producer/Consumer design.
This would allow you to remove all of the local variables, which will perhaps help a tiny bit with speed and a lot with reliability.
Consider just enqueuing the latest data and doing all of the "graphing" in a Consumer loop below.
I'd also suggest using the DAQmx nodes rather than the DAQ Assistant - in this case it probably isn't the critical problem but it will make your code easier for others to read at a glance.
It also gives more control in case you need to try tuning it in order to optimize throughput etc.
You can read some starting tips here: Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications.