From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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 do I display the next segment of an LVM file on a graph?

I have built an application which reads in an LVM file containing 16 waveforms. I am taking 1000 samples at 1kHz. The capture may last for up to 3 minutes, so I generate a sizable file. When I read this file back and display it I only get the first segment of 1000 samples (1 second). Generally this is fine, but I want to be able to select to view the other segments as well. I have been attempting to use the "Read Measurement File" express vi.
 
I have also tried to put the "Read Measurement File" in a while loop until I hit EOF and tied it to an "Append Signals" express vi before feeding it into the graph. This allowed me to see the last segment of my capture.
 
I understand that the amount of data I am trying to display would be too much for the graph, but isn't there some way I can point to a segment and display it? The perfect answer would be to grab the timestamps of the segment headers in my file and populate a listbox. (I am generating this file with headers for each segment.) Then I could scroll through the listbox and select the "second" that I want to examine. Then I need the "selected second" to display on the graph. I suspect that this is possible because I am already pulling the waveform names from the file and feeding them into a listbox so I can select which waveform(s) I want to examine.
 
Any Ideas?
 
technomage
0 Kudos
Message 1 of 5
(2,506 Views)
Hi there,

Have you considered using the TDM file format instead of the LVM format? With TDM you specify parameters for your file and your channels. When you want to read data from the file you can extrac data based on those parameters. So you could construct a search that extracts the data from a particular time, or all the data that was acquired in a 10 minute period for example.

There are a few VIs you would have to become familiar with to do this (the datalog VIs are located in a palette on the File IO palette), but it would probably be easier for you to use these then to construct the file yourself and then program in all the search parameters.

Here are some resources with more information on the TDM format:
TDM Data Format
Introduction to LabVIEW Data Storage VIs

They should help you decide if you would like to use this format or stick with the LVM format.
Sarah

Applications Engineer | National Instruments | UK & Ireland
Message 2 of 5
(2,490 Views)

Thanks for your quick reply Sarah. I will take a look and see if I can use these. I had considered them, but I guess I was a bit lazy and opted for the express vi's instead. Today I will do some research, starting with the links you provided me.

 

technomage

0 Kudos
Message 3 of 5
(2,480 Views)
Another option is NI-HWS (found with the modular instruments on your driver CD).  It has higher performance than TDS, but cannot be read with DIAdem, nor does it have any of the cool search features.  It is hierarchical.  It includes compression, so you can reduce your file size.  At your data rates, you can probably use compression on the fly with a reasonably modern computer.  Note that TDS can easily keep up with your data rates.  Be sure you use the binary form of TDS and not the text form or your performance could actually decrease.
0 Kudos
Message 4 of 5
(2,474 Views)

Well, I spent the day researching this problem. First off I found out the the TDM file format seems to be unavailable because I am using an RTOS to capture data and generate the file. Shame.

 

The other idea about HWS I will have to play with tomorrow.

 

technomage

0 Kudos
Message 5 of 5
(2,461 Views)