LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing 1D complex number array in to excel sheet

I have a 1D complex array in a consumer loop which runs continuously. How can I store the complex array data in to an excel sheet. All the values should be appended to that excel sheet after every iteration. For every iteration I get 4096 complex numbers.

I tried using write array to spreadsheet.vi but it didnt work. Please post an appropriate VI for reference.

 

 

0 Kudos
Message 1 of 13
(5,546 Views)

In what way didn't it work?

 

How do you want the data to look?  Excel doesn't know about complex data.  So you will have to break apart the array into real and imaginary points and send them to either Excel, or to the "spreadsheet" like text file as separate columns.

 

It is much easier if you post what you have then for us to fumble around trying to create a "reference" vi.

0 Kudos
Message 2 of 13
(5,532 Views)

Hi,

 

You can use ActiveX Controls to Handle this kind of speradsheet easily.

 

and treat the complex number as string.... or separate real and imaginary part and write into separate columns in the Excel Sheet

 

ANil

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 3 of 13
(5,523 Views)

I am posting the Vi I have for reference. I have to save the data after FFT in the consumer loop. The FFT is inside the case structure.

Actually What I want to do is I want to compare the FFT data for 4 iterations. Thats the reason I want to save the data in excel sheet.

The problem I was getting if I use "write to spreadsheet.vi" is I dont have any data in the excel sheet after I stop running the VI.

Because Appending Data to an Excel Spreadsheet Using Write to Spreadsheet File.vi Does Not Update the File.

0 Kudos
Message 4 of 13
(5,497 Views)

Hello,

 

I have posted an example VI which demonstrates how you could append an array of complex numbers to an excel spreadsheet. I hope this helps. 

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 5 of 13
(5,475 Views)

Vivek_N wrote:

Hello,

 

I have posted an example VI which demonstrates how you could append an array of complex numbers to an excel spreadsheet. I hope this helps. 


That's not an Excel spreadsheet. That's a text file. Please don't continue the confusion that new users have with the Write to Spreadsheet File in which they think they're writing Excel spreadsheets because of the poor choice in naming that function. 

0 Kudos
Message 6 of 13
(5,470 Views)

venki_tav wrote:

I am posting the Vi I have for reference. I have to save the data after FFT in the consumer loop. The FFT is inside the case structure.

Actually What I want to do is I want to compare the FFT data for 4 iterations. Thats the reason I want to save the data in excel sheet.

The problem I was getting if I use "write to spreadsheet.vi" is I dont have any data in the excel sheet after I stop running the VI.

Because Appending Data to an Excel Spreadsheet Using Write to Spreadsheet File.vi Does Not Update the File.


Given that your VI doesn't even have the Write to Spreadsheet File, then it's not clear what you're saying. If you want to do the FFT when you have 4 iterations, then that's the same as saying you have 4 elements in the queue. You can use the Get Queue Status to tell you how many elements are in the queue. Note that this does not refer to the number of elements in the array - each element in the queue is an array of data. Do you need to do the FFT on the data from the 4th iteration, or are you trying to do something else? 

0 Kudos
Message 7 of 13
(5,467 Views)
I want to compare the FFT (numbers) of the first 4 iterations. Thats why I need to save the data.
0 Kudos
Message 8 of 13
(5,458 Views)
Why do you need to save the data just to compare the first 4 iterations? What's wrong with a shift register? Also, compare it to what? To each other? To some template? What about iterations 5+?
0 Kudos
Message 9 of 13
(5,455 Views)

How to Prove that data is not lost in producer consumer loop ?

Message Edited by venki_tav on 01-21-2009 05:58 PM
0 Kudos
Message 10 of 13
(5,449 Views)