LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a VI that acts like DIAdem

Hey guys.

 

I currently have a 200-400MB of data in TDMS format.

 

I want to create a vi that can show the above data like DIAdem does.

In DIAdem, you can display tons of data on a graph, without the software telling you "you are out of memory"

And once you display the data, you can zoom in on certain area to display more data of that region.

 

I know waveform graph has that ability to zoomin, but it doesnt give you the ability to programmatically

acquire the width of the data and so on.

 

So basically I am trying to do the following

1. Create a VI that can display data of a TDMS file without loading all of the data onto memory.. causing errors.

  I was thinking about picking one data out every few hundred data... so I can get the rough image of the entire data, without loading everything.

  However this takes a lot processing time apparently. 

 

2. Zoomin on a graph and get the width of data.

   Is there a better way than using two cursors and programmatically calculating the position of them?

 

If anyone has example VIs, that would be great.

0 Kudos
Message 1 of 8
(3,033 Views)

Anytime you are redeveloping existing software you have to ask your self if you don't mind spending all the time in developing, and troubleshooting it, rather than just paying the license.  I realize you don't want to reimplement all Diadem functions but this is still something to keep in mind.

 

You probably have already found it, but checkout the TDMS File Viewer.  This shows how to open data, graph and zoom it, and only read a chunk of the data and not the whole file.

0 Kudos
Message 2 of 8
(3,012 Views)

I don't think you really want to duplicate all DIAdem functionality, just find a way to handle large datasets more gracefully directly in LabVIEW.

 

As a first step, you should start reading here.

 

I am unsure on your exact details. How are you reaading the TDMS file? The file structure is documented, so you can access any data subsection directly, without having to load the entire file into memory. How smooth is your data? If it is relatively well behaved, all you need to do is read as many points as you have pixels on your graph.

 

You can zoom with mouse events(mouse down, mouse move, mouse up) directly. During mouse move, you can even draw a dotted rectangle using the "plot images" feature.

 

 

0 Kudos
Message 3 of 8
(2,999 Views)

Hi guys.

 

Thanks for your help. I am always amazed how fast you guys reply and how helpful you guys are.

 

>Hooovahh

Yea I just want parts of the DIAdem function to be used in LabVIEW.

TDMS File Viewer loads the entire TDMS file so it doesnt really work.

 

>altenbach

Thanks for the article. I didnt know TDMS does not load the entire file if specified correctly.

So now my question is how to create a decimated set of the original TDMS file in a nice fashion.

I tried decimating it manually... but depending on the file size, things take forever.

 

Here is the VI and an example TDMS file.

0 Kudos
Message 4 of 8
(2,933 Views)

@doradorachan wrote:

 

TDMS File Viewer loads the entire TDMS file so it doesnt really work.

 

 


No it doesn't.  Click on Settings and choose to only load so many samples per channel.

0 Kudos
Message 5 of 8
(2,921 Views)

@Hooovahh wrote:

@doradorachan wrote:

 

TDMS File Viewer loads the entire TDMS file so it doesnt really work.

 

 


No it doesn't.  Click on Settings and choose to only load so many samples per channel.


I want to say it defaults to the first 1000 samples of the channel(s) selected.  Will need to play to make sure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 8
(2,919 Views)

No, TDMS File Viewer won't load the entire TDMS file. It only loads specified data when you click a specific TDMS object (file, group, channel) and by default only the 1000 samples is loaded instead of all the samples. LabVIEW has many performance optimization in TDMS File Viewer, thus I recommend you to investigate TDMS File Viewer instead of doing everything from scratch.

0 Kudos
Message 7 of 8
(2,895 Views)

Hi doradorachan,

 

As an alternative to the TDMS File Viewer, I would recommend a tool called Scout:

ni.com/labviewtools/scout

 

It's a free tool for viewing TDMS files. It was originally inspired by the built-in viewer, so it contains some of the same features for handling large files. However, it has several extra features that may speed up your analysis, such as built-in cursor math.

 

Feel free to let me know if you have any questions or comments about this application.

 

-garrett

0 Kudos
Message 8 of 8
(2,846 Views)