08-24-2017 02:01 AM
Hello!
Currently, my VI plots out result based on my measurement which comes in the form of a csv file. The picture i attached reads the csv file into a subVI to generate the result. As i would like to plot the result of multiple csv files, what i can get this objective going is to read individual csv file into individual similiar subVI and combine to get the result.
Therefore, I would like to have multiple csv files generated into a loop with a single subVI to process my measurement, how do i go about creating the loop and reading the different files?
08-24-2017 02:42 AM
Hi etedwin,
you seem to read just one row from each file…
- I would put those rows into an array (when they have different length I would use an array of cluster of array).
- Then I would call this subVI with the array containing all rows and additionally a parameter describing which rows to use for calculations…
<sarcasm> You don't like to use AutoCleanup before uploading images of your VI? You understand LabVIEW code much better with hidden and bended wires all over?</sarcasm>
08-24-2017 04:13 AM
Sounds like a simple FOR loop to me. Just put your files into a array and autoindex on that array. You can also autoindex the output to create the output arrays as well.
08-24-2017 10:50 PM
Hi crossrulz,
which are the files are you referring for me to put into an array?
08-25-2017 01:01 AM
@etedwin wrote:
which are the files are you referring for me to put into an array?
Create an array of filenames and autoindex that array on a FOR loop that operates on one file per iteration.
08-25-2017 01:11 AM
Hi altenbach,
I think i have gotten it. I have my results in! Attached the picture as shown
08-25-2017 01:31 AM
@etedwin wrote:
I think i have gotten it. I have my results in! Attached the picture as shown
That code makes absolutely no sense! Everything belongs into one loop. Your blue-green code in the upper left is not even used, delete it! You don't have an array of file names as suggested. It makes no sense to create a 3D array. Do all files have arrays of the same dimension? Are you really trying to read zero rows?
Please attach your VI instead of pictures. Also include a few datafiles.