LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot a graph using the text file

Solved!
Go to solution

Hello everyone,

I have encountered a problem when I tried to plot the graph from the text file.I use LabView 2015 version.

The text-file consists of various measurement parameters of the sensor. I should plot the initial CO2 concentration (co2_ini_ppm) with respect to the system tick(systick).I have attached my text file and the program that I have written. If someone knows the solution,please reply.

 

Problem:My program can't find the systick present in the textfile. Neither the search function in the textfile.

Download All
0 Kudos
Message 1 of 2
(1,149 Views)
Solution
Accepted by topic author pallavipal

This is your first Post on the Forum, and I'm guessing that you have not taken any class in LabVIEW, and have not spent any time with the Tutorial material (see the first page of this Forum, for example).  So here are some clues to get you started in doing your own work and learning some LabVIEW in the process:

  • Take a look at the data file.  Do you notice any pattern about it?  How many "patterns" do you see?
  • When you use a LabVIEW function (such as Read from Text File), it is a good idea to right-click the Function, select "Help", and read the Detailed Description of the Function.  There might be a parameter of the Function that will provide the output in a more useable fashion.
  • Your Data File has an "unfortunate feature" that makes your Task more difficult for a beginner.  The first two lines (the Blank line and the one that says "Measurement Loop Start") have very different Formats and very different data than the rest of the file.  I recommend (to get started learning about LabVIEW File I/O) that you use a Text Editor to make a file that starts at Line 3, the line with the Column Headers.
  • Now you have a file with two formats -- the Column Header row is Text separated by commas, and the rest of the file are Floats separated by commas.  If you knew the number of characters in the Header Row, you could read the file twice, once just reading one line and getting out an array of Strings that are the Column Headers (making it easy to find the right column for the data you want), and another 2D array of Floats that have the numeric data from "everything except the first row".

Bob Schor

Message 2 of 2
(1,132 Views)