09-24-2010 08:55 AM
I’ve trying to determine the Peak and Amplitude of a signal when peak exceeds a certain threshold value that we choice. Now I can read the frequencies but I can’t have the correct values for its respective amplitudes. These are my two questions: 1. How a can read both frequency and amplitude correctly with this VI? and 2. How can send the obtained information to a spreadsheet?
Any input will be appreciated. Thanks.
09-27-2010 07:49 AM
I would recommend using the Extract Multiple Tone Information VI instead of the Express VI. It returns all the information you want. Your current method is limited by the resolution of your data. Extract Multiple Tone Information returns peak locations to sub-sample accuracy by using fitting techniques on the top few data points.
How would you like to send data to a spreadsheet - directly to Excel, create an Excel file, or create a tab separated text file? The last of these is the easiest and most portable. Use either the Write to Spreadsheet File VI or the Write to Measurement File Express VI with the file type set to LVM.
09-27-2010 10:01 AM
Thank you very much for your suggestions. I used Extract Multiple Tone Information how you said, but I still have some problems to know the correct amplitudes values. If you can look over my code and give me any tips I would be very grateful.
You can see in my code that I was been using the Write to Spreadsheet File VI to writing some others levels and amplitudes, but my question about how to send the frequency and amplitude to spreadsheet is because I don’t know how to send 1-D array of Cluster (The format at the output of Waveform Peak Detector VI) to spreadsheet.
Thank you and best regards
09-27-2010 12:25 PM
Write To Spreadsheet File requires an Array input, therefore if your cluster contains numeric, boolean and string data for example, you may perhaps be able to convert it all to a 2D array of strings, which will require further data manipulation.
Or if the end goal is to be able to open this file in Excel, you could perhaps consider writing to a TDMS file and use the following example as a starting point. You would need the add-on install which can be found here.
Hope this helps!
09-27-2010 12:33 PM
Thanks for your help. The TDMS file in http://decibel.ni.com/content/docs/DOC-13118 is on Labview 9 and I have 8.6. On the other hand, any suggestion to read the peaks values? Please, look over my code. Thanks!!!
09-28-2010 07:56 AM
To write the array of clusters to a spreadsheet file, you will need to write your own code using the LabVIEW text file I/O primitives. Spreadsheet files are typically arrays of strings with the row elements separated by tabs (or, less commonly, commas) and the columns by an end-of-line (CR/LF for Windows). The following algorithm should work for you:
Consult the LabVIEW help for how to use the file I/O primitives. Let us know if you need more help.