LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wiring write to spreadsheet.vi to read from spreadsheet.vi and plot the data

I need to plot the data file from the two 'write to spreadsheet.vi' into a graph. Does anyone know how should I connect the 'read from spreadsheet.vi' so that I can plot my data?

 

Please refer to the snippets.

 

Thanks.

0 Kudos
Message 1 of 7
(3,255 Views)

Sorry for my earlier post. I actually need to have the 'read from spreadsheet.vi' as a separate vi file from the write to spreadsheet...

0 Kudos
Message 2 of 7
(3,249 Views)

Hello tronne,

 

I would start by reading the values in as a double and not as a string, i.e. change '%s' to something like '%3f'.  This will give you all rows as an array of doubles.  From there you can use Index Array to obtain the rows or the columns of the data (depending on how you oriented your data).  Using the two rows or two columns, you can then plot one versus the other using an XY Graph.

 

Regards,


Lynn

National Instruments
Senior Systems Engineer
0 Kudos
Message 3 of 7
(3,224 Views)

Hello Lynn...

 

Thanks for your explanation. I want to read two data files or text files that contain the RMS values, and power spectrum, respectively. I'd like to plot each of these against time. I might not know exactly how it's supposed to look like since I've never done this or see it before. So, I'm not sure if I'm asking the right question or if what I'm asking here is possible or not. I appreciate if you can help me.

 

 

0 Kudos
Message 4 of 7
(3,214 Views)

Hey tronne,

 

Where will you be getting the time information from?

 

Lynn

National Instruments
Senior Systems Engineer
0 Kudos
Message 5 of 7
(3,210 Views)

Hi Lynn,

 

You're asking the very same question that I've been wondering about because I don't have the time info. I've found an example that have both info, temperature and time in two colums in one file..it uses two Index Array for time and temp, use the bundle feature, display the plot in an XY graph. So, that was an easy one, but apparently my case is different.

 

I've a program that collected the data from simulated signals and it is plotted in a waveform graph against time (amplitude vs time), and a power spectrum (amplitude vs frequency). But the data that I collected are the RMS values and power spectrum amplitude...so, I'm not sure where the time data go. I need to figure this out.

 

 

0 Kudos
Message 6 of 7
(3,200 Views)

Is your data evenly spaced (with respect to time interval)?

If so, you can use Build Waveform to generate a waveform.

You can pass in t0, dt, and then your array of y-data and it will genereate a waveform.

 

Then you can display both waveforms on a Waveform Graph.

 

Edit: I just read your most recent post.

In order to display your spectrum data, you don't need a full array of time data, but you do need to know the dt of the time series.

Cory K
0 Kudos
Message 7 of 7
(3,197 Views)