09-16-2008 07:53 PM
I am building a program in labview using an NI DAQ system that outputs a series of user inputted frequencies (10 in total - 50Hz, 100Hz, 300Hz, 500hz, 800Hz, 1Khz, 3Khz, 5Khz, 8Khz, 10Khz) to an amplifier driving a speaker (shaker for an accelerometer), and then reads the output of the accelerometer (in millivolts). I have the program working perfectly up until the part where it needs to output the data to an excel spreadsheet.
It should have two columns (arrays). One would be frequency of the shaker, and the other would be output of the sensor. Also, I havent figured out yet how to take 10 data points during each frequency loop to average the output of the sensor, so I could get a more accurate measurement of the output.
An example would be:
50 (Hz) 121.4 (mV)
100 (Hz) 123.1 (mV)
300 (Hz) 123.5 (mV)
I have included my working program so far(it steps through the frequencies and reads the output of the sensor just fine...the only problem is exporting the data neatly into excel without running into a problem with arrays and huge values of numbers).
Thanks in advance for your time and help,
-Alex
09-17-2008 09:10 AM
Alex,
The easiest way to export to Excel (though indirectly) is to stream it to a tab- or comma-delimited ASCII text file which can then be opened with Excel. I've attached an example of how this can be accomplished (LabVIEW 8.5.1).
Hope this helps.