LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

text file

Hello:

        i lately just started a project which require mi to use labview.

        but as a newbie.. i'm totally clueless ...

        so will really appreciate any help given.

           

        My project require mi to plot graphs.using data from notepad...

        but the vi attached below can only read numbers .. but it can like differentiate the time and ADC column ..

        meaning the graphs shud plot the value of Time  on x axis and the value of ADC on Y axis.

        but my vi can only read all the number and plot on the Y axis...

        really appreciate any help given ..

       

        below attact the .txt file n the vi

Download All
0 Kudos
Message 1 of 14
(2,597 Views)

I don't have your subVI, so I don't know what it is doing.

 

You have an XY graph.

 

What you will need to do is read in the data a string at a time and use the Scan From String Function with the correct format code to turn it into a Time stamp and a Double numeric.  Build those outputs into two separate arrays looping through the entire file.

 

When the file is done combine the two arrays into a cluster to feed to the XY graph.

0 Kudos
Message 2 of 14
(2,588 Views)

Hi,

    sorry i dun really understand ..

    cos i was just given a LV8.2 student handbook this monday..

    and was instructed by my teacher , that it had to be completed by 2weeks time ..

    so i was really lost and dun nod how to do it ..

    is there anyother way out ?

    like a simpler design?

    but really thanks for the help ..

0 Kudos
Message 3 of 14
(2,585 Views)

Please post the extract numbers subVI that is missing.  That way we can see what it is doing. 

 

Also, please use complete words.  dun cos nod aren't English words.

0 Kudos
Message 4 of 14
(2,580 Views)

A much simpler method would be to use the Read From Spreadsheet function to get your file all at once. This will return a 2D array that you would use the Index Array function to get each column. The time column is converted with the To Time Stamp. Bundle as mentioned earlier and wire to an XY Graph.

 

I'd post an example but any code would be an entire solution and I don't think that would help you learn LabVIEW (and isn't that the purpose of this assignment?).

 

 There are some free tutorials here

0 Kudos
Message 5 of 14
(2,579 Views)

hello,

        thanks for the help given ..

        but i cant find the example u post ..

        sorry .. but where i can find the example ?sorry sorry ..

        

  

0 Kudos
Message 6 of 14
(2,558 Views)
I said I would not post an example. I don't do someone's homework. The entire solution only requires 4 functions on the block diagram - not counting the XY graph. All of the functions that I mentioned are easily found. Just use the 'Search' button on the functions palette. Take one of the tutorials. And when you are running LabVIEW, go to the help menu and select Show Context Help. When you move the mouse over a function, you will get a help window that explains what each function does.
Message 7 of 14
(2,554 Views)

hello,

       sorry about it.

       i try to do a new vi..

       but when i run the .txt .. nothing is being displayed ..

      

Download All
0 Kudos
Message 8 of 14
(2,549 Views)

Well.  Your new data file now has a header row that your first data file did not have.  Your data is delimited by multiple spaces, and the default delimiter for th Read Spreadsheet File function is a tab.

 

You are reading the first row of your data, twice.  You need to read the first column, and the second column.

 

You want the Time data to go to the top of the cluster.  The raw data to the bottom of the cluster.

 

Clean up your raw text file.  And make changes to your VI like this.

 

Message Edited by Ravens Fan on 02-25-2009 11:36 PM
0 Kudos
Message 9 of 14
(2,540 Views)

You can use XY graph instead of the Waveform graph you've used.

Read the file and sepatate the points in two columns as elements of twoo arrays. Bundle that into a cluster, and pass to the XY Graph.

 

See the attached image for referenace.

 

Thanks.

0 Kudos
Message 10 of 14
(2,531 Views)