From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Plots reading from datafiles

I am trying to write a program that reads data stored in text files (CSV format) and plots these data; the user is allowed to pick how many plots/files they would like to see.  Currently, when a new file is opened, the data read from it are appended to an existing array.  However, this does not deal well with datasets of dissimilar length - if one set is shorter than another, the program will enter rows of zeros to match the length of the longer.  I saw a possible solution here (an earlier post), but this assumes that my data are all in separate 1D arrays rather than the single 2D array I am using.  Is there a way to dynamically write to an unspecified number of arrays (in a loop or something?) or a better solution?

 

Attached is my code along with two sample test text files.

 

Thanks!

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

I am confused about your code/data files.  How does the data from the text file (and therefore the array) translate to the graph?  The data in the first file is:

 

 

2,4,6 4,6,8 6,8,10 8,10,12 10,12,14

 What do the columns and rows represent?

 

 

 

0 Kudos
Message 2 of 2
(2,074 Views)