LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write/Read Complex FFT into spreadsheet

I'd like to write/read a complex FFT (f, f and a 2D array data) into spreadsheet. Is there any way to do that? My current problem is that I don't know how to write both 1D and 2D arrays in the same spreadsheet due to the size differences. Attached is my current VI. Thanks!!

 

0 Kudos
Message 1 of 5
(2,851 Views)

@ljiang5 wrote:

I'd like to write/read a complex FFT (f, f and a 2D array data) into spreadsheet. Is there any way to do that? My current problem is that I don't know how to write both 1D and 2D arrays in the same spreadsheet due to the size differences. Attached is my current VI. Thanks!!

 


There was a typo. The components after unbundle are f, delta f and a 2D array data. Sorry for the confusion. Anyone can help?

0 Kudos
Message 2 of 5
(2,814 Views)

When you say Complex, are you referring to complex numbers as x+iy? You have not complex data in your VI. The FFT VI does generate an array of complex double precision numbers. Or are you using complex to suggest "complicated?"

 

The spreadsheet file is just a text file so you can do separate writes with different formats. You can also create a header and write it separately.

 

What should the file look like? Can you create a simple example manually or provide a format specification?

 

I suspect that you can get what you want with much simpler code.

 

Lynn

0 Kudos
Message 3 of 5
(2,799 Views)

@johnsold wrote:

When you say Complex, are you referring to complex numbers as x+iy? You have not complex data in your VI. The FFT VI does generate an array of complex double precision numbers. Or are you using complex to suggest "complicated?"

 

The spreadsheet file is just a text file so you can do separate writes with different formats. You can also create a header and write it separately.

 

What should the file look like? Can you create a simple example manually or provide a format specification?

 

I suspect that you can get what you want with much simpler code.

 

Lynn


Thanks for your reply, Lynn.

What I expect is that saving the FFT data into hard drive and then the FFT could be displayed by reading the data from the hard drive. The format of the file does not matter, but reading in Excel would be prefferred. I'm not sure how to deal with the 2D array in the same spreadsheet with 1D array. I attached another VI I created, but it doesn't work.

0 Kudos
Message 4 of 5
(2,784 Views)

What generates the 2D array in FFT 3? I am not familiar with any FFT VI which produces such an output. What do the rows and columns represent?

 

I am guessing that you may want each row of the 2D array written to the file as a separate waveform?

 

Your VI has several problems.

1. The while loops are unnecessary as nothing changes while they run.

2. The For loop in the left while loop has the output tunnels set to Last Value. That means that only the data from the last row in the 2D array in FFT 3 will be sent to the file. All the other data is discarded.  If my guess above was correct, change the Tunnel Mode to Indexing.

3. Export Waveform to File is set to the default value of append to file? (new file: F). This will overwrite the header created by the Write to Spreadsheet File.vi. Wire a True constant to that input.

 

Lynn

0 Kudos
Message 5 of 5
(2,768 Views)