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: 

how to export more than 100 points from waveform to excel

Solved!
Go to solution

Hi everyone. Novice here. 

 

I'm pretty sure other people had my problem, but I don't know how to word it... and can't find a solution for it... Maybe I just don't understand Labview enough to know what's going on.

 

Here's what I'm doing: I have a waveform, and I'm trying to save the data to the spreadsheet.

 

Problem: The cap is at 100 data plots (only what's shown on the graph). In other words, I only get data for what the graph holds at the present moment.

 

Want: I want more than that - EVERYTHING. If it begins from 0s to 50s, I want all the points (10ms increments, which is done already) on the excel file.

 

Can you guys help me? How do I get suck that history out of the graph?

 

I attached my labview file (a really simple one), so you guys know where I am.

 

Thanks guys!

0 Kudos
Message 1 of 12
(3,692 Views)
Solution
Accepted by topic author dan190

I would probably go this route and use the TDMS import Excel Add-on

 

Capture.PNG


"Should be" isn't "Is" -Jay
Message 2 of 12
(3,683 Views)

Thanks for your answer Jeff!

 

But as a novice, I would really like a explanation as to what/why you did. 

 

I can research the individual parts myself, but an "assembled" explanation from a veteran would be very helpful. (eg. what is tdms? it seems like it's something exclusively for Labview, and gets stuff working with MS Excel. Is that all I need to know?)

 

Thank you!

0 Kudos
Message 3 of 12
(3,671 Views)

@dan190 wrote:

Thanks for your answer Jeff!

 

But as a novice, I would really like a explanation as to what/why you did. 

 

I can research the individual parts myself, but an "assembled" explanation from a veteran would be very helpful. (eg. what is tdms? it seems like it's something exclusively for Labview, and gets stuff working with MS Excel. Is that all I need to know?)

 

Thank you!



In my defense I actually was busy at the time I last posted so, I'm glad you followed up.

 

The basics of TDMS can be found here

 

A read through will prove to you that although NI developed the file format, they did not do so in a vaccuum!  And of course evey NI Development platform supports the format natively.  There are plug-ins to convert to other application formats as well.  BONUS, third partyies can and do develop more and more tools for TDMS  (SCOUT is award winning) 

 

 

 

There are a lot of other advantages but the my client's seem to be the most apprechitive of is that the file is inherantly multi-access.  You your viewer can run at the same time as your experiment and you can track data trends while the data is being collected.  Try opening an excel report while the test is executing!  (Blows up in your face! with file I/O errors)  That does not happen with TDMS

 

Can you tell I'm a big fan?  Easy to use, hard to break, incredably flexable and index search ready!  Add several impressed and happy client's and you would be a fan too!


"Should be" isn't "Is" -Jay
Message 4 of 12
(3,658 Views)

If you are not in a hurry, another option is to save the data as a delimited text file. This will allow you to open it in almost any analysis program, since a delimited text file is the universal file type. A delimited text file is one in which data is stored in columns, separated by delimiters, and rows, separated by lines of text. The delimiter is usually a tab character (file extension .txt), but a comma is common in some industries (file extension .csv). Note that using a comma separator can get you into trouble if using European numbering styles, which use the comma instead of the period as the decimal indicator.

 

LabVIEW has several VIs that make this easy for you.

 

  1. If you have a single set of homogeneous data and are only writing once (NOT in a loop), then use Write to Spreadsheet File.vi. This VI formats your data into rows and columns, opens the file, writes the data, then closes the file. Since it opens and closes the file, it is not suitable for use in a loop.
  2. If you are writing homogeneous data in a loop, use the Array to Spreadsheet String function at each iteration to format your array of data to rows and columns, then write using either of the file write primitives.
  3. If you have inhomogeneous data, such as a timestamp and a few doubles, format the data on a line by line basis and write to disk. The attached example, SImpleLowLevelWriteSpreadsheetFile.vi shows how to do this.
  4. If you need more speed, you can buffer your data so the blocks of data you send to disk are more optimized. This is a bit more complex, but the attached example, BufferedLowLevelWriteSpreadsheetFile.vi shows how to do it. This will usually give you at least 2X and could be 10X or more speed improvement.

Have fun!

 

Message 5 of 12
(3,600 Views)

Hey Jeff, and other Labview individuals 🙂

 

I am currently stuck&confused. The TDMS does not give me what I want.

 

Here is my block diagram.l1.PNG

So basically, for testing purposes, I have a TDMS and a "Export Data to Excel". So every test run, I get two spreadsheets.

 

The "Export Data" function gives me the following

l2.PNG

This is what I want, except that it only gives me the past 100 points. I want everything, from start to STOP.

 

Here is what I am getting with the TDMS

l3.PNG

 

Quite different. Not really what I want.

 

Am I supposed to modify the TDMS differently? Maybe use different functions?

 

Kindly let me know, thank you.

 

0 Kudos
Message 6 of 12
(3,513 Views)
It looks like you have a chart so the export will write the history length. What do you have it set to?
Message 7 of 12
(3,499 Views)

I have it as default - I didn't modify, nor do I know how. 

 

Can you briefly explain?

0 Kudos
Message 8 of 12
(3,493 Views)
Right click on the chart and view the history length setting.
Message 9 of 12
(3,487 Views)

It's set as 1024 - much bigger than 100, and not what's displayed on the spreadsheet 😞

0 Kudos
Message 10 of 12
(3,481 Views)