From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

real time add to excel spreadsheet

Hello MSD100,

 

 

You want to use the Waveform»Waveform I/O»Export Waveforms to Spreadsheet File.vi. This VI will save both the X (time) and Y (amplitude) values to a delimited text file (tab by default).  You can open this file in Excel and it will be displayed like this.  Also, this VI can handle an array of waveforms as well.  Note that my time datum is 0 and my dt is pretty small.  Try playing around with that VI.

 

2010-03-16_084514.png

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 11 of 17
(1,891 Views)

To Jon,

I am not able to use that in my example..can you help me to modify it in my vi....

0 Kudos
Message 12 of 17
(1,874 Views)

Sorry for the confusion.  I didn't originally open up your example, I just saw that you wanted to also record the timestamp in your spreadsheet file and I assumed you were using a waveform data type.  The waveform data type is a cluster of 3 elements {timestamp (start time), numeric (delta time), and numeric[] (Y values)}.  This data type has a timestamp associated with it. In your example there isn't a timestamp anywhere.  You are setting the delay of the loop but you are never recording a timestamp anywhere. 

 

In your examples you should follow the advice of the other posters.  If you want to use the Write to Spreadsheet File.vi you should create a 2-d array where two of the columns are the data you are trying to plot and the third column is the time you wish to associate with each point. You will need to add some code to create the time you wish to use and build it into the 2-d array. The main thing you need to do is figure out what the "timestamp" in this code should be.

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 13 of 17
(1,865 Views)
Is there any property of waveform chart which gives x-axis value....so that can be used????
0 Kudos
Message 14 of 17
(1,842 Views)
Charts in LabVIEW have a uniform x step.  You can change where the x scale starts and its step by using the property nodes for "offset" and "multiplier".  If you are going to have x,y pairs where the x is not a uniform step you should look at using the XY Graph.  The one drawback in this situation is that you lose the charting functionality (charts have a history where graphs don't).  If you really need the history funtionality you can implement this in an XY Graph by looking at the XY Chart.vi in the example finder.  Help»Find Examples and then search for XY.
Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 15 of 17
(1,830 Views)

@Jon S., how can i change the delta t using the Export Waveforms to Spreadsheet File.vi?  I have input waveform cmg from a DAQ device which i merge together.

i would like to attach 1st column in the spreadsheet as the current time value.

 

thanks

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 16 of 17
(1,546 Views)

Hello CrackJack

 

You would need to change the delta t in the waveform data before sending it to the Export Waveforms to Spreadsheet VI.  A waveform is a cluster containing a starting time (timestamp) a delta t (double) and Y values (array of doubles).  The VI in question uses the data in the waveform to write values to the file it doesn't add information based on its input.

 

If this doesn't make sense you should post some code so we can get a better idea about what you are doing.

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 17 of 17
(1,531 Views)