01-20-2012 08:06 AM
I'm working on a program that has to save about 1200 numbers of data to a spreadsheet file many times per second (the more the better). Right now, it reads all the data points, puts all the data into a 1-d array of dbl, converts the array to a spreadsheet string, and appends the data to the output file, all inside the loop. The problem is that the loop takes a long time to execute, so it maxes out at about 480 Hz loop execution. I believe that the array to spreadsheet string function is what is bogging it down. I only need to record a couple seconds of data, so I thought I could somehow store the data in memory (maybe an array of arrays?) while the loop runs, and then convert it all to the spreadsheet string and save it outside the loop. I'm pretty new to labview, and I'm not familiar with how to do this. Any suggestions?
Solved! Go to Solution.
01-20-2012 08:20 AM
There are quite a few things you can do to optimize this operation:
This is a lot to digest in a short amount of time. Give it a shot and post your code with further questions so we can help more.
01-20-2012 09:37 AM
Thanks. Your suggestions took me straight to the information I needed. It seems that the labview program is now running fast enough to capture all the data the sensor can provide. I also found this link https://decibel.ni.com/content/docs/DOC-9617 helpful for determining when the data was done being processed to stop the consumer loop.Thought I would share that in case it helps somebody else.