03-21-2016 12:49 PM
Hallo all
This might be a simple question but I need to log the FFT data into either a text or excel file.
I need time averaging, and I will be running the program for a while (about 1h), so I do not want to log too much data. I would prefer to log only the data from the graph.
03-22-2016 12:27 AM - edited 03-22-2016 12:31 AM
Learn LabVIEW. Then you can do what you want to do without using Express VIs, which make many assumptions, hide functionality from you, but are quick, "easy", and limited. I believe there is a "Write to Excel" option in Measurement File (I've never used this Express VI, so have no first-hand experience). Since you are running LabVIEW 2015, you do have access to the Report Generation Toolkit, which supports writing Excel Worksheets (.xlsx files). If you manage the data yourself, you can control what gets written, how much gets written, how often it gets written, etc.
Bob Schor
03-22-2016 04:24 AM
Hej BOB I am trying to learn labview, but this takes time, I unfortunately need a working solution for work that I have to do relatively soon.
I have tried to write the file in a few ways, but I keep strugling with how to break the dynamic data up into managable parts, and average them over time, and set the frequency range to something manageable, since I only need the frequency data in a limited range.
03-22-2016 04:39 AM
@Artapel wrote:Hej BOB I am trying to learn labview, but this takes time, I unfortunately need a working solution for work that I have to do relatively soon.
I have tried to write the file in a few ways, but I keep strugling with how to break the dynamic data up into managable parts, and average them over time, and set the frequency range to something manageable, since I only need the frequency data in a limited range.
You have 3 options:
If you told us what is the actual task your code need to do, we could suggest some LV example as a starting point. In the VI which you show you just simulate a sinus wave. What will be the actual source of data in your final vi?
03-22-2016 07:11 AM
I will be getting high frequency sound data from an analoug input (I am using a USB-6343 DAQ), resulting in something similar to the sine input signal. I then need a FFT analysis to get an intensity vs frequency range. I then simply need to log the data in a readable format, maybe CSV or excel. Any help would be appreciated
03-22-2016 07:59 AM - edited 03-22-2016 08:03 AM
@Artapel wrote:I will be getting high frequency sound data from an analoug input (I am using a USB-6343 DAQ), resulting in something similar to the sine input signal. I then need a FFT analysis to get an intensity vs frequency range. I then simply need to log the data in a readable format, maybe CSV or excel. Any help would be appreciated
Now it is more clear what you would like. You need to specify some more parameters:
You could use the following example as a starting point: https://decibel.ni.com/content/docs/DOC-2431
You need to change the DAQ to single channel sampling, and the idea is that, you do the FFT inside the Consumer loop, on certain chunks of the incoming data. After the FFT is done, you can save some reduced size representation of the results in a txt file for example, but I would recommend using TDMS files, since they are easy to import into Excel, but since they are binary, you can access the stored data from LabVIEW faster later...
edit: there is one flaw in the above Producer/consumer example, namely the graphing should be moved from the Producer to the Consumer loop. Usually it is best not to have anything inside the Producer loop, only the DAQmx Read function, and the Enqueue function...