06-29-2020 04:52 AM
hi everybody.
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.
Regards.
06-29-2020
07:08 AM
- last edited on
01-11-2025
02:52 PM
by
Content Cleaner
Hi M.ezzakkar,
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.
06-29-2020 10:56 AM
hi cbutcher,
Thanks a lot for your help. I've managed to solve my problem by doing the producer/consumer thing. I've attached a vi in which you may find what i did.
Regards.