LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone written an Import Waveform from Spreadsheet File?

It would be nice to have a vi that can read the files written by Export waveform to spreadsheet file. I realize this is a lot of work, but if you want to be able to use waveforms with a spreadsheet as well as with LabVIEW, the only alternative is to save it twice -- once using Export Waveform to Spreadsheet File and once using Save Waveform to File.
0 Kudos
Message 1 of 7
(7,255 Views)
Hi,
this is simply a case of re-organising the data you're saving. You have the waveform Y array, and you need to append on the dt and t0. Then save this whole array.
Unpacking it is a case of doing it in reverse.
S.
// it takes almost no time to rate an answer Smiley Wink
Download All
Message 2 of 7
(7,254 Views)
I also want to import a set of data from a spread sheet to create an arbitrary waveform as a drive source.
0 Kudos
Message 3 of 7
(7,006 Views)


@DonC wrote:
I also want to import a set of data from a spread sheet to create an arbitrary waveform as a drive source.


What type of file are you having ? If it is .csv or .xls file, you can very well use the VI in the previous post.

Can you explain more of your actual requirement ?

- Partha ( CLD until Oct 2027 🙂 )
Message 4 of 7
(6,996 Views)
Hi,

I am very new to LabVIEW.  I am primarily a digital engineer with 37+ years of experience and some analog experience.  I started programming uPs in 1972 with the Intel 8008.

I thought that the previous post was for exporting the waveform only, now I have run it and I see that an import is also possible.  I don't quite understand it however.  Apparently the csv file data is Y values only with even steps of X determined somehow.

What I am looking for is the ability to create a spread sheet with X, Y pairs to describe the waveform.  What we are doing is hydraulic impulse testing.  What we need to raise a pressure over a short time, then decrease the pressure, then maybe raise the pressure again to a value, then hold the pressure steady for an extended time, then reduce the pressure back to 0.

Here is a very simple example spread sheet file.  I could easily export the two data columns to a CSV file, and I can organize the spread sheet in whatever way might be easier to work with in LabVIEW.

I appreciate the help.
0 Kudos
Message 5 of 7
(6,981 Views)

Hello Don,

Though I don't know how exactly you want to have this data be generated, you can import the data and change this into a waveform fairly simply.  I have attached a VI that opens a CSV file that will plot a waveform of the data.  It assumes that the data is whole numbers and does not linearly interpolate the data.  So the plot has a lot of points that increase or decrease in the period of 1 second.  Though this may not be the perfect code you need, this is a good basis for starting to get your data out and manipulate it.  If you have any questions, please let me know.

Brian Coalson

Software Engineer
National Instruments
0 Kudos
Message 6 of 7
(6,972 Views)

Hi Don,

Here is a better example that uses the interpolate function.  I adapted the Interpolate 1D array example.

 

Brian Coalson

Software Engineer
National Instruments
0 Kudos
Message 7 of 7
(6,951 Views)