04-25-2012 12:27 AM - edited 04-25-2012 12:29 AM
I'm trying to read a text file using the "Read from Spreadsheet" function. Next I want to plot the data in it on a single XY Graph.
The text file contains 4 coloums and the first coloumn is X axis and rest are for Y axis. I'm not able to get the multiple plots.
However, I could get it to plot when only a single graph is to be plotted(only 2 coloumn in file). I've attached my VI and a picture here.
I need help in plotting multiple XY graph from the text file with the 4 coloumns.
Solved! Go to Solution.
04-25-2012 01:03 AM
04-25-2012 01:28 AM
Thanks a lot SrikrishnaNF! You saved the day for me, it works perfectly now! Here's a picture of the VI.
12-12-2014 02:07 PM
I have search the NI forum for 2 days tring to find a good spreadsheet to graph solution.
This is by far the best & simplest.
P.S.This should be a Sticky on this forum
12-12-2014 05:15 PM - edited 12-18-2014 11:25 AM
12-18-2014 12:40 PM
Thanks altenbach
For your input which would bo very useful for future projects if I need to have so flexablity, for this one I only needed 1X & 2Y.
What really helped me was how simple it was to use when graphing a Labview saved Time Stamp for X w/ just a Read From Spreadsheet File to Transpose 2D Array to Index Array to Bundle to Build Array to graph .
So many others did not work for what I needed.
Again Thanks Everyone
12-18-2014 01:29 PM
Also see if you like this old idea. 😄
01-30-2015 03:33 AM
Hi there,
I have somthing similar but somehow the VI only reads the first row. it doesnt read the other rows. Not sure what went wrong there.
been cracking my head for a few days now. anyone can tell me what is wrong here?
I have attached both my text file and VI.
01-30-2015 03:52 AM
By default, it expects a tab character as delimiter, but your file does not contain a single one! Thus it read each line as a single value and stops reading once a number is read. You get all numbers if you wire a space as delimiter, but there are some zeroes in-between.
Your file is very dirty, with multiple spaces and sometimes commas between values. Where does it come from? Maybe you should first fix the program that generates the data.
Else you might want to read it as plain string, remove the unwanted characters, and then use spreadsheet string to array to parse it.
DId you know that index array is resizeable?
12-06-2015 01:41 PM
Using this VI, my graph plots a line from the last data point, back to zero. I want to remove that line, making it end at the last data poin. Attached is a pic of the graph.