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
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.
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 ..
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.
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.
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.
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.