02-16-2010 03:00 PM
Hi!
I am using LabVIEW 8.5, and I am trying to read columns from a file and plot with xy graph. I can do it with two channels, but I am having problems when the numbers of channels connected increase (maybe six or ten).
My text file looks like this:
[Where first column x = time, the rest of the columns are channels = y]
8.828 22.604 23.076 [The number of channels connected can change]
9.828 22.604 22.604
10.828 21.658 22.131
11.828 22.131 22.131
12.828 22.131 22.131
13.828 22.604 22.604
14.828 21.658 22.604
15.828 22.131 22.131
16.828 21.658 23.076
17.828 22.604 22.131
18.828 22.131 22.604
I attached a picture of what I already try… Now I am trying a combination of those. If anyone has some advice or suggestion, please let me know.
Sincerely,
Julieta.
Solved! Go to Solution.
02-16-2010 03:17 PM - edited 02-16-2010 03:18 PM
Try the code below.
03-03-2010 01:52 PM
Thanks for the advice!... I just modified what I had a little bit and it is working, maybe is not the optimums solution…
I would like to make the time invisible in the graph… It that possible? I attached a picture of my graph, because my English is not good. There are two lines near to 22 (two channels connected at that moment), and a line near to 0 which is time (the strong pink one). I would like to make invisible the strong prink one only. I try to make invisible, but I fail… I changed colors looking for another solution and I fail again, because it is taking the colors that I choose for the channels. I can not disable because I need it to make the x axes works with the time that I already saved. If someone has an advice or suggestion I really appreciate it…
Sincerely,
Julieta.
12-10-2010 08:28 AM - edited 12-10-2010 08:30 AM
Hi
Would you be able to post this VI?
I have something simliar to graph, the txt file has commas separating the x-y data
The txt file is of the format
+1.8803E+03, 2.8803E+3
+3.8803E+03, 3.8803E+3
+4.8803E+03, 4.8803E+3
(I've included the first 3 data points there is 100 data points to graph)
I can manipulate the vi to accomodate what I'm doing
Thanks
12-10-2010 09:47 AM
The VI is posted. It's a snippet.
12-10-2010 10:00 AM
Didn't no that.Cheers for the reply.
12-10-2010 10:59 AM
Hi
Excuse my grammar in last reply.That should be, I didn't know that about the snippets.Thank you again for the reply.
I do have an issue plotting my data and correcting the vi posted to suit my data
The data I have is stored in the format x,y,z as per line of the txt file, I need to plot column x against column y while ignoring z in the text file.
+1.8803E+03,+6.8327E+01,+1.4779E+02,0
+5.0000E+03,+7.5986E+01,+1.1293E+02,0
+4.0000E+03,+7.5986E+01,+1.1293E+02,0
+1.0000E+02,+5.8782E+01,-1.7695E+02,0
Any advice is appreciated.
Thank you
12-10-2010 11:07 AM - edited 12-10-2010 11:07 AM
In the Index Array function, wire the 0 into the Columns index, rather than the rows index. (Likewise for the 1, but the 1 actually doesn't need to be wired at all since it is assumed to be the next column in sequence if you leave the input unwired.)
12-10-2010 11:22 AM
Thank you for pointing out the error.
It works perfectly now.