ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 columns of spreadsheet data into indicator and into an FFT

Solved!
Go to solution

Problem Description :

 

i have ben away from labview for many years. Now i am trying to take 2 columns of spreadsheet data, read them into the 'read delimited spreadsheet vi,' and display both columns on the front panel of my
VI.   I can only get one column to display.

then I want to plot the power spectrum of this data without having to use extra
 loops, arrays, etc.  

Labview has an example vi  that does half of what I want to do

(Amplitude spectrum (sim).vi).  The spectrum analysis is done using inputs from a signal generator vi instead of reading from a spreadsheet.  Also the (Amplitude spectrum (sim).vi  uses a real world vi that produces a time index for the x axis .  it also adds noise to the data, which I do not want to do.

 

0 Kudos
Message 1 of 13
(7,738 Views)

Please post some code. Make sure you are taking the 2D array of data output from Read Spreadsheet.

0 Kudos
Message 2 of 13
(7,737 Views)

What is in column 1, what is in column 2?  I assume column 2 contains amplitudes.  Is column 1 happen to be timestamps, or is it amplitudes for a different channel of data?

0 Kudos
Message 3 of 13
(7,733 Views)

Here is the data file (2 colums 256 rows long) of numerical integers, csv format).  the Labview example vi named 'read spreadsheet2.vi' asks for a file which i have included (data3.csv)

Download All
0 Kudos
Message 4 of 13
(7,722 Views)
I'll ask again.
@RavensFan wrote:

What is in column 1, what is in column 2?  I assume column 2 contains amplitudes.  Is column 1 happen to be timestamps, or is it amplitudes for a different channel of data?


All I see are 2 columns of sequential data.  Column 1, 1 through 257.  Column 2,  101 through 357.

 

What do they represent?

0 Kudos
Message 5 of 13
(7,702 Views)

here is the same vi with an added " rows = -1 on on the input of the read spreadsheet2.vi

 

it made no differnce in showing the 2nd column oof data,

 

0 Kudos
Message 7 of 13
(7,696 Views)

Are you using the comma delimiter? You shouldn't have to wire up the "rows" input.

0 Kudos
Message 8 of 13
(7,693 Views)
Solution
Accepted by HBNI

I see the problem.

 

Your delimiter for the Read from File.  You show a comma, but it is actually a comma and tab in there.

 

Right click and set display style to \codes to see.

 

Delete the contents of that constant and re-enter the comma.

Message 9 of 13
(7,692 Views)

Both columns are increasing series of integers.  column 1 will be the time steps. column 2 will hold measuement data later.  right now it is only an increaing series of integers.

0 Kudos
Message 10 of 13
(7,686 Views)