09-22-2012 02:28 PM
Hello All,
I'm a relatively new to labview and need some help. I have some .csv files with multiple columns of data that i need to do a fourier transform to see what frequency i need to filter the data through. I've been messing with some commands and blocks in labview, but haven't had much luck connecting them. I'm trying to have some way to be able to choose which column of data in the csv file is going through the FFT function at a time. I don't really know how to start.... any help would be appreciated.
Thanks!
09-22-2012 02:46 PM - edited 09-22-2012 02:47 PM
What have you gotten so far? I'm assuming you're using the Read From Spreadsheet File VI? That will give you a 2D array of values. If your data is in columns, Index Array can be used to pick off specific columns. Just feed it the 2D array, wire a constant to the "column" input (remember that arrays are zero-based indexed), and leave the "row" input blank. This will give you a 1D array that is that column.
09-22-2012 02:54 PM
Below is what I have so far. I'm not sure on two things:
1) How do I use the index array block to select which column of data i want to use?
2) How can i connect that data to get a frequency spectrum graph?
Thank you for your quick response!
09-22-2012 03:10 PM
Always have the Context Help window open when you are starting out learning LabVIEW. Did you do the tutorials? I'm sure they cover arrays. As I said, you need to wire a constant to the "column" input. See that little black square on the left of the Index Array? That's the "row" input. The one below it is the "column" input. So, either:
As for the graph, that's not the correct way to use a waveform graph. It appears as if you are trying to do an XY thing. That's what the Build Cluster is used for. If you hover the cursor over the waveform graph terminal on the block diagram, and have the Context Help window open then it will show you how to build data for it. There are also shippiung examples on the various types of graphs.
09-22-2012 03:45 PM
Thank you for the help.
I've been looking through some other examples but haven't found any of the tutorials. I can now import the csv files. Is there a better method to graph the output of the fft than a waveform graph?
09-23-2012 08:30 AM
To learn more about LabVIEW you go can through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. There are also several Technical Resources. You can also take the online courses for free.
In terms of the graph, you can use an XY graph instead of a waveform graph. A waveform graph is designed to be used with equally-spaced datapoint. An XY graph is not. You wire your array of freqencies to the top terminal of the Bundle function.