LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY chart

Hai
How to extract a set of values from a single dimension array to seperate array.my program will read a text file which contains some numerical datas around 500 datas there will be three columns. I shd read 2 data file which contains diffrent datas, in that first column data will be same in both files & thats the X-value (subarray2 in the sa12.vi attached) for the XY chart, then 2 & 3 col.of both files are read & calculated that is x/y that is the Y-value for XY chart.
In my vi i select path & path2 & click OK the paths will be added in array4 & array5 then if i want to add more files i will select files & click OK will will add to the array4&5. when i click load button it will read the files & calculates & inserts the results in the x/y array. if there is
more than one file it will read, calculate & insert the o/p in that x/y array.
Now i want to find the repeatibility plot of diffrent datas. all the data files i selected will be calculated & inserted in a array x/y, col is the No. collumn i am intrested to plot datas from the first value. now i want to extract the results of diffrent file datas from the x/y array and put in the
seperate arrays & plot the graph as shown in the vi (x/y2, x/y3, x/y4...).
or if there is any other way to do this give me the idea. example data file attached
thank u
sasi 
0 Kudos
Message 1 of 4
(2,481 Views)

Sasi,

I am not quite sure what you mean by repeatability plot. Can you explain that more?

If I understand correctly, you want to keep the different data and results from different files seperate. In that case, you might want to keep track of the number of element in each file and then in your final array that contains all the resulant data, you can split that up into sub arrays based on the number of elements in each file.

Please let me know if I have misunderstood your question. Thanks.

Jack J.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 4
(2,449 Views)

Hi Jack,

Thanks for ur reply,

1) sorry what i explained is not clear, repeatability plot, i want to find the repeatability of the diffrent datas so if i plot in the same XY- graph i can compare the plot visually that the all the plots are more or less similar.

2) i want to to select diffrent data from diffrent file but the first column of all the datas will be same & number of datas i am selecting is same for all the files,

eg. in first column if i have No. like 1,2,3,4,5,6.......20 & second files first column data is also same, now i am intrested to select datas 1,2,3,4,5 only from both (all) the files i am selecting.

Please let me know if u have any doubts, Thanks.

Sasi

IIAP

0 Kudos
Message 3 of 4
(2,416 Views)
Hello Sasi,
From what I understand, you only need to read in the first column once (since it is the same for every file). Then you need to compare (visually on a plot) the other columns. I'm assuming that these files are in ASCII format and tab delimited. In that case, you can use the Read From Spreadsheet File VI to get a 2D array. Then you can use the Index Array function to get the column you want. Then you can put all these columns together to create another 2D array using the Build Array function and plot that on a graph.
I am attaching an example of what I mean. Hope this helps.
 
Jack J.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 4
(2,386 Views)