Showing results for 
Search instead for 
Did you mean: 

How to plot graph in LabView from .lvm file?

          I need to plot the graph in lab view for the parameter values I collected according to time stamp in .lvm file. I am attaching the .lvm file which will be having first column as DateAndTime and remaining are Parameter 1 Parameter 8 column. I need to plot the graph from this .lvm file in which x- axis will be having timestamp from first column (i.e DateAndTime). On y- axis the parameter 1- parameter to parameter 8 are to be plotted. The samples collected are at random interval of time. How to plot the graph in lab view from this file?
Thanks in advance.
0 Kudos
Message 1 of 4
If they're random intervals of time I'd probably go with an XY graph. What's the issue? Reading the file, or creating a graph?
0 Kudos
Message 2 of 4
The VI attached in the last post in this thread may be of use.  It doesn't seem there is a really easy way to do this.

Message Edited by Doug M on 05-15-2007 03:51 PM

Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 3 of 4
Since you saved your file with no header, you have a simple tab-separated text file, so you need to read it in a traditional fashion.  I have attached a VI which shows the process.  If you have large amounts of data, you may not want to read the whole file in at once.  You may also want to do some sort of autodetection of how many data points you actually have (there are a lot of blank fields, which get interpreted as zeroes).  Alternately, simply clean up the file before using it.  I hard-coded the trimming.

Basic procedure is:
  1. Open file
  2. Read it all in as a text string
  3. Separate out the header
  4. Convert the first column to a time (I assumed seconds)
  5. Convert the other columns and bundle into XY points for the graph
  6. Array is transposed from where we want it, so transpose
  7. Array now needs each XY set bundled for the XY graph, so do that at the same time we trim the blank points
  8. Wire to XY graph
If you have any questions, let us know.
0 Kudos
Message 4 of 4